if (empty($step)) { $step = 1; } if ($dopost == "ok") { if (empty($uparc)) { $uparc = 0; } if ($step == -1) { if ($uparc == 0) { sleep(1); } ShowMsg("成功更新所有缓存!", "javascript:;"); exit; } else { if ($step == 1) { UpDateCatCache(); ClearOptCache(); ShowMsg("成功更新栏目缓存,及后台栏目选项,准备更新枚举缓存...", "sys_cache_up.php?dopost=ok&step=2&uparc={$uparc}"); exit; } else { if ($step == 2) { include_once DEDEINC . "/enums.func.php"; WriteEnumsCache(); //WriteAreaCache(); 已过期 ShowMsg("成功更新枚举缓存,准备更新调用缓存...", "sys_cache_up.php?dopost=ok&step=3&uparc={$uparc}"); exit; } else { if ($step == 3) { echo '<meta http-equiv="Content-Type" content="text/html; charset=' . $cfg_soft_lang . '">'; $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache`"); echo "\n成功更新arclist调用缓存,准备清理过期会员访问历史...<hr />";
CheckPurview('sys_MakeHtml'); $dsql = new DedeSql(false); $cids = ''; $dsql->SetQuery("Select ID From `#@__channeltype` "); $dsql->Execute(); while($row = $dsql->GetArray()) { $cids .= ($cids=='' ? $row[0] : ','.$row[0]); } if($cids!='') { $rs = $dsql->ExecuteNoneQuery("Delete From `#@__arctype` where NOT (channeltype in ($cids));"); if($rs>0){ $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `#@__arctype`;"); UpDateCatCache($dsql); } $rs = $dsql->ExecuteNoneQuery("Delete From `#@__full_search` where NOT (channeltype in ($cids));"); if($rs>0) $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `#@__full_search`;"); $rs = $dsql->ExecuteNoneQuery("Delete From `#@__archives` where NOT (channel in ($cids));"); if($rs>0) $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `#@__archives`;"); $rs = $dsql->ExecuteNoneQuery("Delete From `#@__archivesspec` where NOT (channel in ($cids));"); if($rs>0) $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `#@__archivesspec`;"); } ShowMsg("完成所有信息清理!","javascript:;"); ClearAllLink();