function DelSearchLoadTb($lid, $userid, $username) { global $empire, $dbtbpre; $lid = (int) $lid; if (!$lid) { printerror("NotDelSearchLoadTbid", "history.go(-1)"); } //操作权限 CheckLevel($userid, $username, $classid, "searchall"); $r = $empire->fetch1("select tbname from {$dbtbpre}enewssearchall_load where lid='{$lid}'"); if (!$r['tbname']) { printerror("NotDelSearchLoadTbid", "history.go(-1)"); } $sql = $empire->query("delete from {$dbtbpre}enewssearchall_load where lid='{$lid}'"); $classids = ReturnTbGetClassids($r['tbname']); if ($classids) { $delsql = $empire->query("delete from {$dbtbpre}enewssearchall where classid in (" . $classids . ")"); } GetSearchAllTb(); if ($sql) { //操作日志 insert_dolog("lid=" . $lid . "&tbname=" . $r['tbname']); printerror("DelSearchLoadTbSuccess", "ListSearchLoadTb.php" . hReturnEcmsHashStrHref2(1)); } else { printerror("DbError", "history.go(-1)"); } }
function Moreport_ChangeData($portr, $ecms = 0) { global $empire, $dbtbpre, $public_r, $ecms_config; $ecms_config['sets']['deftempid'] = $portr['tempgid']; if ($ecms == 1) { GetPlTempPage(); //评论列表模板 GetPlJsPage(); //评论JS模板 ReCptemp(); //控制面板模板 GetSearch(); //三搜索表单模板 GetPrintPage(); //打印模板 GetDownloadPage(); //下载地址页面 ReGbooktemp(); //留言板模板 ReLoginIframe(); //登陆状态模板 ReSchAlltemp(); //全站搜索模板 //防采集缓存 $yfile = ECMS_PATH . DASHBOARD . '/data/dbcache/notcj.php'; $nfile = ECMS_SELFPATH . DASHBOARD . '/data/dbcache/notcj.php'; @copy($yfile, $nfile); } elseif ($ecms == 2) { //临时文件目录 $tmppath = ECMS_SELFPATH . DASHBOARD . '/data/tmp'; $hand = @opendir($tmppath); while ($file = @readdir($hand)) { if ($file == '.' || $file == '..' || $file == 'test.txt' || $file == 'index.html' || $file == 'mod' || $file == 'temp' || $file == 'titlepic' || $file == 'cj') { continue; } $filename = $tmppath . '/' . $file; if (!is_dir($filename)) { DelFiletext($filename); } } } elseif ($ecms == 3) { $ypath = ECMS_PATH . 'd/js'; $npath = ECMS_SELFPATH . 'd/js'; CopyPath($ypath, $npath); $ypath = ECMS_PATH . DASHBOARD . '/data/fc'; $npath = ECMS_SELFPATH . DASHBOARD . '/data/fc'; CopyPath($ypath, $npath); $ypath = ECMS_PATH . DASHBOARD . '/data/html'; $npath = ECMS_SELFPATH . DASHBOARD . '/data/html'; CopyPath($ypath, $npath); $ypath = ECMS_PATH . DASHBOARD . '/data/template'; $npath = ECMS_SELFPATH . DASHBOARD . '/data/template'; CopyPath($ypath, $npath); } elseif ($ecms == 4) { if ($portr['mustdt'] || $public_r['indexpagedt']) { DelFiletext(ECMS_SELFPATH . 'index' . $public_r['indextype']); @copy(ECMS_SELFPATH . DASHBOARD . '/data/template/dtindexpage.txt', ECMS_SELFPATH . 'index.php'); } } else { //更新参数设置 GetConfig(1); //更新类别 GetClass(); //更新会员组 GetMemberLevel(); //更新全站搜索数据表 GetSearchAllTb(); } }
function ChangeEnewsData($userid, $username) { //操作权限 CheckLevel($userid, $username, $classid, "changedata"); //更新参数设置 GetConfig(1); //更新类别 GetClass(); //更新会员组 GetMemberLevel(); //更新全站搜索数据表 GetSearchAllTb(); //操作日志 insert_dolog(""); printerror("ChangeDataSuccess", "history.go(-1)"); }
//全站搜索模板 //生成首页 $indextemp = GetIndextemp(); NewsBq(0, $indextemp, 1, 0); //--- 更新反馈表单 --- $sql = $empire->query("select bid,btemp from {$dbtbpre}enewsfeedbackclass order by bid"); while ($r = $empire->fetch($sql)) { //替换公共变量 $btemp = ReplaceTempvar($r['btemp']); $btemp = str_replace("[!--cp.header--]", "<? include(\"../../data/template/cp_1.php\");?>", $btemp); $btemp = str_replace("[!--cp.footer--]", "<? include(\"../../data/template/cp_2.php\");?>", $btemp); $file = "../tool/feedback/temp/feedback" . $r[bid] . ".php"; $btemp = "<?\r\nif(!defined('InEmpireCMS'))\r\n{exit();}\r\n?>" . $btemp; WriteFiletext($file, $btemp); } //--- 评论表情文件 --- InstallGetPlfaceJs(); echo "更新文件完毕.<script>self.location.href='index.php?enews=success&f=6&defaultdata={$defaultdata}';</script>"; exit; } else { GetConfig(1); //更新参数设置 GetClass(); //更新栏目 GetMemberLevel(); //更新会员组 GetSearchAllTb(); //更新全站搜索数据表 echo "更新数据库缓存完毕.<script>self.location.href='changedata.php?ecms=ChangeInstallOtherData&defaultdata={$defaultdata}';</script>"; exit; }