From 753efe8d86bdf7ae70587136264acaf247981a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?= <2449271624@qq.com> Date: Fri, 17 Nov 2023 11:10:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E7=A3=A8=E5=88=86=E9=A1=B5=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B8=85=E7=90=86=E7=BC=93=E5=AD=98=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/inc/inc_action_info.php | 40 ++++++++++++------------- src/admin/inc/inc_archives_all.php | 14 ++++----- src/admin/sys_cache_up.php | 19 +++++++++++- src/system/archive/freelist.class.php | 2 +- src/system/archive/listview.class.php | 15 +++++----- src/system/archive/searchview.class.php | 4 +-- src/system/archive/sglistview.class.php | 4 +-- src/system/archive/specview.class.php | 22 +++++++------- src/system/archive/taglist.class.php | 4 +-- 9 files changed, 69 insertions(+), 55 deletions(-) diff --git a/src/admin/inc/inc_action_info.php b/src/admin/inc/inc_action_info.php index fd83ec79..35d8945b 100644 --- a/src/admin/inc/inc_action_info.php +++ b/src/admin/inc/inc_action_info.php @@ -52,7 +52,7 @@ $actionSearch[0] = array( ) ) ); -$actionSearch[2] = array( +$actionSearch[1] = array( 'title' => '附件管理', 'soniterm' => array( 0 => array( @@ -67,7 +67,7 @@ $actionSearch[2] = array( ), ) ); -$actionSearch[3] = array( +$actionSearch[2] = array( 'title' => '文档模型', 'soniterm' => array( 0 => DEDEBIZ_SAFE_MODE? null : array( @@ -90,19 +90,19 @@ $actionSearch[3] = array( 'purview' => 'c_List', 'linkurl' => 'freelist_main.php' ), - 3 => array( + 4 => array( 'title' => '自定义文档属性', 'purview' => 'sys_Att', 'linkurl' => 'content_att.php' ), - 4 => array( + 5 => array( 'title' => '自定义表单管理', 'purview' => 'c_List', 'linkurl' => 'diy_main.php' ), ) ); -$actionSearch[4] = array( +$actionSearch[3] = array( 'title' => '批量维护', 'soniterm' => array( 0 => array( @@ -115,29 +115,29 @@ $actionSearch[4] = array( 'purview' => 'sys_ArcBatch', 'linkurl' => 'article_test_same.php' ), - 3 => array( + 2 => array( 'title' => '文档关键词维护', 'purview' => 'sys_Keyword', 'linkurl' => 'article_keywords_main.php' ), - 4 => array( + 3 => array( 'title' => '搜索关键词维护', 'purview' => 'sys_Keyword', 'linkurl' => 'search_keywords_main.php?dopost=filemanager' ), - 5 => array( + 4 => array( 'title' => '自动摘要分页', 'purview' => 'sys_Keyword', 'linkurl' => 'article_description_main.php' ), - 6 => DEDEBIZ_SAFE_MODE? null : array( + 5 => DEDEBIZ_SAFE_MODE? null : array( 'title' => '数据库字段替换', 'purview' => 'sys_ArcBatch', 'linkurl' => 'sys_data_replace.php' ), ) ); -$actionSearch[5] = array( +$actionSearch[4] = array( 'title' => '会员管理', 'soniterm' => array( 0 => array( @@ -162,7 +162,7 @@ $actionSearch[5] = array( ), ) ); -$actionSearch[6] = array( +$actionSearch[5] = array( 'title' => '支付工具', 'soniterm' => array( 0 => array( @@ -192,7 +192,7 @@ $actionSearch[6] = array( ), ) ); -$actionSearch[7] = array( +$actionSearch[6] = array( 'title' => '更新任务', 'soniterm' => array( 0 => array( @@ -227,7 +227,7 @@ $actionSearch[7] = array( ), ) ); -$actionSearch[8] = DEDEBIZ_SAFE_MODE? null : array( +$actionSearch[7] = DEDEBIZ_SAFE_MODE? null : array( 'title' => '模板管理', 'soniterm' => array( 0 => array( @@ -257,7 +257,7 @@ $actionSearch[8] = DEDEBIZ_SAFE_MODE? null : array( ), ) ); -$actionSearch[9] = array( +$actionSearch[8] = array( 'title' => '系统设置', 'soniterm' => array( 0 => array( @@ -280,32 +280,32 @@ $actionSearch[9] = array( 'purview' => 'sys_Log', 'linkurl' => 'log_list.php' ), - 5 => array( + 4 => array( 'title' => '图片水印设置', 'purview' => 'sys_Edit', 'linkurl' => 'sys_info_mark.php' ), - 6 => array( + 5 => array( 'title' => '软件下载设置', 'purview' => 'sys_SoftConfig', 'linkurl' => 'soft_config.php' ), - 7 => DEDEBIZ_SAFE_MODE? null : array( + 6 => DEDEBIZ_SAFE_MODE? null : array( 'title' => '数据库备份还原', 'purview' => 'sys_data', 'linkurl' => 'sys_data.php' ), - 8 => DEDEBIZ_SAFE_MODE? null : array( + 7 => DEDEBIZ_SAFE_MODE? null : array( 'title' => 'SQL命令工具', 'purview' => 'sys_data', 'linkurl' => 'sys_sql_query.php' ), - 9 => array( + 8 => array( 'title' => '文件扫描工具', 'purview' => 'sys_verifies', 'linkurl' => 'sys_safetest.php' ), - 10 => array( + 9 => array( 'title' => '系统修复工具', 'purview' => 'sys_verifies', 'linkurl' => 'sys_repair.php' diff --git a/src/admin/inc/inc_archives_all.php b/src/admin/inc/inc_archives_all.php index e3598008..37430bdd 100644 --- a/src/admin/inc/inc_archives_all.php +++ b/src/admin/inc/inc_archives_all.php @@ -18,10 +18,10 @@ function GetFormItem($ctag) { $fieldname = $ctag->GetName(); - $formitem = " + $formitem = "
- - + +
~name~~form~~name~~form~
\r\n"; $innertext = trim($ctag->GetInnerText()); @@ -116,7 +116,6 @@ function GetFormItem($ctag) return $formitem; } } - /** * 处理不同类型的数据 * @@ -200,7 +199,6 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') return $dvalue; } } - /** * 获得带值的表单修改时用 * @@ -212,10 +210,10 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') function GetFormItemValue($ctag, $fvalue) { $fieldname = $ctag->GetName(); - $formitem = " + $formitem = "
- - + +
~name~~form~~name~~form~
\r\n"; $innertext = trim($ctag->GetInnerText()); diff --git a/src/admin/sys_cache_up.php b/src/admin/sys_cache_up.php index c530c986..dc51930a 100644 --- a/src/admin/sys_cache_up.php +++ b/src/admin/sys_cache_up.php @@ -10,6 +10,20 @@ */ require_once(dirname(__FILE__)."/config.php"); CheckPurview('sys_ArcBatch'); +function clean_cachefiles($path) { + $list = array(); + foreach (glob($path.'/*') as $item) { + if(is_dir($item)) { + $list = array_merge($list, clean_cachefiles($item)); + } else { + $list[] = $item; + } + } + foreach ($list as $tmpfile) { + @unlink($tmpfile); + } + return true; +} if (empty($dopost)) $dopost = ''; if (empty($step)) $step = 1; if ($dopost == "ok") { @@ -47,10 +61,13 @@ if ($dopost == "ok") { $dsql->ExecuteNoneQuery("DELETE FROM `#@__statistics_detail` WHERE created_date < '$limit'"); $msg[] = "正在清理15天之前流量统计"; $url = "sys_cache_up.php?dopost=ok&step=-1&uparc=$uparc"; + clean_cachefiles("/../data/cache"); + clean_cachefiles("/../data/tplcache"); + clean_cachefiles("/../data/sessions"); if ($uparc == 1) { $url = "sys_cache_up.php?dopost=ok&step=9"; } - ShowMsg(implode("
",$msg),$url); + ShowMsg(implode("
", $msg), $url); exit(); } //修正错误文档 diff --git a/src/system/archive/freelist.class.php b/src/system/archive/freelist.class.php index fe9eb34f..a9aa0106 100755 --- a/src/system/archive/freelist.class.php +++ b/src/system/archive/freelist.class.php @@ -275,7 +275,7 @@ class FreeList if (is_file($tmpdir."/".$tempfile)) { $this->PartView->SetTemplet($tmpdir."/".$tempfile); } else { - $this->PartView->SetTemplet("这是没有使用模板的单独页", "string"); + $this->PartView->SetTemplet("未使用单独页模板", "string"); $nmfa = 1; } } diff --git a/src/system/archive/listview.class.php b/src/system/archive/listview.class.php index 2f07f0f0..4579bc2a 100755 --- a/src/system/archive/listview.class.php +++ b/src/system/archive/listview.class.php @@ -391,8 +391,7 @@ class ListView )); } } - } - + } /** * GetAPIList * @@ -467,7 +466,7 @@ class ListView if (preg_match('/hot|click|lastpost/', $orderby)) { $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath,mb.uname,mb.face,mb.userid $addField FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id LEFT JOIN `#@__member` mb ON arc.mid=mb.mid $addJoin WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row"; } - //普通情况先从arctiny表查出id,然后按di查询速度非常快 + //普通情况先从arctiny表查出id,然后按id查询速度非常快 else { $t1 = ExecTime(); $ids = array(); @@ -1034,15 +1033,15 @@ class ListView $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); //获得上页和首页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } //下页和未页的链接 if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -1103,7 +1102,7 @@ class ListView if ($j == $this->PageNo) { $listdd .= "
  • $j
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • $j
  • "; } } $plist = ''; diff --git a/src/system/archive/searchview.class.php b/src/system/archive/searchview.class.php index d5c8da7a..6419746c 100755 --- a/src/system/archive/searchview.class.php +++ b/src/system/archive/searchview.class.php @@ -667,7 +667,7 @@ class SearchView $prepage .= "
  • 上页
  • "; $indexpage = "
  • 首页
  • "; } else { - $indexpage = "
  • 首页
  • "; + $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { $nextpage .= "
  • 下页
  • "; @@ -698,7 +698,7 @@ class SearchView } } $plist = ''; - $plist .= "
    $hidenform"; + $plist .= "$hidenform"; $plist .= preg_match('/info/i', $listitem)? $infos : ""; $plist .= preg_match('/index/i', $listitem)? $indexpage : ""; $plist .= preg_match('/pre/i', $listitem)? $prepage : ""; diff --git a/src/system/archive/sglistview.class.php b/src/system/archive/sglistview.class.php index 579f27b1..0d6b1a8e 100755 --- a/src/system/archive/sglistview.class.php +++ b/src/system/archive/sglistview.class.php @@ -896,7 +896,7 @@ class SgListView if ($j == $this->PageNo) { $listdd .= "
  • $j
  • "; } else { - $listdd .= "
  • ".$j."
  • "; + $listdd .= "
  • $j
  • "; } } $plist = ''; @@ -997,7 +997,7 @@ class SgListView if ($j == $this->PageNo) { $listdd .= "
  • $j
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • $j
  • "; } } $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; diff --git a/src/system/archive/specview.class.php b/src/system/archive/specview.class.php index e02b40b9..3f892cb2 100755 --- a/src/system/archive/specview.class.php +++ b/src/system/archive/specview.class.php @@ -439,25 +439,25 @@ class SpecView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "1页".$this->TotalResult."条"; + return "
  • 1页".$this->TotalResult."条
  • "; } if ($this->TotalResult == 0) { - return "0页".$this->TotalResult."条"; + return "
  • 0页".$this->TotalResult."条
  • "; } $purl = $this->GetCurUrl(); $tnamerule = "spec_"; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { - $indexpage = "
  • 首页
  • "; + $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { - $endpage = "
  • 末页
  • "; + $endpage = "
  • 末页
  • "; } //获得数字链接 $listdd = ''; @@ -476,9 +476,9 @@ class SpecView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • $j
  • "; } else { - $listdd .= "
  • ".$j."
  • "; + $listdd .= "
  • $j
  • "; } } $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; @@ -545,7 +545,7 @@ class SpecView if ($j == $this->PageNo) { $listdd .= "
  • $j
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • $j
  • "; } } $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; diff --git a/src/system/archive/taglist.class.php b/src/system/archive/taglist.class.php index 1d5c95a7..f1244525 100755 --- a/src/system/archive/taglist.class.php +++ b/src/system/archive/taglist.class.php @@ -448,7 +448,7 @@ class TagList if ($j == $this->PageNo) { $listdd .= "
  • $j
  • "; } else { - $listdd .= "
  • ".$j."
  • "; + $listdd .= "
  • $j
  • "; } } $plist = ''; @@ -557,7 +557,7 @@ class TagList if ($dir == "") $dir = str_replace("{cmspath}", "", $cfg_tags_dir); $this->tagsDir = $dir; } - //生成静态Tag + //生成静态标签 function MakeHtml($startpage = 1, $makepagesize = 0) { global $cfg_dir_purview, $envs, $cfg_tags_dir, $cfg_cmsurl;