From 18b24a374ca406bdd3cc3dc658a3f89fac3969a7 Mon Sep 17 00:00:00 2001 From: icret Date: Tue, 3 May 2022 05:00:40 +0000 Subject: [PATCH] v2.6.1 --- README.md | 9 +- admin/admin.inc.php | 285 ++++++++++++++++++++++++--------------- admin/index.php | 9 +- api/index.php | 53 +++++++- application/check.php | 2 +- application/del.php | 2 +- application/function.php | 129 +++++++++++------- application/info.php | 54 ++++---- application/list.php | 25 +++- application/md5.php | 39 ++++++ application/thumb.php | 4 +- application/upload.php | 79 +++++++++-- config/config.guest.php | 7 +- config/config.php | 60 +++++---- i/index.html | 46 +++++++ install/install.php | 6 +- 16 files changed, 556 insertions(+), 253 deletions(-) create mode 100755 application/md5.php create mode 100755 i/index.html diff --git a/README.md b/README.md index 55777f7..0dad5ee 100755 --- a/README.md +++ b/README.md @@ -149,7 +149,14 @@ $HTTP["url"] =~ "^/(i|public)/" {
点击查看2.0版更新日志 -* 2022-05-01 v2.6.0 +* 2022-04-30 v2.6.1 +- 增加登陆用户有效期 +- 增加管理员/登陆用户/Token专用目录 +- 增加转换图片格式后压缩图片(不建议同时开启后端压缩) +- 增加隐藏存储路径(网站域名与图片域名不同且图片域名需绑定到图片目录) +- 直链缩略图支持bmp,webp + +* 2022-04-29 v2.6.0 - 修复源图缺陷 - 修复API回收不能还原问题 - 布局修改 diff --git a/admin/admin.inc.php b/admin/admin.inc.php index 8da1b5d..b7d9b30 100755 --- a/admin/admin.inc.php +++ b/admin/admin.inc.php @@ -14,7 +14,7 @@ if (!is_who_login('admin')) { type: "danger", // 定义颜色主题 icon: "exclamation-sign" // 定义消息图标 }).show();'; - header("refresh:21;url=" . $config['domain'] . "/admin/index.php"); + header("refresh:2;url=" . $config['domain'] . "/admin/index.php"); require_once APP_ROOT . '/application/footer.php'; exit; } @@ -62,8 +62,6 @@ if (isset($_POST['add_token_id'])) { // 禁用Token if (isset($_GET['stop_token'])) { - - // unset($tokenList[$_GET['delete_token']]); $stop_token = $_GET['stop_token']; $postArr = array( $stop_token => array( @@ -103,7 +101,13 @@ if (isset($_GET['delete_guest'])) { // 添加上传账号 修改config.guest.php if (isset($_POST['uploader_form'])) { - $postArr = array($_POST['uploader_user'] => $_POST['uploader_password']); + $postArr = array( + $_POST['uploader_user'] => array( + 'password' => $_POST['uploader_password'], + 'expired' => $_POST['uploader_time'] * 86400 + time(), + 'add_time' => time() + ) + ); $new_config = array_replace($guestConfig, $postArr); $config_file = APP_ROOT . '/config/config.guest.php'; cache_write($config_file, $new_config, 'guestConfig'); @@ -119,8 +123,8 @@ if (isset($_POST['uploader_form'])) { } // 删除非空目录 -if (isset($_POST['delDir'])) { - $delDir = APP_ROOT . $config['path'] . $_POST['delDir']; +if (isset($_REQUEST['delDir'])) { + $delDir = APP_ROOT . $config['path'] . $_REQUEST['delDir']; if (deldir($delDir)) { echo ' '; } - header("refresh:1;"); // 1s后刷新当前页面 + // header("refresh:1;"); // 1s后刷新当前页面 + header("refresh:1;url=/admin/admin.inc.php"); } // 监黄恢复图片 @@ -225,8 +230,8 @@ if (isset($_GET['recycle_reimg'])) {
- - + +
@@ -269,21 +274,25 @@ if (isset($_GET['recycle_reimg'])) {
- +
+
- +
- +
- +
- +
- +


@@ -398,7 +407,7 @@ if (isset($_GET['recycle_reimg'])) { " placeholder="隐藏的保存">
- +

API调用网址:/api/index.php

@@ -407,7 +416,8 @@ if (isset($_GET['recycle_reimg'])) { - + + @@ -418,14 +428,18 @@ if (isset($_GET['recycle_reimg'])) { + -
列表 添加时间 有效期至禁用上传数量管理Token
禁用 + + 禁用 + ' class='btn btn-mini btn-primary '>删除上传 +
-
-