• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP html_clean函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中html_clean函数的典型用法代码示例。如果您正苦于以下问题:PHP html_clean函数的具体用法?PHP html_clean怎么用?PHP html_clean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了html_clean函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: tmp_data

 function tmp_data($d_file, $var)
 {
     require $d_file;
     $d_content = '';
     if (!isset(${$var})) {
         return '';
     }
     eval('foreach ($' . $var . ' as $k => $v) $d_content .= $k." | ".$v."\\n";');
     $this->d_content = html_clean($d_content);
 }
开发者ID:nqv,项目名称:eposys,代码行数:10,代码来源:data_edit.php


示例2: define

/*
--------------------------------------------------------------------------------
     File:  index.php

     Unit:  INDEX
   Author:  Quoc Viet [aFeLiOn]
    Begin:  2005-12-29

  Comment:  EPS wrap

--------------------------------------------------------------------------------
*/
define('EPS_ROOT', './');
require EPS_ROOT . 'include/common.php';
$eps_title = html_clean($eps_config['title']);
require EPS_ROOT . 'header.php';
if (@$_GET['mode'] == 'show') {
    require EPS_ROOT . 'show.php';
} else {
    // Extra
    ?>
<div id="eps_header"><h1><?php 
    echo $eps_title;
    ?>
</h1><span><?php 
    echo $eps_config['desc'];
    ?>
</span></div>
<?php 
    require EPS_ROOT . 'eps_left.php';
开发者ID:nqv,项目名称:eposys,代码行数:30,代码来源:index.php


示例3: array

        if ($epsclass->validate->chk_empty($description, $eps_lang['Description'])) {
            $epsclass->load_class('class_upload', EPS_GALLERY_DIR, array('jpg', 'gif', 'png'), 1512000);
            if ($epsclass->upload->up('req_file')) {
                $epsclass->load_class('class_image');
                $epsclass->image->create_thumb(EPS_GALLERY_DIR . $epsclass->upload->uploaded_infos['name']);
                $inserts = array('filename' => $epsclass->upload->uploaded_infos['name'], 'filesize' => $epsclass->upload->uploaded_infos['size'], 'description' => $description, 'poster_id' => $eps_user['id'], 'posted' => time());
                $epsclass->db->vinsert(TBL_GALLERY, $inserts);
                // 					redirect('index.php?eps=share', $eps_lang['Redirect_share_post']);
                return;
            } else {
                $errors = $epsclass->upload->errors;
            }
        } else {
            $errors = $epsclass->validate->errors;
        }
    }
    $epsclass->load_class('class_paginate');
    $sqls = array("SELECT COUNT(*) FROM " . TBL_GALLERY, "SELECT u.username,g.* FROM " . TBL_GALLERY . " g LEFT JOIN " . TBL_USER . " u ON g.poster_id=u.id ORDER BY g.posted DESC");
    $result = $epsclass->paginate->get_result($sqls, $module_path, $p);
    $gallery_shows = array();
    while ($cur_gallery = $epsclass->db->fetch_assoc($result)) {
        $gallery_shows[] = auto_gen_link($module_path . '&amp;gid=' . $cur_gallery['id'], '<img src="' . EPS_GALLERY_DIR . pic2thumb($cur_gallery['filename']) . '" />', '<b>' . html_clean($cur_gallery['username']) . '</b> - <i>' . format_time($cur_gallery['posted']) . ' (' . floor($cur_gallery['filesize'] / 1024) . ' KB)</i><br />' . html_clean($cur_gallery['description']), true, true, true);
    }
    $smarty->assign('error_show', !empty($errors) ? gen_alert($errors) : '');
    $smarty->assign('description', isset($description) ? html_clean($description) : '');
    $smarty->assign('p', $p);
    $smarty->assign('gallery_dir', EPS_GALLERY_DIR);
    $smarty->assign('gallery_shows', $gallery_shows);
    $smarty->assign('pagination', $epsclass->paginate->gen_page_link());
}
$smarty->display('module/gallery.tpl');
开发者ID:nqv,项目名称:eposys,代码行数:31,代码来源:gallery.php


示例4: foreach

         $where = $tmp = $b1 = '';
         //选取条件字段用
         foreach ($mn as $key => $inside) {
             if ($inside) {
                 //查找主键、唯一属性、自动增加的字段,找到就停止,否则组合所有字段作为条件。
                 if ($rowdb[$key]['Key'] == 1 || $rowdb[$key]['Auto'] == 1) {
                     $where = $key . "='" . addslashes($inside) . "'";
                     break;
                 }
                 $where .= $tmp . $key . "='" . addslashes($inside) . "'";
                 $tmp = ' AND ';
             }
         }
         //读取记录用
         foreach ($mn as $key => $inside) {
             $b1 .= '<td nowrap>' . html_clean($inside) . '&nbsp;</td>';
         }
         $where = base64_encode($where);
         if ($allowedit) {
             p('<td nowrap><a href="javascript:editrecord(\'edit\', \'' . $where . '\', \'' . $tablename . '\');">Edit</a> | <a href="javascript:editrecord(\'del\', \'' . $where . '\', \'' . $tablename . '\');">Del</a></td>');
         }
         p($b1);
         p('</tr>');
         $index++;
         unset($b1);
     }
     tbfoot();
     p($multipage);
     break;
 case 2:
     $ar = mssql_affected_rows();
开发者ID:mcanv,项目名称:webshell,代码行数:31,代码来源:2009mssql.php


示例5: file

$num_poll = 0;
if (is_file(FILE_POLL_DATA)) {
    $polls = file(FILE_POLL_DATA);
    if (!empty($polls)) {
        $poll_ques = html_clean(trim($polls[0]));
        for ($cur_id = 0; $cur_id + 1 < count($polls); $cur_id++) {
            $cur_line = trim($polls[$cur_id + 1]);
            if (empty($cur_line)) {
                continue;
            }
            if (strpos($cur_line, '|') !== false) {
                $tmp = explode('|', $cur_line);
                $cur_ans = html_clean(trim($tmp[0]));
                $cur_vote = intval(trim($tmp[1]));
            } else {
                $cur_ans = html_clean($cur_line);
                $cur_vote = 0;
            }
            $poll_ans[$cur_id] = array('ans' => $cur_ans, 'vote' => $cur_vote);
            $poll_radios[$cur_id] = $cur_ans;
            $num_poll += $cur_vote;
        }
    }
}
$polled_ids = is_file(FILE_POLL_ID) ? explode("\n", file_get_contents(FILE_POLL_ID)) : array();
$polled_ips = is_file(FILE_POLL_IP) ? explode("\n", file_get_contents(FILE_POLL_IP)) : array();
if (empty($poll_ques) || empty($poll_ans)) {
    return;
}
$show_result = $show || !$eps_user['is_guest'] && in_array($eps_user['id'], $polled_ids) || in_array($eps_user['ip_address'], $polled_ips) ? true : false;
if ($show_result || IS_ADMIN) {
开发者ID:nqv,项目名称:eposys,代码行数:31,代码来源:poll.php


示例6: foreach

<ul class="links adb_list">
    <?php 
foreach ($items as $item) {
    ?>
        <li>
            <a href="<?php 
    echo href_to($item['target_url']) . "#comment_{$item['id']}";
    ?>
"><?php 
    echo html_strip($item['target_title'], 50);
    ?>
</a>
            <div><?php 
    echo html_clean($item['content_html'], 100);
    ?>
</div>
            <div class="date"><?php 
    echo string_date_age_max($item['date_pub'], true);
    ?>
</div>
        </li>
    <?php 
}
?>
</ul>
<?php 
if ($show_count < $total) {
    ?>
<a class="view_all_link" href="<?php 
    echo href_to('admin', 'controllers', array('edit', 'comments', 'comments_list'));
    ?>
开发者ID:Val-Git,项目名称:icms2,代码行数:31,代码来源:admin_dashboard_block.tpl.php


示例7: isset

            $errors = $epsclass->validate->errors;
            $epsclass->validate->data_reset();
        }
    }
}
// For Select Box
$news['type'] = isset($type) ? $type : $news['type'];
$news['no_smiley'] = isset($no_smiley) ? $no_smiley : $news['no_smiley'];
if ($action == 'edit') {
    $page_title = $eps_lang['Page_post_edit'];
} else {
    if ($action == 'delete') {
        $page_title = $eps_lang['Page_post_delete'];
    } else {
        $page_title = $eps_lang['Page_post'];
    }
}
$req_fields = array('title' => $eps_lang['Title'], 'content' => $eps_lang['Content']);
$smarty->assign('js_lang', gen_jslang($req_fields));
$smarty->assign('emoticons', $epsclass->bbcode->emoticons);
$smarty->assign('action', $action);
$smarty->assign('page_title', $page_title);
$smarty->assign('error_show', !empty($errors) ? gen_alert($errors) : '');
$smarty->assign('form_tag', auto_gen_form('index.php?eps=post&amp;action=' . $action . (($action == 'edit' || $action == 'delete') && $nid >= 1 ? '&amp;nid=' . $nid : ''), 'postnews', true));
$smarty->assign('title', html_clean(isset($title) ? $title : $news['title']));
$smarty->assign('content', html_clean(isset($content) ? $content : $news['content']));
$smarty->assign('imgurl', html_clean(isset($imgurl) ? $imgurl : $news['imgurl']));
$smarty->assign('type', isset($type) ? $type : $news['type']);
$smarty->assign('no_smiley', isset($no_smiley) ? $no_smiley : $news['no_smiley']);
unset($nid, $action, $news, $errors, $title, $content, $imgurl, $type, $no_smiley, $page_title, $req_fields);
$smarty->display('module/post.tpl');
开发者ID:nqv,项目名称:eposys,代码行数:31,代码来源:post.php


示例8: imdbData


//.........这里部分代码省略.........
    preg_match_all('/<a.*?href="\\/name\\/nm.+?".*?>(.+?)<\\/a>/si', $ary[1], $ary, PREG_PATTERN_ORDER);
    // TODO: Update templates to use multiple directors
    $data['director'] = trim(join(', ', $ary[1]));
    // Rating
    preg_match('/<span .*? itemprop="ratingValue">([\\d\\.]+)<\\/span>/si', $resp['data'], $ary);
    $data['rating'] = trim($ary[1]);
    // Countries
    preg_match('/Country:\\s*<\\/h4>(.+?)<\\/div>/si', $resp['data'], $ary);
    preg_match_all('/<a.*?href="\\/country\\/.+?".*?>(.+?)<\\/a>/si', $ary[1], $ary, PREG_PATTERN_ORDER);
    $data['country'] = trim(join(', ', $ary[1]));
    // Languages
    preg_match('/Languages?:\\s*<\\/h4>(.+?)<\\/div>/si', $resp['data'], $ary);
    preg_match_all('/<a.*?href="\\/language\\/.+?".*?>(.+?)<\\/a>/si', $ary[1], $ary, PREG_PATTERN_ORDER);
    $data['language'] = trim(strtolower(join(', ', $ary[1])));
    // Genres (as Array)
    preg_match('/Genres:\\s*<\\/h4>(.+?)<\\/div>/si', $resp['data'], $ary);
    preg_match_all('/<a.*?href="\\/genres?\\/.+?".*?>(.+?)<\\/a>/si', $ary[1], $ary, PREG_PATTERN_ORDER);
    foreach ($ary[1] as $genre) {
        $data['genres'][] = trim($genre);
    }
    // for Episodes - try to get some missing stuff from the main series page
    if ($data['istv'] and (!$data['runtime'] or !$data['country'] or !$data['language'] or !$data['coverurl'])) {
        $sresp = httpClient($imdbServer . '/title/tt' . $data['tvseries_id'] . '/', $cache);
        if (!$sresp['success']) {
            $CLIENTERROR .= $resp['error'] . "\n";
        }
        # runtime
        if (!$data['runtime']) {
            preg_match('/itemprop="duration".*?>(\\d+)\\s+min<\\//si', $sresp['data'], $ary);
            if (!$ary) {
                preg_match('/Runtime:?<\\/h4>.*?>(\\d+)\\s+min/si', $resp['data'], $ary);
            }
            $data['runtime'] = preg_replace('/,/', '', trim($ary[1]));
        }
        # country
        if (!$data['country']) {
            preg_match('/Country:\\s*<\\/h4>(.+?)<\\/div>/si', $sresp['data'], $ary);
            preg_match_all('/<a.*?href="\\/country\\/.+?".*?>(.+?)<\\/a>/si', $ary[1], $ary, PREG_PATTERN_ORDER);
            $data['country'] = trim(join(', ', $ary[1]));
        }
        # language
        if (!$data['language']) {
            preg_match('/Languages?:\\s*<\\/h4>(.+?)<\\/div>/si', $sresp['data'], $ary);
            preg_match_all('/<a.*?href="\\/language\\/.+?".*?>(.+?)<\\/a>/si', $ary[1], $ary, PREG_PATTERN_ORDER);
            $data['language'] = trim(strtolower(join(', ', $ary[1])));
        }
        # cover
        if (!$data['coverurl']) {
            $data['coverurl'] = imdbGetCoverURL($sresp['data']);
        }
    }
    // Plot
    preg_match('/<h2>Storyline<\\/h2>.*?<p>(.*?)</si', $resp['data'], $ary);
    $data['plot'] = $ary[1];
    // Fetch credits
    $resp = imdbFixEncoding($data, httpClient($imdbServer . '/title/tt' . $imdbID . '/fullcredits', $cache));
    if (!$resp['success']) {
        $CLIENTERROR .= $resp['error'] . "\n";
    }
    // Cast
    if (preg_match('#<table class="cast_list">(.*)#si', $resp['data'], $match)) {
        // no idea why it does not always work with (.*?)</table
        // could be some maximum length of .*?
        // anyways, I'm cutting it here
        $casthtml = substr($match[1], 0, strpos($match[1], '</table'));
        if (preg_match_all('#<td .*? itemprop="actor".*?>\\s+<a href="/name/(nm\\d+)/?.*?".*?>(.*?)</a>.*?<td class="character">(.*?)</td>#si', $casthtml, $ary, PREG_PATTERN_ORDER)) {
            for ($i = 0; $i < sizeof($ary[0]); $i++) {
                $actorid = trim(strip_tags($ary[1][$i]));
                $actor = trim(strip_tags($ary[2][$i]));
                $character = trim(preg_replace('/\\s+/', ' ', strip_tags(preg_replace('/&nbsp;/', ' ', $ary[3][$i]))));
                $cast .= "{$actor}::{$character}::{$imdbIdPrefix}{$actorid}\n";
            }
        }
        // remove html entities and replace &nbsp; with simple space
        $data['cast'] = html_clean_utf8($cast);
        // sometimes appearing in series (e.g. Scrubs)
        $data['cast'] = preg_replace('#/ ... #', '', $data['cast']);
    }
    // Fetch plot
    $resp = $resp = imdbFixEncoding($data, httpClient($imdbServer . '/title/tt' . $imdbID . '/plotsummary', $cache));
    if (!$resp['success']) {
        $CLIENTERROR .= $resp['error'] . "\n";
    }
    // Plot
    preg_match('/<P CLASS="plotSummary">(.+?)<\\/P>/is', $resp['data'], $ary);
    if ($ary[1]) {
        $data['plot'] = trim($ary[1]);
        $data['plot'] = preg_replace('/&#34;/', '"', $data['plot']);
        //Replace HTML " with "
        //Begin removal of 'Written by' section
        $data['plot'] = preg_replace('/<a href="\\/SearchPlotWriters.*?<\\/a>/', '', $data['plot']);
        $data['plot'] = preg_replace('/Written by/', '', $data['plot']);
        $data['plot'] = preg_replace('/<i>\\s+<\\/i>/', ' ', $data['plot']);
        //End of removal of 'Written by' section
        $data['plot'] = preg_replace('/\\s+/s', ' ', $data['plot']);
    }
    $data['plot'] = html_clean($data['plot']);
    #dump($data['plot']);
    return $data;
}
开发者ID:Boris-de,项目名称:videodb,代码行数:101,代码来源:imdb.php


示例9: href_to_abs

                    <?php 
        }
        ?>
                    <link><?php 
        echo href_to_abs($feed['ctype_name'], $item['slug'] . '.html');
        ?>
</link>
                    <?php 
        if (!empty($feed['mapping']['description'])) {
            ?>
                        <description><?php 
            html(html_clean($item[$feed['mapping']['description']], 150));
            ?>
</description>
                        <yandex:full-text><?php 
            html(html_clean($item[$feed['mapping']['description']]));
            ?>
</yandex:full-text>
                    <?php 
        }
        ?>
                    <?php 
        if (!empty($feed['mapping']['image'])) {
            ?>
                        <?php 
            $image = cmsModel::yamlToArray($item[$feed['mapping']['image']]);
            ?>
                        <?php 
            if (!empty($image[$feed['mapping']['image_size']])) {
                ?>
                            <?php 
开发者ID:pin-git,项目名称:icms2,代码行数:31,代码来源:yandex_feed.tpl.php


示例10: sylk_clean

/**
 * Clean display value for sylk export
 *
 * @param $value string value
 *
 * @return clean value
**/
function sylk_clean($value)
{
    if (get_magic_quotes_runtime()) {
        $value = stripslashes($value);
    }
    $value = preg_replace('/\\x0A/', ' ', $value);
    $value = preg_replace('/\\x0D/', NULL, $value);
    $value = str_replace("\"", "''", $value);
    $value = str_replace(';', ';;', $value);
    $value = html_clean($value);
    return $value;
}
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:19,代码来源:common.function.php


示例11: while

    while ($cur_user = $epsclass->db->fetch_assoc($result)) {
        $tmp = array();
        $cur_detail = '';
        if (!$eps_user['is_guest']) {
            $cur_details = array();
            foreach ($details as $key => $value) {
                $cur_details[] = '<li><strong>' . $value . ': </strong>' . $cur_user[$key];
            }
            $cur_detail = '<ul>' . implode('</li>', $cur_details) . '</li></ul>';
        }
        if ($list_type == 2) {
            $tmp[1] = $eps_user['is_guest'] ? html_clean($cur_user['name']) : gen_link('#', html_clean($cur_user['name']), $cur_detail, false, true);
            $tmp[2] = $cur_user['birth'];
            $tmp[3] = !empty($eps_lang[$cur_user['course']]) ? $eps_lang[$cur_user['course']] : html_clean($cur_user['course']);
        } else {
            $link_edit = IS_MODADMIN ? 'index.php?eps=profile&amp;uid=' . $cur_user['id'] : '#';
            $tmp[1] = $eps_user['is_guest'] ? html_clean($cur_user['username']) : auto_gen_link($link_edit, $cur_user['username'], $cur_detail, true, true, true);
            $tmp[2] = format_time($cur_user['reg_time']);
            $tmp[3] = html_clean($cur_user['g_title']);
        }
        $tmp[0] = $start++;
        $list_shows[] = $tmp;
    }
    $smarty->assign('list_type', $list_type);
    $smarty->assign('list_shows', $list_shows);
    $smarty->assign('pagination', $epsclass->paginate->gen_page_link());
    $smarty->display('module/list.tpl');
} else {
    $smarty->display('empty.tpl');
}
unset($list, $search, $uid, $where_sql, $list_type, $sqls, $page_link, $list_shows, $empty, $start, $prefix, $tpl_jump);
开发者ID:nqv,项目名称:eposys,代码行数:31,代码来源:list.php


示例12: format_time

        // Parse
        $user['reg_time'] = format_time($user['reg_time']);
        $user['name'] = html_clean($user['name']);
        $user['birth'] = html_clean($user['birth']);
        $user['course'] = !empty($eps_lang[$user['course']]) ? $eps_lang[$user['course']] : html_clean($user['course']);
        $user['phone'] = html_clean(isset($phone) ? $phone : $user['phone']);
        $user['yahoo'] = html_clean(isset($yahoo) ? $yahoo : $user['yahoo']);
        $smarty->assign('yesno_radios', array(1 => $eps_lang['Yes'], 0 => $eps_lang['No']));
        $smarty->assign('is_admin', IS_ADMIN);
        $smarty->assign('is_modadmin', IS_MODADMIN);
        $smarty->assign('user', $user);
        $smarty->assign('js_lang', gen_jslang($req_fields));
        $smarty->assign('error_show', !empty($errors) ? gen_alert($errors) : '');
        $smarty->assign('form_tag1', auto_gen_form('index.php?eps=profile&amp;uid=' . $uid, 'profile', true));
        $smarty->assign('username', html_clean(isset($username) ? $username : $user['username']));
        $smarty->assign('changepass_link', auto_gen_link('index.php?eps=profile&amp;action=changepass&amp;uid=' . $uid, $eps_lang['Change_password']));
        $smarty->assign('email', html_clean(isset($email) ? $email : $user['email']));
        $smarty->assign('s_id', html_clean(isset($s_id) ? $s_id : $user['s_id']));
        $smarty->assign('groups', $groups);
        $smarty->assign('use_ajax', isset($_POST['use_ajax']) || $user['ajax'] ? true : false);
        $smarty->assign('styles', get_stuff('style'));
        $smarty->assign('languages', get_stuff('language'));
        $smarty->assign('form_tag2', auto_gen_form('index.php?eps=profile&amp;uid=' . $uid, 'another', true));
        $smarty->assign('native', html_clean(isset($native) ? $native : $user['native']));
        $smarty->assign('address', html_clean(isset($address) ? $address : $user['address']));
        $smarty->assign('phone', html_clean(isset($phone) ? $phone : $user['phone']));
        $smarty->assign('yahoo', html_clean(isset($yahoo) ? $yahoo : $user['yahoo']));
        $smarty->display('module/profile.tpl');
    }
}
unset($errors, $need_old_pass, $action, $uid, $secr_key, $old_password, $new_password1, $new_password2, $req_fields, $user, $groups, $allow_group_id, $username, $email, $s_id);
开发者ID:nqv,项目名称:eposys,代码行数:31,代码来源:profile.php


示例13: redirect

                $epsclass->db->vinsert(TBL_SHARE, $inserts);
                redirect('index.php?eps=share', $eps_lang['Redirect_share_post']);
                return;
            } else {
                $errors = $epsclass->upload->errors;
            }
        } else {
            $errors = $epsclass->validate->errors;
        }
    }
    // Paginate
    $epsclass->load_class('class_paginate');
    $sqls = array("SELECT COUNT(id) FROM " . TBL_SHARE, "SELECT u.username,s.* FROM " . TBL_SHARE . " s LEFT JOIN " . TBL_USER . " u ON s.poster_id=u.id ORDER BY s.post_time DESC");
    $result = $epsclass->paginate->get_result($sqls, 'index.php?eps=share', $p);
    $shares = array();
    if ($epsclass->paginate->num_result()) {
        while ($cur_share = $epsclass->db->fetch_assoc($result)) {
            $tmp = array('link' => gen_link('download.php?down=share&amp;id=' . $cur_share['id'], html_clean($cur_share['url']), '', true), 'comment' => html_clean($cur_share['comment']), 'poster' => auto_gen_link('index.php?eps=list&amp;list=user&amp;uid=' . $cur_share['poster_id'], html_clean($cur_share['username']), '', true), 'post_time' => format_time($cur_share['post_time']));
            if ($cur_share['poster_id'] == $eps_user['id'] || IS_MODADMIN) {
                $tmp['editlink'] = gen_editlink('index.php?eps=share&amp;shid=' . $cur_share['id']);
            }
            $shares[] = $tmp;
        }
        $smarty->assign('pagination', $epsclass->paginate->gen_page_link());
    }
    $smarty->assign('error_show', !empty($errors) ? gen_alert($errors) : '');
    $smarty->assign('shares', $shares);
    $smarty->assign('comment', isset($comment) ? html_clean($comment) : '');
    $smarty->display('module/share.tpl');
}
unset($p, $shid, $action, $errors, $req_fields, $this_share, $comment, $updates, $inserts, $sqls, $shares);
开发者ID:nqv,项目名称:eposys,代码行数:31,代码来源:share.php


示例14: showItem

 /**
  * Print generic normal Item Cell
  *
  * @param $type display type (0=HTML, 1=Sylk,2=PDF,3=CSV)
  * @param $value value to display
  * @param $num column number
  * @param $row  row number
  * @param $extraparam extra parameters for display
  *
  *@return string to display
  **/
 static function showItem($type, $value, &$num, $row, $extraparam = '')
 {
     $out = "";
     switch ($type) {
         case PDF_OUTPUT_LANDSCAPE:
             //pdf
         //pdf
         case PDF_OUTPUT_PORTRAIT:
             global $PDF_ARRAY, $PDF_HEADER;
             $value = weblink_extract($value);
             $PDF_ARRAY[$row][$num] = decodeFromUtf8(html_clean($value), 'windows-1252');
             break;
         case SYLK_OUTPUT:
             //sylk
             global $SYLK_ARRAY, $SYLK_HEADER, $SYLK_SIZE;
             $value = weblink_extract($value);
             $SYLK_ARRAY[$row][$num] = sylk_clean($value);
             $SYLK_SIZE[$num] = max($SYLK_SIZE[$num], utf8_strlen($SYLK_ARRAY[$row][$num]));
             break;
         case CSV_OUTPUT:
             //csv
             $value = weblink_extract($value);
             $out = "\"" . csv_clean($value) . "\"" . $_SESSION["glpicsv_delimiter"];
             break;
         default:
             //TODO supprimer valign pour mettre class mais conflit avec $extraparam
             $out = "<td {$extraparam} valign='top'>";
             /*            if (!preg_match('/<hr>/',$value)) {
                            $values = preg_split("/<br>/i",$value);
                            $line_delimiter = '<br>';
                         } else {
                            $values = preg_split("/<hr>/i",$value);
                            $line_delimiter = '<hr>';
                         }
             
                         $limitto = 20;
                         if (count($values) > $limitto) {
                            for ( $i=0 ; $i<$limitto ; $i++) {
                               $out .= $values[$i].$line_delimiter;
                            }
                            $rand=mt_rand();
                            $out .= "...&nbsp;";
                            $out .= showToolTip($value,array('display'   => false,
                                                             'autoclose' => false));
             
                         } else {*/
             $out .= $value;
             //             }
             $out .= "</td>\n";
     }
     $num++;
     return $out;
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:64,代码来源:search.class.php


示例15: date_string

<?php

/*
--------------------------------------------------------------------------------
     File:  w_o_t_d.php

   Module:  WORD OF THE DAY
   Author:  Quoc Viet [aFeLiOn]
    Begin:  2006-03-11

  Comment:  Get From dictionary.com
--------------------------------------------------------------------------------
*/
if (!defined('IN_EPS')) {
    exit;
}
$wotd_link = 'http://dictionary.reference.com/wordoftheday/wotd.rss';
$wotd_diff = -36000;
@(include EPS_CACHE_DIR . 'cache_wotd.php');
$now_string = date_string(time() + $wotd_diff);
if (!isset($wotd) || empty($wotd['desc']) || $wotd['date'] != $now_string) {
    $epsclass->load_class('class_xml');
    $epsclass->xml->load_file($wotd_link);
    $wotd_rss = $epsclass->xml->get_rss();
    $wotd = empty($wotd_rss) ? array() : array('date' => $now_string, 'link' => $wotd_rss['item']['link'], 'title' => html_clean($wotd_rss['item']['title']), 'desc' => preg_replace('#^(.+?):#i', '<strong>$1</strong>:', html_clean($wotd_rss['item']['description'])));
    create_file('<?php' . "\n" . '$wotd = ' . var_export($wotd, true) . ';' . "\n" . '?>', 'cache_wotd.php', EPS_CACHE_DIR);
}
$smarty->assign('wotd', $wotd);
$smarty->display('module/w_o_t_d.tpl');
unset($wotd_link, $wotd_diff, $now_string, $wotd_rss, $wotd);
开发者ID:nqv,项目名称:eposys,代码行数:30,代码来源:w_o_t_d.php


示例16: get_stuff

    }
    $smarty->assign('album_shows', $album_shows);
} else {
    if (!is_dir(EPS_ALBUM_DIR . $album)) {
        return;
    }
    // In Album-Directory
    $thumbs = get_stuff('thumb', $album);
    // No Thumbs
    if (empty($thumbs)) {
        ?>
		<div class="showalbum">
			<img src="./image/noimg.png" />
		</div>
<?php 
        return;
    } else {
        $prefix = 'index.php?eps=album&amp;album=';
        $album_values = array();
        foreach ($albums as $v) {
            $album_values[$prefix . urlencode($v)] = !empty($album_infos[$v]) ? $album_infos[$v]['name'] : $v;
        }
        $tpl_jump = array('name' => $eps_lang['Album'], 'onchange' => eps_use_ajax() ? 'vQ(this.options[this.selectedIndex].value)' : 'window.location=this.options[this.selectedIndex].value', 'value' => $album_values, 'selected' => $prefix . $album);
        $smarty->assign('tpl_jump', $tpl_jump);
        $smarty->assign('album_name', html_clean(!empty($album_infos[$album]) ? $album_infos[$album]['name'] : $album));
        $smarty->assign('album_pics', thumb2pic($thumbs));
        $smarty->assign('album_dir', EPS_ALBUM_DIR . html_clean($album) . '/');
    }
}
$smarty->assign('album', $album);
$smarty->display('module/album.tpl');
开发者ID:nqv,项目名称:eposys,代码行数:31,代码来源:album.php


示例17: p

                     p('<table border="0" cellpadding="3" cellspacing="0">');
                     p('<tr class="head">');
                     $fieldnum = @mysql_num_fields($result);
                     for ($i = 0; $i < $fieldnum; $i++) {
                         p('<td nowrap>' . @mysql_field_name($result, $i) . '</td>');
                     }
                     p('</tr>');
                     if (!$tatol) {
                         p('<tr class="alt2" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'alt2\';"><td nowrap colspan="' . $fieldnum . '" class="red b">No records</td></tr>');
                     } else {
                         while ($mn = $DB->fetch($result)) {
                             $thisbg = bg();
                             p('<tr class="' . $thisbg . '" onmouseover="this.className=\'focus\';" onmouseout="this.className=\'' . $thisbg . '\';">');
                             //读取记录用
                             foreach ($mn as $key => $inside) {
                                 p('<td nowrap>' . ($inside == null ? '<i>null</i>' : html_clean($inside)) . '</td>');
                             }
                             p('</tr>');
                             unset($b1);
                         }
                     }
                     p('</table>');
                     break;
                 case 2:
                     p('<h2>Affected Rows : ' . $DB->affected_rows() . '</h2>');
                     break;
             }
         }
     }
 } else {
     $query = $DB->query("SHOW TABLE STATUS");
开发者ID:retanoj,项目名称:webshellSample,代码行数:31,代码来源:2e8d3bf70d3d7eceb33859459b18c40b.php


示例18: cleanContentHtml

 static function cleanContentHtml($input)
 {
     if (!$input['content_text']) {
         $input['content_text'] = html_clean(unclean_cross_side_scripting_deep($input['content_html']));
     }
     return $input;
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:7,代码来源:notificationtemplatetranslation.class.php


示例19: buildTicket


//.........这里部分代码省略.........
         $tkt['content'] = encodeInUtf8($body);
     } else {
         $tkt['content'] = $body;
     }
     // Add message from getAttached
     if ($this->addtobody) {
         $tkt['content'] .= $this->addtobody;
     }
     // See In-Reply-To field
     if (isset($head['in_reply_to'])) {
         if (preg_match($glpi_message_match, $head['in_reply_to'], $match)) {
             $tkt['tickets_id'] = intval($match[1]);
         }
     }
     // See in References
     if (!isset($tkt['tickets_id']) && isset($head['references'])) {
         if (preg_match($glpi_message_match, $head['references'], $match)) {
             $tkt['tickets_id'] = intval($match[1]);
         }
     }
     // See in title
     if (!isset($tkt['tickets_id']) && preg_match('/\\[GLPI #(\\d+)\\]/', $head['subject'], $match)) {
         $tkt['tickets_id'] = intval($match[1]);
     }
     // Found ticket link
     if (isset($tkt['tickets_id'])) {
         // it's a reply to a previous ticket
         $job = new Ticket();
         // Check if ticket  exists and users_id exists in GLPI
         /// TODO check if users_id have right to add a followup to the ticket
         if ($job->getFromDB($tkt['tickets_id']) && $job->fields['status'] != 'closed' && ($tkt['_users_id_requester'] > 0 || Ticket_User::isAlternateEmailForTicket($tkt['tickets_id'], $head['from']))) {
             $content = explode("\n", $tkt['content']);
             $tkt['content'] = "";
             $first_comment = true;
             $to_keep = array();
             foreach ($content as $ID => $val) {
                 if (isset($val[0]) && $val[0] == '>') {
                     // Delete line at the top of the first comment
                     if ($first_comment) {
                         $first_comment = false;
                         if (isset($to_keep[$ID - 1])) {
                             unset($to_keep[$ID - 1]);
                         }
                     }
                 } else {
                     $to_keep[$ID] = $ID;
                 }
             }
             foreach ($to_keep as $ID) {
                 $tkt['content'] .= $content[$ID] . "\n";
             }
             // Do not play rules for followups : WRONG : play rules only for refuse options
             //$play_rules = false;
         } else {
             // => to handle link in Ticket->post_addItem()
             $tkt['_linkedto'] = $tkt['tickets_id'];
             unset($tkt['tickets_id']);
         }
     }
     $tkt['name'] = $this->textCleaner($head['subject']);
     if (!isset($tkt['tickets_id'])) {
         // Which entity ?
         //$tkt['entities_id']=$this->fields['entities_id'];
         //$tkt['Subject']= $head['subject'];   // not use for the moment
         // Medium
         $tkt['urgency'] = "3";
         // No hardware associated
         $tkt['itemtype'] = "";
         // Mail request type
     } else {
         // Reopen if needed
         $tkt['add_reopen'] = 1;
     }
     $tkt['requesttypes_id'] = RequestType::getDefault('mail');
     $tkt['content'] = clean_cross_side_scripting_deep(html_clean($tkt['content']));
     if ($play_rules) {
         $rule_options['ticket'] = $tkt;
         $rule_options['headers'] = $head;
         $rule_options['mailcollector'] = $options['mailgates_id'];
         $rule_options['_users_id_requester'] = $tkt['_users_id_requester'];
         $rulecollection = new RuleMailCollectorCollection();
         $output = $rulecollection->processAllRules(array(), array(), $rule_options);
         // New ticket : compute all
         if (!isset($tkt['tickets_id'])) {
             foreach ($output as $key => $value) {
                 $tkt[$key] = $value;
             }
         } else {
             // Followup only copy refuse data
             $tobecopied = array('_refuse_email_no_response', '_refuse_email_with_response');
             foreach ($tobecopied as $val) {
                 if (isset($output[$val])) {
                     $tkt[$val] = $output[$val];
                 }
             }
         }
     }
     $tkt = addslashes_deep($tkt);
     return $tkt;
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:101,代码来源:mailcollector.class.php


示例20: eps_random

                    }
                }
            } else {
                $errors[] = $eps_lang['Username_wrong'];
            }
        } else {
            $errors = $epsclass->validate->errors;
            $epsclass->validate->data_reset();
        }
    }
    $_SESSION['visual'] = eps_random(9);
    $req_fields = array('username' => $eps_lang['Username'], 'password' => $eps_lang['Password'], 'confirmcode' => $eps_lang['Visual_confirm']);
    $smarty->assign('js_lang', gen_jslang($req_fields));
    $smarty->assign('error_show', !empty($errors) ? gen_alert($errors) : '');
    $smarty->assign('form_tag', auto_gen_form('index.php?eps=login', 'login', true));
    $smarty->assign('username', isset($_POST['req_username']) ? html_clean($username) : '');
    $smarty->assign('show_title', empty($tiny_method) ? true : false);
    $smarty->assign('size', empty($tiny_method) ? '30' : '15');
    $smarty->assign('antiflood_allow', $epsclass->antiflood->try_allow);
    $smarty->assign('visual', gen_visual($_SESSION['visual'], 6));
    $smarty->assign('auto', isset($auto) ? $auto : false);
    $smarty->assign('forgotpass_link', auto_gen_link('index.php?eps=login&amp;action=fgpass', $eps_lang['Forgot_password'], '', true));
    unset($username, $password, $confirm_code, $username_tmp, $user_id, $db_password, $group_id, $active, $errors, $auto);
    $smarty->display('module/login.tpl');
} else {
    if ($action == 'fgpass') {
        if (isset($_POST['form_sent'])) {
            // Validate
            $email = strtolower(trim($_POST['req_email']));
            $confirm_code = trim($_POST['req_confirmcode']);
            $epsclass->validate->chk_email($email, 0, true);
开发者ID:nqv,项目名称:eposys,代码行数:31,代码来源:login.php



注:本文中的html_clean函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP html_combobox函数代码示例发布时间:2022-05-15
下一篇:
PHP html_checkbox_field函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap