Exemplo n.º 1
0
    } else {
        //JS式会拖慢主页面打开速度,不推荐
        echo "document.write('{$show}');";
    }
    exit;
} elseif ($type == 'sonfid') {
    $fid && ($rs = $db->get_one("SELECT fup FROM {$pre}spsort WHERE fid='{$fid}'"));
    $show = get_fidName($rs[fup], $rows, $class ? $class : 3);
    if (!$show) {
        $show = "暂无...";
    }
    //真静态
    if ($webdb[NewsMakeHtml] == 1 || $gethtmlurl) {
        $show = make_html($show, $pagetype = 'N');
    } elseif ($webdb[NewsMakeHtml] == 2) {
        $show = fake_html($show);
    }
    if ($webdb[RewriteUrl] == 1) {
        //全站伪静态
        rewrite_url($show);
    }
    $show = "<ul>{$show}</ul>";
    $show = str_Replace("'", '"', $show);
    $show = str_Replace("\r", '', $show);
    $show = str_Replace("\n", '', $show);
    $show = "document.write('{$show}');";
    echo $show;
} else {
    die("document.write('指定的类型不存在');");
}
function get_fid($fid)
Exemplo n.º 2
0
}
//过滤不良词语
$rsdb[content] = replace_bad_word($rsdb[content]);
$rsdb[title] = replace_bad_word($rsdb[title]);
$rsdb[subhead] = replace_bad_word($rsdb[subhead]);
//多模型扩展接口
@(include ROOT_PATH . "inc/bencandy_{$rsdb[mid]}.php");
require ROOT_PATH . "inc/head.php";
require $chdb[main_tpl];
require ROOT_PATH . "inc/foot.php";
/*处理伪静态*/
if ($webdb[NewsMakeHtml] == 2) {
    $content = ob_get_contents();
    ob_end_clean();
    ob_start();
    $content = fake_html($content);
    echo "{$content}";
}
if (!$jobs && $webdb[bencandy_cache_time] && time() - filemtime($Cache_FileName) > $webdb[bencandy_cache_time] * 60) {
    if (!is_dir(dirname($Cache_FileName))) {
        makepath(dirname($Cache_FileName));
    }
    $content .= "<SCRIPT LANGUAGE='JavaScript' src='{$webdb['www_url']}/do/job.php?job=updatehits&aid={$id}'></SCRIPT>";
    write_file($Cache_FileName, $content);
} elseif ($jobs == 'show') {
    @unlink($Cache_FileName);
}
/**
*文章检查
**/
function check_article(&$rsdb)