From e632634154841a9abe808056b040215177cf1ac4 Mon Sep 17 00:00:00 2001 From: icret Date: Sat, 4 Feb 2023 10:55:33 +0800 Subject: [PATCH] v2.7.2 dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 2023-02-04 v2.7.2 dev - 增加 [web-indexr](https://github.com/rehiy/web-indexr) 文件管理 - - web-indexr处于实验中,作为Tinyfilemanager的替代 - 修复开启登录上传后,上传者账号上传失败 [#87](https://github.com/icret/EasyImages2.0/issues/87#issue-1569794639) - 优化排版和移动端显示 --- README.md | 5 +++-- admin/admin.inc.php | 4 ++-- api/index.php | 2 +- application/footer.php | 5 +++-- application/function.php | 7 +++---- application/header.php | 44 +++++++++++++++++++++++++--------------- application/upload.php | 4 ++-- config/config.php | 2 +- 8 files changed, 43 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index db016b1..6ab425b 100755 --- a/README.md +++ b/README.md @@ -230,10 +230,11 @@ $HTTP["url"] =~ "^/(i|public)/" {
点击查看2.0版更新日志 -* 2023-02-03 v2.7.2 dev +* 2023-02-04 v2.7.2 dev - 增加 [web-indexr](https://github.com/rehiy/web-indexr) 文件管理 - - web-indexr处于实验中,作为Tinyfilemanager的替代 -- 优化排版 +- 修复开启登录上传后,上传者账号上传失败 [#87](https://github.com/icret/EasyImages2.0/issues/87#issue-1569794639) +- 优化排版和移动端显示 * 2023-02-01 v2.7.1 - 更新版本号 diff --git a/admin/admin.inc.php b/admin/admin.inc.php index f15338d..fc19cdc 100755 --- a/admin/admin.inc.php +++ b/admin/admin.inc.php @@ -533,11 +533,11 @@ if (isset($_POST['del_version_file'])) {
-
+
生成模式
diff --git a/api/index.php b/api/index.php index 76b3f61..001788d 100755 --- a/api/index.php +++ b/api/index.php @@ -32,7 +32,7 @@ if ($config['check_ip']) { } // 根据IP限制游客每日上传数量 -if ($config['ip_upload_counts'] > 0 && !is_who_login(null)) { +if ($config['ip_upload_counts'] > 0 && !is_who_login('status')) { $ipList = APP_ROOT . '/admin/logs/ipcounts/' . date('Ymd') . '.php'; if (is_file($ipList)) { $ipList = file_get_contents($ipList); diff --git a/application/footer.php b/application/footer.php index aa70a92..b3eaf01 100755 --- a/application/footer.php +++ b/application/footer.php @@ -65,8 +65,9 @@ if ($config['notice_status'] == 1 && !empty($config['notice'])) : ?> // 导航状态 $('.nav-pills').find('a').each(function() { - if (this.href == document.location.href) { - $(this).parent().addClass('active'); // this.className = 'active'; + // console.log(document.location); + if (this.pathname == document.location.pathname) { + $(this).parent().addClass('active'); } }); diff --git a/application/function.php b/application/function.php index 42dadf6..40e1a45 100755 --- a/application/function.php +++ b/application/function.php @@ -764,9 +764,8 @@ function getDel($url, $type) */ function is_who_login($user) { - if (empty($user)) { + if ($user == 'status') { if (checkLogin() == 205 || checkLogin() == 204) return true; - return false; } $status = json_decode(_login(), true); @@ -1506,7 +1505,7 @@ function rand_imgurl($text = null) } /** - * 获取当前版本号 + * 获取当前版本号 | 读取字符串 * @param String $file 文件相对路径 * @return String 内容信息 */ @@ -1519,7 +1518,7 @@ function get_current_version($file = '/admin/version.php') return file_get_contents($file); } - return 'No Version File'; + return 'file does not exist'; } // 压缩图片与图片鉴黄 diff --git a/application/header.php b/application/header.php index 242cb60..93cd528 100755 --- a/application/header.php +++ b/application/header.php @@ -27,21 +27,33 @@ \ No newline at end of file diff --git a/application/upload.php b/application/upload.php index 1b4336b..74dbda6 100755 --- a/application/upload.php +++ b/application/upload.php @@ -7,7 +7,7 @@ require __DIR__ . '/class.upload.php'; // 检查登录 if ($config['mustLogin']) { - if (is_who_login(null)) { + if (!is_who_login('status')) { exit(json_encode(array( "result" => "failed", "code" => 401, @@ -40,7 +40,7 @@ if ($config['check_ip']) { } // 根据IP限制游客每日上传数量 -if ($config['ip_upload_counts'] > 0 && !is_who_login(null)) { +if ($config['ip_upload_counts'] > 0 && !is_who_login('status')) { $ipList = APP_ROOT . '/admin/logs/ipcounts/' . date('Ymd') . '.php'; if (is_file($ipList)) { $ipList = file_get_contents($ipList); diff --git a/config/config.php b/config/config.php index 6f2e35a..e333941 100755 --- a/config/config.php +++ b/config/config.php @@ -114,7 +114,7 @@ $config=Array 'guest_path_status'=>0, 'token_path_status'=>0, 'admin_path'=>'u', - 'update'=>'2023-02-03 16:44:22', + 'update'=>'2023-02-04 02:25:03', 'footer'=>'© Since 2018 EasyImage DMCA