@(include ROOT_PATH . "data/guideSP_fid.php"); //专题栏目配置文件 if (!$fid && $webdb[NewsMakeHtml] == 2) { //伪静态处理 Explain_HtmlUrl(); } $GuideFid[$fid] = str_replace("list.php?fid=", "listsp.php?fid=", $GuideFid[$fid]); //栏目配置文件 $fidDB = $db->get_one("SELECT * FROM {$pre}spsort WHERE fid='{$fid}'"); if (!$fidDB) { showerr("栏目有误"); } $fidDB[config] = unserialize($fidDB[config]); //强制跳转到静态页 if ($webdb[ForbidShowPhpPage] && !$NeedCheck) { $detail = get_SPhtml_url($fidDB); if (is_file(ROOT_PATH . $detail[listurl])) { header("location:{$detail['listurl']}"); exit; } } //SEO $titleDB[title] = filtrate("{$fidDB['name']} - {$webdb['webname']}"); $titleDB[keywords] = filtrate("{$fidDB['metakeywords']} {$webdb['metakeywords']}"); $titleDB[description] = filtrate("{$fidDB['descrip']}"); //以栏目风格为标准 $fidDB[style] && ($STYLE = $fidDB[style]); /*模板*/ $FidTpl = unserialize($fidDB[template]); $head_tpl = $FidTpl['head']; $foot_tpl = $FidTpl['foot'];
if (!$rsdb) { showerr("数据不存在!"); } elseif ($rsdb[yz] != 1) { if (!$web_admin && $lfjuid != $rsdb[uid]) { showerr("还没有通过审核"); } } /** *栏目配置文件 **/ $fidDB = $db->get_one("SELECT * FROM {$pre}spsort WHERE fid='{$fid}'"); $fidDB[config] = unserialize($fidDB[config]); $FidTpl = unserialize($fidDB[template]); //强制跳转到静态页 if ($webdb[ForbidShowPhpPage] && !$NeedCheck) { $detail = get_SPhtml_url($fidDB, $id, $rsdb[posttime]); if (is_file(ROOT_PATH . $detail[showurl])) { header("location:{$detail['showurl']}"); exit; } } //风格 $STYLE = $rsdb[style] ? $rsdb[style] : ($fidDB[style] ? $fidDB[style] : $STYLE); /** *模板选择 **/ $showTpl = unserialize($rsdb[template]); $head_tpl = $showTpl[head] ? $showTpl[head] : $FidTpl['head']; $main_tpl = $showTpl[bencandy] ? $showTpl[bencandy] : $FidTpl['bencandy']; $foot_tpl = $showTpl[foot] ? $showTpl[foot] : $FidTpl['foot']; $chdb[main_tpl] = html("showsp", $main_tpl);
$db->query("UPDATE `{$pre}special` SET fid='{$postdb['fid']}',title='{$postdb['title']}',picurl='{$postdb['picurl']}',content='{$postdb['content']}',style='{$postdb['style']}',template='{$postdb['template']}',list='{$postdb['list']}',banner='{$postdb['banner']}',allowpost='{$postdb['allowpost']}',ifbase='{$postdb['ifbase']}',htmlname='{$postdb['htmlname']}',keywords='{$postdb['keywords']}' WHERE id='{$id}' "); get_htmltype(); jump("修改成功!", "{$FROMURL}"); } elseif ($action == "delete" && $Apower[special_list]) { if ($id) { $idDB[] = $id; } if (!$idDB) { showmsg("请选择一个专题"); } $query = $db->query("SELECT * FROM `{$pre}special` WHERE id IN (" . implode(",", $idDB) . ")"); while ($rs = $db->fetch_array($query)) { delete_attachment($rs[uid], tempdir($rs[picurl])); delete_attachment($rs[uid], tempdir($rs[banner])); $fidDB = $db->get_one("SELECT * FROM {$pre}spsort WHERE fid='{$rs['fid']}'"); $array = get_SPhtml_url($fidDB, $rs[id], $rs[posttime]); $array[showurl] = str_replace("{$webdb['www_url']}/", ROOT_PATH, $array[showurl]); $array[listurl] = str_replace("{$webdb['www_url']}/", ROOT_PATH, $array[listurl]); @unlink($array[showurl]); @unlink($array[listurl]); $db->query(" DELETE FROM `{$pre}special` WHERE id='{$rs['id']}' "); $db->query(" DELETE FROM `{$pre}label` WHERE ch='0' AND pagetype='11' AND module='0' AND fid='{$rs['id']}' AND chtype='0' "); } jump("删除成功", $FROMURL); } elseif ($job == "com" && $Apower[special_list]) { $db->query("UPDATE `{$pre}special` SET levels='{$levels}',levelstime='{$timestamp}' WHERE id='{$id}' "); jump("处理成功", $FROMURL, 0); } elseif ($job == "yz" && $Apower[special_list]) { $db->query("UPDATE `{$pre}special` SET yz='{$yz}' WHERE id='{$id}' "); jump("处理成功", $FROMURL, 0); } elseif ($job == "edit_bbs" && $Apower[special_list]) {