From fa9f250662663fe3ddd6ae55a470f8c442e8d696 Mon Sep 17 00:00:00 2001 From: tianya Date: Sun, 27 Mar 2022 18:11:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=86=85=E7=BD=AE=E8=BD=BB?= =?UTF-8?q?=E9=87=8F=E7=BA=A7=E7=BB=9F=E8=AE=A1=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/index.php | 3 - src/admin/index_body.php | 103 +- src/admin/templets/index.htm | 19 - src/admin/templets/index_body.htm | 221 ++- src/apps/statistics.php | 28 + src/install/index.php | 2 +- src/static/js/chart.min.js | 13 + src/system/archive/archives.class.php | 3 +- src/system/archive/listview.class.php | 3 +- src/system/archive/searchview.class.php | 4 +- src/system/archive/sglistview.class.php | 3 +- src/system/archive/taglist.class.php | 4 +- src/system/common.inc.php | 2 +- src/system/libraries/agent.class.php | 416 ++++ src/system/libraries/crawlerdetect.class.php | 185 ++ .../libraries/fixtures/abstractprovider.php | 30 + src/system/libraries/fixtures/crawlers.php | 1412 ++++++++++++++ src/system/libraries/fixtures/exclusions.php | 71 + src/system/libraries/fixtures/headers.php | 37 + src/system/libraries/mobiledetect.class.php | 1693 +++++++++++++++++ src/system/libraries/statistics.class.php | 150 ++ src/system/taglib/statistics.lib.php | 28 + src/theme/templets/footer.htm | 3 +- 23 files changed, 4289 insertions(+), 144 deletions(-) create mode 100644 src/apps/statistics.php create mode 100644 src/static/js/chart.min.js create mode 100644 src/system/libraries/agent.class.php create mode 100644 src/system/libraries/crawlerdetect.class.php create mode 100644 src/system/libraries/fixtures/abstractprovider.php create mode 100644 src/system/libraries/fixtures/crawlers.php create mode 100644 src/system/libraries/fixtures/exclusions.php create mode 100644 src/system/libraries/fixtures/headers.php create mode 100644 src/system/libraries/mobiledetect.class.php create mode 100644 src/system/libraries/statistics.class.php create mode 100755 src/system/taglib/statistics.lib.php diff --git a/src/admin/index.php b/src/admin/index.php index a0609c36..5330a448 100644 --- a/src/admin/index.php +++ b/src/admin/index.php @@ -16,9 +16,6 @@ if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { } require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC.'/dedetag.class.php'); -$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; -$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; -if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; require(DEDEADMIN.'/inc/inc_menu_map.php'); include(DEDEADMIN.'/templets/index.htm'); exit(); \ No newline at end of file diff --git a/src/admin/index_body.php b/src/admin/index_body.php index a55c3c6a..f03ad991 100644 --- a/src/admin/index_body.php +++ b/src/admin/index_body.php @@ -11,9 +11,6 @@ require(dirname(__FILE__).'/config.php'); require(DEDEINC.'/image.func.php'); require(DEDEINC.'/dedetag.class.php'); -$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; -$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; -if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; //默认主页 if (empty($dopost)) { require(DEDEINC.'/inc/inc_fun_funAdmin.php'); @@ -30,92 +27,6 @@ if (empty($dopost)) { include DedeInclude('templets/index_body.htm'); exit(); } -/*----------------------- -增加新项 -function _AddNew() { } --------------------------*/ -else if ($dopost == 'addnew') { - if (empty($link) || empty($title)) { - ShowMsg("链接网址或标题不能为空", "-1"); - exit(); - } - $fp = fopen($myIcoFile, 'r'); - $oldct = trim(fread($fp, filesize($myIcoFile))); - fclose($fp); - $link = preg_replace("#['\"]#", '`', $link); - $title = preg_replace("#['\"]#", '`', $title); - $ico = preg_replace("#['\"]#", '`', $ico); - $oldct .= "\r\n"; - $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; - $fp = fopen($myIcoFileTrue, 'w'); - fwrite($fp, $oldct); - fclose($fp); - ShowMsg("成功增加一个项目", "index_body.php?".time()); - exit(); -} -/*--------------------------- -保存修改的项 -function _EditSave() { } -----------------------------*/ -else if ($dopost == 'editsave') { - $quickmenu = stripslashes($quickmenu); - $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; - $fp = fopen($myIcoFileTrue, 'w'); - fwrite($fp, $quickmenu); - fclose($fp); - ShowMsg("成功修改快捷操作项目", "index_body.php?".time()); - exit(); -} -/*--------------------------- -保存修改的项 -function _EditSave() { } -----------------------------*/ -else if ($dopost == 'movesave') { - $movedata = str_replace('\\', "", $sortorder); - $movedata = json_decode($movedata, TRUE); - $movedata = serialize($movedata); - $myIcoFileTrue = DEDEDATA.'/admin/move-'.$cuserLogin->getUserID().'.txt'; - $fp = fopen($myIcoFileTrue, 'w'); - fwrite($fp, $movedata); - fclose($fp); -} -/*----------------------------- -显示修改表单 -function _EditShow() { } ------------------------------*/ -else if ($dopost == 'editshow') { - $fp = fopen($myIcoFile, 'r'); - $oldct = trim(fread($fp, filesize($myIcoFile))); - fclose($fp); -?> -
- - - - - - - - - - - - - - -
-
修改快捷操作项
-
- -
-
-   - -
-
-GetInfoByDate($sdate); + echo json_encode(array( + "code" => 200, + "msg" => "", + "result" => $rs, + )); + exit; +} ?> \ No newline at end of file diff --git a/src/admin/templets/index.htm b/src/admin/templets/index.htm index c6116a19..2dbf7ac0 100644 --- a/src/admin/templets/index.htm +++ b/src/admin/templets/index.htm @@ -90,25 +90,6 @@ -
-
    - SetNameSpace('menu','<','>'); - $dtp->LoadTemplet($myIcoFile); - if(is_array($dtp->CTags)) - { - foreach($dtp->CTags as $ctag) - { - $title = $ctag->GetAtt('title'); - $ico = $ctag->GetAtt('ico'); - $link = $ctag->GetAtt('link'); - echo "
  • {$title}
  • "; - } - } - ?> -
-
+
+
+
+
流量统计
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
浏览次数(PV)独立访客(UV)IP访问次数
今日............
昨日............
历史累计............
+
+
+
更新消息
@@ -44,27 +100,6 @@
正在载入
-
-
-
快捷操作新增管理
-
- -
-
-
信息统计
@@ -138,9 +173,17 @@
+
+
+ +
+ +
+
+
-