Example #1
0
    $main_tpl = "template/default/none.htm";
    $foot_tpl = "template/default/iframe.htm";
} else {
    $showTpl = unserialize($rsdb[template]);
    $head_tpl = $showTpl[head] ? $showTpl[head] : $FidTpl['head'];
    $main_tpl = $showTpl[bencandy] ? $showTpl[bencandy] : $FidTpl['bencandy'];
    $foot_tpl = $showTpl[foot] ? $showTpl[foot] : $FidTpl['foot'];
}
//附件真实地址还原
$rsdb[content] = En_TruePath($rsdb[content], 0, 1);
require_once ROOT_PATH . "inc/encode.php";
//文件下载
//<div><a style="COLOR: red" href="http://1.com/upload_files/other/1_20070729020722_YmI=.rar" target=_blank p8name="p8download">点击下载</a></div>
$rsdb[content] = preg_replace("/<IMG src=\"([^\"]+)\" border=0><A href=\"([^\"]+)\" target=_blank>([^<>]+)<\\/A>/eis", "encode_fileurl('\\1','\\2','\\3')", $rsdb[content]);
$rsdb[content] = preg_replace("/<([^<>]+)href=\"([^\"]+)\"([^<>]+)p8name=\"p8download\"([^<>]*)>([^<>]+)<\\/A>/eis", "encode_fileurl('','\\2','\\5')", $rsdb[content]);
$rsdb[content] = show_keyword($rsdb[content]);
//突出显示关键字
$IS_BIZ && AvoidGather();
//防采集处理
$rsdb[posttime] = date("Y-m-d H:i:s", $rsdb[posttime]);
if ($rsdb[copyfromurl] && !strstr($rsdb[copyfromurl], "http://")) {
    $rsdb[copyfromurl] = "http://{$rsdb['copyfromurl']}";
}
//文章分布
$showpage = getpage("", "", "bencandy.php?fid={$fid}&aid={$aid}", 1, $rsdb[pages]);
/**
*上一篇与下一篇,比较影响速度
**/
$nextdb = $db->get_one("SELECT title,aid,fid FROM {$pre}article{$erp} WHERE aid<'{$id}' AND fid='{$fid}' AND yz=1 ORDER BY aid DESC LIMIT 1");
$nextdb[subject] = get_word($nextdb[title], 34);
$backdb = $db->get_one("SELECT title,aid,fid FROM {$pre}article{$erp} WHERE aid>'{$id}' AND fid='{$fid}' AND yz=1 ORDER BY aid ASC LIMIT 1");
Example #2
0
     $content = preg_replace("/ alt=([^ >]+)/is", "", $content);
     foreach ($keyList as $key => $value) {
         //$content=str_replace($key,"<a href=$value style=text-decoration:underline;font-size:14px;color:{$webdb[ShowKeywordColor]}; target=_blank>$key</a>",$content);
         //$keyword = $value['title'];
         if ($value['replacenum'] == 0) {
             $content = str_replace($value['title'], '<a href=' . $value['linkurl'] . ' target=_blank>' . $value['title'] . '</a>', $content);
         } else {
             $content = preg_replace('/' . $value['title'] . '/is', '<a href=' . $value['linkurl'] . ' target=_blank>' . $value['title'] . '</a>', $content, $value['replacenum']);
         }
     }
     return $content;
 }
 $timeNow = time();
 $keyWhere = "(starttime < {$timeNow} or starttime = NUll or starttime = 0) and (endtime > {$timeNow}  or endtime = NUll or endtime = 0)";
 $keyList = $keys->GetList(array('id', 'linkurl', 'title', 'orders', 'replacenum'), '', '', $keyWhere, 'orders desc,id desc');
 $info['content'] = show_keyword($info['content'], $keyList);
 //=========================================
 //
 $time = time();
 $templatefile = 'articles_show.tpl.php';
 if ($config['customtemplatemode'] == 1) {
     //==========个性化模版检测20111208===============
     $custom_templates = '';
     $custom_templates = $c . '_' . $a . '_classid_' . $info['classid'] . '.tpl.php';
     if (is_file(WEB_TPL . 'custom_templates/' . $custom_templates)) {
         $templatefile = 'custom_templates/' . $custom_templates;
     }
     //==========个性化模版检测20120305===============
     $custom_templates_s = '';
     $custom_templates_s = $c . '_' . $a . '_id_' . $info['id'] . '.tpl.php';
     if (is_file(WEB_TPL . 'custom_templates/' . $custom_templates_s)) {
<form action="<?php 
echo $myurl;
?>
" method="GET">
<?php 
show_orderby_select();
show_order_select();
show_year_select();
if ($GLOBALS['wp_arc_display_categories']) {
    show_category_select();
}
if ($GLOBALS['wp_arc_display_authors']) {
    show_author_select();
}
if ($GLOBALS['wp_arc_display_keyword']) {
    show_keyword();
}
?>
<input type="submit" name="submit" value="<?php 
echo _LANG_NKA_ACTION_SORT;
?>
" />
</form>
<?php 
post_count_exceeds();
if ($posts) {
    foreach ($posts as $post) {
        start_wp();
        archive_header($post, '<h3>', '</h3>');
        archive_date($post, 'Y/m/d H:i');
        ?>