Exemplo n.º 1
0
        make_article_html("{$webdb['www_url']}/member/post.php?job=endHTML&aid={$aid}&mid={$mid}&only={$only}");
        refreshto("{$FROMURL}", "<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='..{$webdb['path']}/bencandy.php?fid={$fid}&aid={$aid}' target=_blank>查看文章</A>] [<A HREF='?job=manage&aid={$aid}&mid={$mid}&only={$only}'>修改文章</A>]</CENTER>", 60);
    }
    $MSG = '续发文章';
    unset($rsdb[content], $rsdb[subhead]);
    require dirname(__FILE__) . "/" . "head.php";
    if ($mid && file_exists(ROOT_PATH . "data/member_tpl/post_{$mid}.htm")) {
        require ROOT_PATH . "data/member_tpl/post_{$mid}.htm";
    } else {
        require dirname(__FILE__) . "/" . "template/post.htm";
    }
    require dirname(__FILE__) . "/" . "foot.php";
} elseif ($job == 'edit_more') {
    if ($step == 'post') {
        //修改内容
        query_reply($aid, $rid, 'edit');
        //生成静态
        make_article_html("{$webdb['www_url']}/member/post.php?job=endHTML&aid={$aid}&mid={$mid}&only={$only}");
        refreshto("{$FROMURL}", "<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='..{$webdb['path']}/bencandy.php?fid={$fid}&aid={$aid}' target=_blank>查看文章</A>] [<A HREF='?job=edit_more&aid={$aid}&rid={$rid}&mid={$mid}&only={$only}'>修改文章</A>]</CENTER>", 60);
    }
    $MSG = '修改文章';
    require dirname(__FILE__) . "/" . "head.php";
    if ($mid && file_exists(ROOT_PATH . "data/member_tpl/post_{$mid}.htm")) {
        require ROOT_PATH . "data/member_tpl/post_{$mid}.htm";
    } else {
        require dirname(__FILE__) . "/" . "template/post.htm";
    }
    require dirname(__FILE__) . "/" . "foot.php";
}
/**
*用户组选择
Exemplo 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);
    //定时发布
}