Browse Source

调整缓存样式

tags/6.2.5
tianya 2 years ago
parent
commit
cd1e09663b
2 changed files with 7 additions and 5 deletions
  1. +5
    -3
      src/admin/sys_cache_up.php
  2. +2
    -2
      src/system/common.func.php

+ 5
- 3
src/admin/sys_cache_up.php View File

@@ -38,13 +38,15 @@ if ($dopost == "ok") {
else if ($step == 3) {
echo '<meta http-equiv="Content-Type" content="text/html; charset='.$cfg_soft_lang.'">';
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache`");
echo DedeAlert("成功更新arclist调用缓存,准备清理过期会员浏览历史", ALERT_INFO);
$msg = array();
$msg[] = "成功更新arclist调用缓存,准备清理过期会员浏览历史";
$oldtime = time() - (90 * 24 * 3600);
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE sendtime<'$oldtime' ");
echo DedeAlert("成功清理过期短信,准备修正错误文档,这可能要占较长的时间", ALERT_INFO);
$msg[] = "成功清理过期短信,准备修正错误文档,这可能要占较长的时间";
$limit = date('Ymd', strtotime('-15 days'));
$dsql->ExecuteNoneQuery("DELETE FROM `#@__statistics_detail` WHERE created_date < '$limit'");
echo DedeAlert("成功清空15天之前的流量统计数据", ALERT_INFO);
$msg[] = "成功清空15天之前的流量统计数据";
echo DedeAlert(implode("<br/>",$msg), ALERT_INFO, TRUE);
if ($uparc == 1) {
echo "<script>location='sys_cache_up.php?dopost=ok&step=9';</script>";
} else {


+ 2
- 2
src/system/common.func.php View File

@@ -30,9 +30,9 @@ define('ALERT_COLORS', array(
));
define("ALERT_TPL", '<div style="position:relative;padding:.75rem 1.25rem;width:auto;font-size:12px;color:~color~;background:~background~;border-color:~border~;border:1px solid transparent;border-radius:.2rem">~content~</div>');
//$content:文档,$type:alert类型
function DedeAlert($content, $type = ALERT_PRIMARY)
function DedeAlert($content, $type = ALERT_PRIMARY, $isHTML=false)
{
$content = htmlspecialchars($content);
$content = $isHTML? RemoveXSS($content) : htmlspecialchars($content);
$colors = isset(ALERT_COLORS[$type])? ALERT_COLORS[$type] : ALERT_COLORS[ALERT_PRIMARY];
list($background, $border, $color) = $colors;
return str_replace(array('~color~','~background~','~border~', '~content~'),array($color,$background,$border,$content),ALERT_TPL);


Loading…
Cancel
Save