国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

sys_cache_up.php 2.3KB

2 年前
2 年前
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * 清除缓存
  4. *
  5. * @version $id:sys_cache_up.php 16:22 2010年7月20日 tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022 DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. require_once(dirname(__FILE__)."/config.php");
  12. CheckPurview('sys_ArcBatch');
  13. if (empty($dopost)) $dopost = '';
  14. if (empty($step)) $step = 1;
  15. if ($dopost == "ok") {
  16. if (empty($uparc)) $uparc = 0;
  17. if ($step == -1) {
  18. if ($uparc == 0) sleep(1);
  19. ShowMsg("成功更新所有缓存", "javascript:;");
  20. exit();
  21. }
  22. //更新栏目缓存
  23. else if ($step == 1) {
  24. UpDateCatCache();
  25. ClearOptCache();
  26. ShowMsg("成功更新栏目缓存及后台栏目选项,准备更新枚举缓存", "sys_cache_up.php?dopost=ok&step=2&uparc=$uparc");
  27. exit();
  28. }
  29. //更新枚举缓存
  30. else if ($step == 2) {
  31. include_once(DEDEINC."/enums.func.php");
  32. WriteEnumsCache();
  33. //WriteAreaCache(); 已过期
  34. ShowMsg("成功更新枚举缓存,准备更新调用缓存", "sys_cache_up.php?dopost=ok&step=3&uparc=$uparc");
  35. exit();
  36. }
  37. //清理arclist调用缓存、过期会员浏览历史、过期短信
  38. else if ($step == 3) {
  39. echo '<meta http-equiv="Content-Type" content="text/html; charset='.$cfg_soft_lang.'">';
  40. $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache`");
  41. echo "\n成功更新arclist调用缓存,准备清理过期会员浏览历史<hr/>";
  42. $oldtime = time() - (90 * 24 * 3600);
  43. $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE sendtime<'$oldtime' ");
  44. echo "成功清理过期短信,准备修正错误文档,这可能要占较长的时间";
  45. if ($uparc == 1) {
  46. echo "<script>location='sys_cache_up.php?dopost=ok&step=9';</script>";
  47. } else {
  48. echo "<script>location='sys_cache_up.php?dopost=ok&step=-1&uparc=$uparc';</script>";
  49. }
  50. exit();
  51. }
  52. //修正错误文档
  53. else if ($step == 9) {
  54. ShowMsg('修正错误文档操作已经取消,后台系统中系统错误修复中操作', 'sys_cache_up.php?dopost=ok&step=-1&uparc=1', 0, 5000);
  55. exit();
  56. }
  57. }
  58. include DedeInclude('templets/sys_cache_up.htm');
  59. ?>