From 563a01e3fa2d9fd0d7ba400727445fa4214ab86b Mon Sep 17 00:00:00 2001 From: tao Date: Tue, 2 Aug 2022 18:48:31 +0800 Subject: [PATCH] 1.9.5 --- README.md | 2 - app/admin/controller/AuthAccess.php | 5 +- app/admin/controller/Seo.php | 33 ++++- app/admin/view/auth_access/index.html | 16 +-- app/admin/view/seo/index.html | 49 ++++++- app/common.php | 2 +- app/common/lib/SetArr.php | 6 +- public/static/admin/modules/useradmin.js | 48 +++---- public/static/res/mods/imgcom.js | 2 +- public/static/res/mods/index.js | 168 +++++++++++------------ vendor/composer/installed.php | 4 +- vendor/services.php | 2 +- 12 files changed, 204 insertions(+), 133 deletions(-) diff --git a/README.md b/README.md index 7c41daa..48e65b9 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,6 @@ > TaoLer是一个简单迅捷的轻论坛系统,适用于个人或组织区域型信息交流发布平台。 * 官网:https://www.aieok.com - * 版本:TaoLer 1.9.4 - * 日期:2022.4.24 webman版新架构已适配90% diff --git a/app/admin/controller/AuthAccess.php b/app/admin/controller/AuthAccess.php index e76a21d..2cea8cd 100644 --- a/app/admin/controller/AuthAccess.php +++ b/app/admin/controller/AuthAccess.php @@ -79,8 +79,9 @@ class AuthAccess extends AdminController } //管理员权限编辑 - public function edit($id) + public function edit() { + $id = input('id'); if(Request::isAjax()){ $data = Request::only(['id','uid','group_id']); //检测重复权限 @@ -98,7 +99,7 @@ class AuthAccess extends AdminController return json($res); } - $access = Db::name('auth_group_access')->group('uid')->find($id); + $access = Db::name('auth_group_access')->find($id); $admins = Db::name('admin')->field('id,username')->where('delete_time',0)->select(); $auth_groups = Db::name('auth_group')->field('id,title')->select(); diff --git a/app/admin/controller/Seo.php b/app/admin/controller/Seo.php index fabd523..2813de6 100644 --- a/app/admin/controller/Seo.php +++ b/app/admin/controller/Seo.php @@ -2,7 +2,7 @@ /* * @Author: TaoLer * @Date: 2022-04-13 09:54:31 - * @LastEditTime: 2022-04-24 08:44:53 + * @LastEditTime: 2022-04-27 14:20:06 * @LastEditors: TaoLer * @Description: 搜索引擎SEO优化设置 * @FilePath: \TaoLer\app\admin\controller\Seo.php @@ -128,7 +128,7 @@ class Seo extends AdminController $flag= true; // 写ID $w_id = ''; - // 新文件编号 + // 生成新文件编号,防止重复写入, $i = 1; // 获取public下所有xml文件 $newFile = $this->getXmlFile(public_path()); @@ -228,7 +228,7 @@ class Seo extends AdminController return json(['code'=>-1,'msg'=>'写xml配置失败']); } - return json(['code'=>0,'msg'=>'生成xml成功']); + return json(['code'=>0,'msg'=>'本次成功生成'.count($artAllId).'条xml']); } /** @@ -313,4 +313,31 @@ class Seo extends AdminController return json(['code'=>0,'msg'=>'删除成功']); } + public function searchLog() + { + $time = input('search_time'); + $logPath = app()->getRootPath().'runtime/log/browse/'.$time.'.log'; + $logPath = str_replace('\\','/',$logPath); + if(!file_exists($logPath)) return json(['code'=>-1,'msg'=>'还没有要分析的日志哦']); + $log = file_get_contents($logPath); + $log = preg_replace('/\[info\][^\n]*compatible;/', '', $log); + + // 正则蜘蛛 + preg_match_all('/(.*?)(?:bingbot|Googlebot|Baiduspider|SemrushBot|AhrefsBot|MJ12bot)+[^\n]*\r?\n/',$log,$arr); + + $string = ''; + foreach($arr[0] as $str) { + $str = preg_replace('/\[(.*?)T/', '', $str); + $str = preg_replace('/\+08:00\]/', '', $str); + $string .= preg_replace('/\/(.*?)\)/', '', $str); + } + + if(strlen($string)) { + return json(['code'=>0,'msg'=>'分析成功','data'=>$string]); + } else { + return json(['code'=>-1,'msg'=>'还没有蜘蛛来哦']); + } + + } + } \ No newline at end of file diff --git a/app/admin/view/auth_access/index.html b/app/admin/view/auth_access/index.html index cc60205..b44399a 100644 --- a/app/admin/view/auth_access/index.html +++ b/app/admin/view/auth_access/index.html @@ -6,15 +6,13 @@
-
- 管理员筛选 -
+
管理员筛选
@@ -30,9 +28,9 @@ {if condition="checkRuleButton('AuthAccess/check')"}{else /}{/if}