From 3c5a50b3ed5e205725a2add34d19a54e74803c2f 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?= <93301500+xushubieli@users.noreply.github.com> Date: Wed, 26 Mar 2025 22:30:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/ai_dialog.php | 355 +++++++++--------- src/admin/api.php | 1 - src/admin/sys_sql_query.php | 1 - .../ckeditor/plugins/dedebizai/plugin.js | 2 - src/user/api.php | 1 - 5 files changed, 175 insertions(+), 185 deletions(-) diff --git a/src/admin/ai_dialog.php b/src/admin/ai_dialog.php index 2ebbc971..420bfd43 100644 --- a/src/admin/ai_dialog.php +++ b/src/admin/ai_dialog.php @@ -1,6 +1,6 @@ - - - - - AI提示词对话框 - - - - - - - - - -
-
小德AI助手:内容处理
-
-
- - - - + + \ No newline at end of file diff --git a/src/admin/api.php b/src/admin/api.php index 66d89b33..bb2d1425 100644 --- a/src/admin/api.php +++ b/src/admin/api.php @@ -474,7 +474,6 @@ if ($action === 'is_need_check_code') { $cuserLogin = new userLogin(); $params['adminid'] = $cuserLogin->getUserID(); // 加入时间戳 $params['ip'] = $_SERVER['REMOTE_ADDR'] ?? '127.0.0.1'; // 获取客户端IP - ksort($params); // 按字典序排序 $queryString = http_build_query($params); // 生成查询字符串 $params['sign'] = md5($queryString . $cfg_ai_apikey); // 计算MD5签名 diff --git a/src/admin/sys_sql_query.php b/src/admin/sys_sql_query.php index a6a3b9d4..e2c56203 100644 --- a/src/admin/sys_sql_query.php +++ b/src/admin/sys_sql_query.php @@ -88,7 +88,6 @@ else if ($dopost == "query") { $mysqlVersions = explode('.',trim($row[0])); $mysqlVersion = $mysqlVersions[0].".".$mysqlVersions[1]; $sqlquery = trim(stripslashes($sqlquery)); - if (preg_match("#drop(.*)table#i", $sqlquery) || preg_match("#drop(.*)database#", $sqlquery)) { echo "删除数据表或数据库的语句不允许在这里执行"; exit(); diff --git a/src/static/ckeditor/plugins/dedebizai/plugin.js b/src/static/ckeditor/plugins/dedebizai/plugin.js index 45387826..be4d13f9 100644 --- a/src/static/ckeditor/plugins/dedebizai/plugin.js +++ b/src/static/ckeditor/plugins/dedebizai/plugin.js @@ -8,10 +8,8 @@ CKEDITOR.plugins.add("dedebizai", { var h = 600; var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX; var dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY; - var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height; - var systemZoom = width / window.screen.availWidth; var posLeft = (width - w) / 2 / systemZoom + dualScreenLeft; var posTop = (height - h) / 2 / systemZoom + dualScreenTop; diff --git a/src/user/api.php b/src/user/api.php index 05f214aa..c59307c9 100755 --- a/src/user/api.php +++ b/src/user/api.php @@ -201,7 +201,6 @@ if ($action === 'is_need_check_code') { $dsql->ExecuteNoneQuery($inquery); } } - if (move_uploaded_file($ff["tmp_name"], $target_file)) { if ($mediatype === 1) { //图片自动裁剪