Esempio n. 1
0
    $Guidedb->GuideFidCache("{$pre}sort");
    write_config_cache();
    write_friendlink();
    write_hackmenu_cache();
    write_group_cache();
    make_module_cache();
    get_htmltype();
    write_limitword_cache();
    write_keyword_cache();
    article_module_cache();
    //更新广告
    if (function_exists('make_ad_cache')) {
        make_ad_cache();
    }
    //自定义内容页文件名
    get_showhtmltype();
    del_file(ROOT_PATH . "cache/jsarticle_cache");
    del_file(ROOT_PATH . "cache/label_cache");
    del_file(ROOT_PATH . "cache/list_cache");
    del_file(ROOT_PATH . "cache/bencandy_cache");
    del_file(ROOT_PATH . "cache/showsp_cache");
    jump("更新完毕", "{$FROMURL}");
} elseif ($action == "repair") {
    set_time_limit(0);
    if (!$page) {
        $page = 1;
        $query = $db->query("SELECT * FROM {$pre}sort");
        while ($rs = $db->fetch_array($query)) {
            $erp = $Fid_db[iftable][$rs[fid]];
            $db->query("UPDATE {$pre}article{$erp} SET fname='{$rs['name']}' WHERE fid='{$rs['fid']}' ");
        }
Esempio n. 2
0
function post_edit()
{
    global $db, $pre, $postdb, $fid, $fidDB, $Fid_db, $mid, $lfjuid, $rsdb, $lfjdb, $webdb, $timestamp, $aid, $FROMURL, $groupdb, $web_admin, $fu_fiddb;
    if ($rsdb[levels] && $postdb[levels]) {
        $postdb[levels] = $rsdb[levels];
        //处理其他级别2,3,4...以防出错
    }
    if ($postdb[top]) {
        $postdb['list'] = $rsdb['list'] > $timestamp ? $rsdb['list'] : $timestamp * 1.3;
    } else {
        $postdb['list'] = $rsdb['list'] > $timestamp ? $timestamp : $rsdb['list'];
    }
    if (!$web_admin && $groupdb[EditPassPower] == 1) {
        $postdb[yz] = '';
    }
    $erp = $Fid_db[iftable][$fid];
    $db->query("UPDATE `{$pre}article{$erp}` SET title='{$postdb['title']}',smalltitle='{$postdb['smalltitle']}',fid='{$fid}',fname='{$fidDB['name']}',hits='{$postdb['hits']}',posttime='{$postdb['posttime']}',list='{$postdb['list']}',author='{$postdb['author']}',copyfrom='{$postdb['copyfrom']}',copyfromurl='{$postdb['copyfromurl']}',titlecolor='{$postdb['titlecolor']}',fonttype='{$postdb['fonttype']}',picurl='{$postdb['picurl']}',ispic='{$postdb['ispic']}',yz='{$postdb['yz']}',levels='{$postdb['levels']}',keywords='{$postdb['keywords']}',jumpurl='{$postdb['jumpurl']}',iframeurl='{$postdb['iframeurl']}',style='{$postdb['style']}',template='{$postdb['template']}',target='{$postdb['target']}',money='{$postdb['money']}',passwd='{$postdb['passwd']}',editer='{$userdb['username']}',edittime='{$timestamp}',begintime='{$postdb['begintime']}',endtime='{$postdb['endtime']}',description='{$postdb['description']}',allowview='{$postdb['allowview']}',allowdown='{$postdb['allowdown']}',htmlname='{$postdb['htmlname']}',forbidcomment='{$postdb['forbidcomment']}',goods_sn='{$postdb['goods_sn']}' WHERE aid='{$aid}' ");
    if ($postdb[htmlname] != $rsdb[htmlname]) {
        //自定义内容页文件名
        get_showhtmltype();
    }
    //辅栏目处理
    query_fu_sort($fu_fiddb, $aid);
    //修改内容
    query_reply($aid, $rsdb[rid], 'edit');
    //财富处理
    if (!$postdb[yz] && $rsdb[yz]) {
        Give_article_money($lfjuid, 'unyz', $rsdb);
    }
    if (!$postdb[levels] && $rsdb[levels]) {
        Give_article_money($lfjuid, 'uncom', $rsdb);
    }
    //添加关键字
    if ($rsdb[keywords] != $postdb[keywords]) {
        keyword_del($aid, $rsdb[keywords]);
        keyword_add($aid, $postdb[keywords], $lfjdb[uid]);
    }
    if ($rsdb[ifvote]) {
        edit_vote($aid);
    }
    //删除缓存文件
    delete_cache_file($fid, $aid);
    corntab_post('DE');
    corntab_post('EN', $aid);
    //定时发布
}