} } //对发表前与发表前做处理 require_once ROOT_PATH . "inc/check.postarticle.php"; if ($job == 'postnew') { if ($step == 'post') { post_new(); //生成静态 make_article_html("{$webdb['www_url']}/member/post.php?job=endHTML&aid={$aid}&mid={$mid}&only={$only}"); $mid && $mid < 106 && ($none = 'none'); refreshto("?job=postnew&fid={$fid}&mid={$mid}&only={$only}", "<CENTER>[<A HREF='?job=postnew&fid={$fid}&mid={$mid}&only={$only}'>继续发表新主题</A>] <span style='display:{$none};'>[<A HREF='?job=post_more&fid={$fid}&mid={$mid}&aid={$aid}&only={$only}'>续发本主题</A>]</span> [<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&aid={$aid}&mid={$mid}&only={$only}'>点击修改</A>]</CENTER>", 60); } $MSG = '新发表内容'; //$select_fid=list_post_selectsort(0,$fid,$mid,$only); if ($webdb[sortNUM] > 500) { $select_fid = $Guidedb->Select("{$pre}sort", "fid", $fid, '', 0); } else { $select_fid = $Guidedb->SelectIn("{$pre}sort", 0, $fid); } 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') { if ($rsdb[yz] && !$web_admin && $groupdb[EditPassPower] == 2) { showerr("已审核的文章,你不能再修改"); } if ($step == 'post') {
$listdb[] = $rs; } require dirname(__FILE__) . "/" . "head.php"; require dirname(__FILE__) . "/" . "template/special/listsp.htm"; require dirname(__FILE__) . "/" . "foot.php"; } elseif ($job == "editsp") { $rsdb = $db->get_one("SELECT * FROM {$pre}special WHERE uid={$lfjuid} AND id='{$id}'"); if ($step == 2) { if ($rsdb[picurl] && $rsdb[picurl] != $postdb[picurl]) { delete_attachment($lfjdb[uid], $rsdb[picurl]); } $db->query("UPDATE {$pre}special SET title='{$postdb['title']}',fid='{$postdb['fid']}',picurl='{$postdb['picurl']}',content='{$postdb['content']}',allowpost='{$postdb['allowpost']}',banner='{$postdb['banner']}' WHERE uid={$lfjuid} AND id='{$id}'"); refreshto("special.php?job=listsp", "修改成功", 1); } $group_post = group_box("postdb[allowpost]", explode(",", $rsdb[allowpost])); $sort_fid = $Guidedb->Select("{$pre}spsort", "postdb[fid]", $rsdb[fid], ""); $MSG = '修改专题'; require dirname(__FILE__) . "/" . "head.php"; require dirname(__FILE__) . "/" . "template/special/editsp.htm"; require dirname(__FILE__) . "/" . "foot.php"; } elseif ($job == 'delsp') { $rsdb = $db->get_one("SELECT * FROM {$pre}special WHERE uid='{$lfjuid}' AND id='{$id}'"); delete_attachment($lfjdb[uid], $rsdb[picurl]); $db->query("DELETE FROM {$pre}special WHERE uid={$lfjuid} AND id='{$id}'"); refreshto("special.php?job=listsp", "删除成功", 1); } elseif ($job == 'addsp') { if ($step == 2) { $yz = $groupdb[PassContributeSP] || $web_admin ? 1 : 0; $db->query("INSERT INTO `{$pre}special` ( `fid` , `title` , `style` , `template` , `picurl` , `content` ,`uid` , `username` , `posttime` , `list`, `allowpost`, `yz`, `banner` ) VALUES ('{$postdb['fid']}','{$postdb['title']}','{$style}','','{$postdb['picurl']}','{$postdb['content']}','{$lfjuid}','{$lfjid}','{$timestamp}','{$timestamp}','{$postdb['allowpost']}','{$yz}','{$postdb['banner']}')"); refreshto("special.php?job=listsp", "创建专题成功", 1); }
$listdb[] = $rs; } if (!$listdb) { showerr("很抱歉,没有找到你要查询的内容"); } $typedb[$type] = ' selected '; } $module_select = "<select name='mid' onChange=\"window.location.href='?mid='+this.options[this.selectedIndex].value\"><option value='0' style='color:#aaa;'>所有模型</option>"; $query = $db->query("SELECT * FROM {$pre}article_module WHERE ifclose=0 ORDER BY list DESC"); while ($rs = $db->fetch_array($query)) { $ckk = $mid == $rs[id] ? ' selected ' : ' '; $module_select .= "<option value='{$rs['id']}' {$ckk}>{$rs['name']}</option>"; } $module_select .= "</select>"; if ($webdb[sortNUM] > 500) { $fid_select = $Guidedb->Select("{$pre}sort", "fid", $fid, '', 0); } else { $fid_select = "<select name='fid' onChange=\"if(this.options[this.selectedIndex].value=='-1'){alert('你不能选择大分类');}\"><option value='0' style='color:#aaa;'>所有栏目</option>"; $fid_select .= list_allsort(0, 1, $fid, $mid); $fid_select .= "</select>"; } $type || ($type = 'title'); $typedb[$type] = " checked "; require ROOT_PATH . "inc/head.php"; require html($mid ? "search_{$mid}" : "search"); require ROOT_PATH . "inc/foot.php"; //伪静态 if ($webdb[NewsMakeHtml] == 2) { $content = ob_get_contents(); ob_end_clean(); ob_start();
//}else{ // make_more_article_html("$FROMURL",$Type,$aidDB); //} if ($webdb[NewsMakeHtml] == 1) { refreshto("{$FROMURL}", "操作成功<div style='display:none;'><iframe src='{$webdb['www_url']}/do/job.php?job=article_html{$fid_str}' width=0 height=0></iframe></div>", 3); } refreshto("{$FROMURL}", "操作成功", 1); } $linkdb = array("全部文章" => "?", "已审核的文章" => "?Type=yz&fid={$fid}", "未审核的文章" => "?Type=unyz&fid={$fid}", "回收站" => "?Type=rubbish&fid={$fid}", "精华文章" => "?Type=levels&fid={$fid}", "有缩略图的文章" => "?Type=pic&fid={$fid}"); $fid = intval($fid); unset($fiddb); //超级管理员 if ($web_admin) { require ROOT_PATH . "inc/class.inc.php"; $Guidedb = new Guide_DB(); $sort_fid = $Guidedb->Select("{$pre}sort", "fid", $fid); if ($fid) { $_SQL = " WHERE fid={$fid} "; } else { $_SQL = " WHERE 1 "; } } else { $sort_fid = "<select name='fid'><option value=''>所有栏目</option>"; $query = $db->query("SELECT * FROM {$pre}sort WHERE admin!=''"); while ($rs = $db->fetch_array($query)) { $detail = explode(",", $rs[admin]); if (in_array($lfjid, $detail)) { $fiddb[] = $rs[fid]; if ($fid == $rs[fid]) { $_selected = " selected "; } else {