Пример #1
0
}
if ($fidDB && !$web_admin && !in_array($groupdb[gid], explode(',', $fidDB[allowpost]))) {
    showerr("你所在用户组无权在本栏目“{$fidDB[name]}”有任何操作");
}
if (!$lfjid && $job != 'postnew') {
    showerr("游客无权操作");
}
$atc_power = 0;
if ($lfjid) {
    if ($web_admin || $lfjuid == $rsdb[uid]) {
        $atc_power = 1;
    }
}
$uid = isset($rsdb[uid]) ? $rsdb[uid] : $lfjuid;
if ($job == 'endHTML') {
    $htmlurldb = get_html_url();
    //首页生成静态
    @unlink(ROOT_PATH . "index.htm.bak");
    rename(ROOT_PATH . "index.htm", ROOT_PATH . "index.htm.bak");
    refreshto("myarticle.php?job=myarticle&mid={$mid}&only={$only}", "<CENTER>[<A HREF='?job=postnew&fid={$fid}&mid={$mid}&only={$only}'>发表新主题</A>] [<A HREF='?job=post_more&aid={$aid}&mid={$mid}&only={$only}'>续发本主题</A>] [<A HREF='myarticle.php?job=myarticle&fid={$fid}&mid={$mid}&only={$only}'>返回文章列表</A>] [<A HREF='{$htmlurldb[showurl]}' target=_blank>查看文章</A>] [<A HREF='?job=manage&aid={$aid}&mid={$mid}&only={$only}'>修改文章</A>]</CENTER><div style='display:none;'><iframe src='{$webdb['www_url']}/do/job.php?job=article_html&fid={$fid}&aid={$aid}' width=0 height=0></iframe></div>", 60);
} elseif ($job == 'manage') {
    if (!$atc_power) {
        showerr("你没权限");
    }
    if ($rsdb[pages] < 2) {
        header("location:post.php?job=edit&aid={$aid}&mid={$mid}&only={$only}");
        exit;
    }
    $erp = get_id_table($aid);
    if ($step == 2) {
        asort($orderDB);
Пример #2
0
$fidDB = $db->get_one("SELECT S.*,M.alias AS M_alias,M.keywords AS M_keyword,M.config AS M_config FROM {$pre}sort S LEFT JOIN {$pre}article_module M ON S.fmid=M.id WHERE S.fid='{$fid}'");
$fidDB[M_alias] || ($fidDB[M_alias] = '文章');
$fidDB[M_config] = unserialize($fidDB[M_config]);
$fidDB[config] = unserialize($fidDB[config]);
$FidTpl = unserialize($fidDB[template]);
$fupId = intval($fidDB[type] ? $fid : $fidDB[fup]);
//禁止访问动态页
if ($webdb[ForbidShowPhpPage] && !$NeedCheck && !$jobs) {
    if ($webdb[NewsMakeHtml] == 2 && ereg("=[0-9]+\$", $WEBURL)) {
        //伪静态
        eval("\$url=\"{$webdb['bencandy_filename2']}\";");
        header("location:{$webdb['www_url']}/{$url}");
        exit;
    } elseif ($webdb[NewsMakeHtml] == 1) {
        //真静态
        $detail = get_html_url();
        if (is_file(ROOT_PATH . $detail[_showurl])) {
            header("location:{$detail['showurl']}");
            exit;
        }
    }
}
/**
*文章检查
**/
check_article($rsdb);
//统计点击次数
$db->query("UPDATE {$pre}article{$erp} SET hits=hits+1,lastview='{$timestamp}' WHERE aid='{$aid}'");
//SEO
$titleDB[title] = filtrate(strip_tags("{$rsdb['title']} - {$fidDB['name']} - {$webdb['webname']}"));
$titleDB[keywords] = filtrate($rsdb[keywords]);