diff --git a/README.md b/README.md index 6ab425b..a2010df 100755 --- a/README.md +++ b/README.md @@ -230,10 +230,12 @@ $HTTP["url"] =~ "^/(i|public)/" {
点击查看2.0版更新日志 -* 2023-02-04 v2.7.2 dev -- 增加 [web-indexr](https://github.com/rehiy/web-indexr) 文件管理 -- - web-indexr处于实验中,作为Tinyfilemanager的替代 +* 2023-02-04 v2.7.2 +- 增加删除单条历史上传记录 +- 增加 [web-indexr](https://github.com/rehiy/web-indexr) 文件管理, 正在实验中 +- - 作为 [Tinyfilemanager](https://github.com/prasathmani/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 2b8c43b..1b48fe6 100755 --- a/admin/admin.inc.php +++ b/admin/admin.inc.php @@ -138,13 +138,26 @@ if (isset($_GET['delete_guest'])) { type: "primary", // 定义颜色主题 icon: "ok-sign" // 定义消息图标 }).show(); - + '; header("refresh:1;url=/admin/admin.inc.php"); } // 添加上传账号 修改config.guest.php if (isset($_POST['uploader_form'])) { + // 禁止与管理员登录名相同 + if ($_POST['uploader_user'] == $config['user']) { + echo ' + + '; + exit(header("refresh:1;")); + } + // 写入上传者用户数据 $postArr = array( $_POST['uploader_user'] => array( 'password' => $_POST['uploader_password'], @@ -156,13 +169,13 @@ if (isset($_POST['uploader_form'])) { $config_file = APP_ROOT . '/config/config.guest.php'; cache_write($config_file, $new_config, 'guestConfig'); echo ' - - '; + + '; header("refresh:1;"); } @@ -287,19 +300,19 @@ if (isset($_POST['del_version_file'])) {
- +
- +
- +
- +
@@ -341,11 +354,11 @@ if (isset($_POST['del_version_file'])) {
- +
- +
- +
- @@ -373,7 +386,7 @@ if (isset($_POST['del_version_file'])) {
- @@ -499,9 +512,8 @@ if (isset($_POST['del_version_file'])) {
- + -
@@ -531,7 +543,7 @@ if (isset($_POST['del_version_file'])) {
缩略图
-
+
生成模式 @@ -542,7 +554,7 @@ if (isset($_POST['del_version_file'])) {
-
+
@@ -556,7 +568,7 @@ if (isset($_POST['del_version_file'])) {
- +
@@ -564,7 +576,7 @@ if (isset($_POST['del_version_file'])) { >
- +
@@ -596,7 +608,7 @@ if (isset($_POST['del_version_file'])) {
> - +
@@ -672,8 +684,8 @@ if (isset($_POST['del_version_file'])) {
- - > + + >
@@ -874,10 +886,11 @@ if (isset($_POST['del_version_file'])) { PicGo
开发支持

- demo - manual - discussions + Demo + Manual Telegram + Discuss +

@@ -886,6 +899,7 @@ if (isset($_POST['del_version_file'])) { ZUI Verot Tinyfilemanager + Web-indexr Ip2Region TinyPng @@ -897,7 +911,6 @@ if (isset($_POST['del_version_file'])) { Moderatecontent - GPL-2.0

EasyImage2.0简单图床构建于众多优秀的开源项目之上, 非常感谢这些项目!

@@ -987,14 +1000,14 @@ if (isset($_POST['del_version_file'])) {
-
- @@ -1010,7 +1023,7 @@ if (isset($_POST['del_version_file'])) {
- +
@@ -1033,20 +1046,27 @@ if (isset($_POST['del_version_file'])) {
管理员账号 不更改账号或者密码就不要保存
-
-
- - +
+
+
+ + +
-
- - - +
+
+ + + + +
+
+
+ " placeholder="隐藏的保存"> +
- " placeholder="隐藏的保存"> - -
+

直接输入账号和密码即可完成修改.

@@ -1059,27 +1079,33 @@ if (isset($_POST['del_version_file'])) {
上传者账号 账户只能用于上传
-
-
- - +
+
+
+ + +
-
- - - +
+
+ + + +
-
- 有效期: - - +
+
+ 有效期 + + +
+
+
+ " placeholder="隐藏的保存"> +
-
- " placeholder="隐藏的保存"> -
- -
+

上传用户的配置文件在config.guest.php

@@ -1101,14 +1127,16 @@ if (isset($_POST['del_version_file'])) {
源图保护Key * 设定后请勿更改,否则所有加密链接失效
-
-
- +
+
+
- " placeholder="隐藏的保存"> - +
+ " placeholder="隐藏的保存"> + +
@@ -1128,16 +1156,16 @@ if (isset($_POST['del_version_file'])) { @@ -1162,48 +1190,54 @@ if (isset($_POST['del_version_file'])) {
-
- - +
+
+ + +
+
+ + +
-
- - +
+
+ + +
+
+ + +
-
- - -
-
- - -
-
- - -
-
- - -
-
- - +
+
+ + +
+
+ + +
+
+ + +
" placeholder="隐藏的保存"> @@ -1211,6 +1245,7 @@ if (isset($_POST['del_version_file'])) {
+
前端裁剪/压缩 优点:服务器无压力 缺点:PC配置低的会导致浏览器卡顿,偶现丢失方向信息,仅支持JPG
diff --git a/admin/manager.php b/admin/manager.php index 18eb1c2..1635636 100755 --- a/admin/manager.php +++ b/admin/manager.php @@ -14,7 +14,7 @@ if(!is_who_login('admin')){ } // 开启tinyfilemanager图片管理 -if (!$config['tinyfilemanager']) { +if (!$config['file_manage']) { require_once APP_ROOT.'/application/header.php'; echo '
图片管理已关闭~~
'; header("refresh:3;url=" . $_SERVER["HTTP_REFERER"] . '?manager-closed'); diff --git a/admin/version.php b/admin/version.php index 1b1a316..fbafd6b 100644 --- a/admin/version.php +++ b/admin/version.php @@ -1 +1 @@ -2.7.2 dev \ No newline at end of file +2.7.2 \ No newline at end of file diff --git a/application/function.php b/application/function.php index 40e1a45..a284f1a 100755 --- a/application/function.php +++ b/application/function.php @@ -764,18 +764,15 @@ function getDel($url, $type) */ function is_who_login($user) { - if ($user == 'status') { - if (checkLogin() == 205 || checkLogin() == 204) return true; - } - + // 将状态转码 $status = json_decode(_login(), true); - if ($user == 'admin') { - if ($status['level'] == 1) return true; - } + // 查询是否登录 + if ($user == 'status') if ($status['level'] > 0) return true; + // 是否管理员登录 + if ($user == 'admin') if ($status['level'] == 1) return true; + // 是否上传者登录 + if ($user == 'guest') if ($status['level'] == 2) return true; - if ($user == 'guest') { - if ($status['level'] == 2) return true; - } return false; } diff --git a/application/history.php b/application/history.php index 57efa4e..e4dde08 100644 --- a/application/history.php +++ b/application/history.php @@ -25,13 +25,28 @@ include_once __DIR__ . "/header.php"; console.log('url list: ' + value['url']) // 获取所有链接 if (value['url'] !== undefined) { let v_url = parseURL(value['url']); // 获取链接路径 console.log(parseURL(value['url']).path); - $('.listNum').append('') + $('.listNum').append('') } }) $('.history_clear').append('

'); } else { $('.listNum').append('

上传历史记录不存在~~
非上传记录 | 清空缓存 | 浏览器版本低不显示~!

'); }; + + // 删除指定存储条目 + $('.Remove').on('click', function() { + + let Remove = $('.Remove').attr("id"); + $.zui.store.remove(Remove); // 删除指定存储条目 + + new $.zui.Messager('已删除 ' + Remove + ' 上传记录', { + type: "success", // 定义颜色主题 + icon: "ok-sign" // 定义消息图标 + }).show(); + + setTimeout(location.reload.bind(location), 2000); // 延迟2秒刷新 + }) + // 清空所有本地存储的条目 $('button').on('click', function() { new $.zui.Messager('已清空' + $.zui.store.length() + "条历史记录", { @@ -43,12 +58,7 @@ include_once __DIR__ . "/header.php"; setTimeout(location.reload.bind(location), 2000); // 延迟2秒刷新 }) - // viewjs - new Viewer(document.getElementById('viewjs'), { - url: 'data-original', - }); - - // 复制url + // 复制 文件名/URL var clipboard = new Clipboard('.copy'); clipboard.on('success', function(e) { new $.zui.Messager("复制成功", { @@ -65,6 +75,11 @@ include_once __DIR__ . "/header.php"; }).show(); }); + // viewjs + new Viewer(document.getElementById('viewjs'), { + url: 'data-original', + }); + //懒加载 var lazy = new Lazy({ onload: function(elem) { diff --git a/application/list.php b/application/list.php index 9cc5bf5..e91d1ab 100755 --- a/application/list.php +++ b/application/list.php @@ -65,17 +65,17 @@ if ($config['ad_top']) echo $config['ad_top_info'];
  • 简单图床-EasyImage
  • - + - + - + - + - - + +
    diff --git a/config/config.php b/config/config.php index e333941..d0d1cac 100755 --- a/config/config.php +++ b/config/config.php @@ -64,7 +64,7 @@ $config=Array 'static_cdn_url'=>'https://fastly.jsdelivr.net/gh/icret/EasyImages2.0', 'TinyPng_key'=>'', 'checkImg'=>0, - 'checkImg_value'=>50, + 'checkImg_value'=>80, 'moderatecontent_key'=>'', 'nsfwjs_url'=>'', 'showSwitch'=>1, @@ -106,6 +106,7 @@ $config=Array 'report'=>'', 'image_recycl'=>1, 'tinyfilemanager'=>1, + 'file_manage'=>1, 'delDir'=>'cache/', 'hide'=>0, 'hide_key'=>'EasyImage2.0', @@ -114,7 +115,7 @@ $config=Array 'guest_path_status'=>0, 'token_path_status'=>0, 'admin_path'=>'u', - 'update'=>'2023-02-04 02:25:03', + 'update'=>'2023-02-05 00:34:20', 'footer'=>'© Since 2018 EasyImage DMCA diff --git a/i/manag.php b/i/manag.php index 1825b71..35a9d88 100644 --- a/i/manag.php +++ b/i/manag.php @@ -11,7 +11,7 @@ require_once __DIR__ . '/../application/function.php'; require_once APP_ROOT . '/config/config.php'; // 开启tinyfilemanager文件管理 -if (!$config['tinyfilemanager']) { +if (!$config['file_manage']) { require_once APP_ROOT . '/application/header.php'; echo '

    文件管理已关闭~~

    '; header("refresh:3;url=" . $config['domain'] . '?manag-closed');