修复图片回收批量删除失败

pull/141/head
icret 2022-03-17 02:19:40 +08:00
parent 1ccb28e2e9
commit a4c3fe3f89
4 changed files with 100 additions and 94 deletions

View File

@ -65,13 +65,17 @@ location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
```
## 安装
- windows:
#### windows:
- 下载简单图床 [最新版](https://github.com/icret/EasyImages2.0/archive/refs/heads/master.zip) | [稳定版](https://github.com/icret/EasyImages2.0/releases) 上传至web目录
- Linux:
#### Linux:
- `git clone https://github.com/icret/EasyImages2.0.git` 至web目录赋予www:www和0755权限
#### BT宝塔面板
- 安装环境 Ngixn(推荐) / Apache + PHP(推荐≥7.0)
- 软件商店搜索`简单图床`一键部署
## 程序升级
- 备份`config`目录(没有增加上传用户和api可以只保留`config.php`文件)和`上传文件目录`
@ -112,6 +116,7 @@ $HTTP["url"] =~ "^/(i|public)/" {
<details><summary>点击查看2.0版更新日志</summary>
* 2022-3-15 v2.5.7 dev
- 修复图片回收批量删除失败
- 检测更改域名改为检测局域网
* 2022-3-13 v2.5.6
@ -450,7 +455,7 @@ RewriteRule config/(.*).(php)$ [F]
![简单图床 - 统计界面](./install/README/1305032567.png)
## 兼容
- 最低`PHP 5.6`,推荐`PHP 7.0`及以上版本需要PHP支持`Fileinfo,iconv,zip,mbstring,openssl`扩展,如果缺失会导致无法上传/删除图片
- 最低`PHP 5.6`,推荐`PHP7.0`及以上版本需要PHP支持`Fileinfo,iconv,zip,mbstring,openssl`扩展,如果缺失会导致无法上传/删除图片
- 文件上传视图提供文件列表管理和文件批量上传功能,允许拖拽(需要`HTML5`支持)来添加上传文件,支持上传大图片,优先使用`HTML5`旧得浏览器自动使用`Flash和Silverlight`的方式兼容
## 鸣谢

View File

@ -124,15 +124,16 @@ if (isset($_POST['delDir'])) {
type: "success", // 定义颜色主题
icon: "ok-sign" // 定义消息图标
}).show();</script>';
header("refresh:1;"); // 1s后刷新当前页面
} else {
echo '
<script> new $.zui.Messager("删除失败! ", {
type: "danger", // 定义颜色主题
icon: "exclamation-sign" // 定义消息图标
}).show();</script>';
header("refresh:1;"); // 1s后刷新当前页面
}
header("refresh:1;"); // 1s后刷新当前页面
}
// 监黄恢复图片
@ -728,7 +729,7 @@ if (isset($_GET['recycle_reimg'])) {
</table>
</div>
<form class="form-inline" action="<?php $_SERVER['SCRIPT_NAME']; ?>" method="post">
<input class="form-control" type="hidden" name="delDir" value="/suspic/" readonly="">
<input class="form-control" type="hidden" name="delDir" value="/recycle/" readonly="">
<button class="btn btn-mini btn-danger"><?php echo $cache_num; ?>张 | 删除全部</button>
</form>
</div>

View File

@ -1,52 +1,52 @@
<?php
$config=Array
(
'title'=>'简单图床 - EasyImage',
'keywords'=>'简单图床,easyimage,无数据库图床,PHP多图长传程序,自适应页面,HTML5,markdown,bbscode,一键复制',
'description'=>'简单图床EasyImage是一款支持多文件上传的无数据库图床,可以完美替代PHP多图上传程序,最新html5自适应页面兼容手机电脑,上传后返回图片直链,markdown图片,论坛贴图bbscode链接,简单方便支持一键复制,支持多域名,api上传',
$config=Array
(
'title'=>'简单图床 - EasyImage',
'keywords'=>'简单图床,easyimage,无数据库图床,PHP多图长传程序,自适应页面,HTML5,markdown,bbscode,一键复制',
'description'=>'简单图床EasyImage是一款支持多文件上传的无数据库图床,可以完美替代PHP多图上传程序,最新html5自适应页面兼容手机电脑,上传后返回图片直链,markdown图片,论坛贴图bbscode链接,简单方便支持一键复制,支持多域名,api上传',
'tips'=>'<a><li class="icon icon-bullhorn text-muted">单文件≤10M,单次上传≤30张</li></a>
<a href="https://github.com/icret/EasyImages2.0" target="_black"><i class="icon icon-heart"> 简单图床是一款开源图床, 支持多文件上传无数据库</i></a>
<a href="https://github.com/icret/EasyImages2.0" target="_black"><i class="icon icon-github"> 如果你喜欢这种图床风格就下载喔 (๑•̀ㅂ•́)و✧</i></a>',
'domain'=>'http://127.0.0.1',
'imgurl'=>'http://127.0.0.1',
'user'=>'admin',
'password'=>'e6e061838856bf47e1de730719fb2609',
'mustLogin'=>0,
'apiStatus'=>0,
'path'=>'/i/',
'imgName'=>'default',
'maxSize'=>10485760,
'maxUploadFiles'=>100,
'watermark'=>0,
'waterText'=>'简单图床 - png.cm',
'waterPosition'=>5,
'textColor'=>'rgba(0,255,0,0.5)',
'textSize'=>50,
'textFont'=>'/public/static/hkxzy.ttf',
'waterImg'=>'/public/images/watermark.png',
'extensions'=>'gif,jpeg,png,tif,bmp,tif,svg,webp,jpg,tga,svg,ico',
'compress'=>0,
'compress_ratio'=>80,
'thumbnail'=>1,
'imgConvert'=>'',
'maxWidth'=>10240,
'maxHeight'=>10240,
'minWidth'=>5,
'minHeight'=>5,
'imgRatio'=>0,
'image_x'=>0,
'image_y'=>0,
'imgRatio_quality'=>80,
'imgRatio_crop'=>0,
'imgRatio_preserve_headers'=>1,
'static_cdn'=>0,
'theme'=>'default',
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.6',
'TinyPng_key'=>'',
'checkImg'=>0,
'checkImg_value'=>50,
'moderatecontent_key'=>'',
'nsfwjs_url'=>'',
<a href="https://github.com/icret/EasyImages2.0" target="_black"><i class="icon icon-github"> 如果你喜欢这种图床风格就下载喔 (๑•̀ㅂ•́)و✧</i></a>',
'domain'=>'http://127.0.0.1',
'imgurl'=>'http://127.0.0.1',
'user'=>'admin',
'password'=>'e6e061838856bf47e1de730719fb2609',
'mustLogin'=>0,
'apiStatus'=>0,
'path'=>'/i/',
'imgName'=>'default',
'maxSize'=>10485760,
'maxUploadFiles'=>100,
'watermark'=>0,
'waterText'=>'简单图床 - png.cm',
'waterPosition'=>5,
'textColor'=>'rgba(0,255,0,0.5)',
'textSize'=>50,
'textFont'=>'/public/static/hkxzy.ttf',
'waterImg'=>'/public/images/watermark.png',
'extensions'=>'gif,jpeg,png,tif,bmp,tif,svg,webp,jpg,tga,svg,ico',
'compress'=>0,
'compress_ratio'=>80,
'thumbnail'=>1,
'imgConvert'=>'',
'maxWidth'=>10240,
'maxHeight'=>10240,
'minWidth'=>5,
'minHeight'=>5,
'imgRatio'=>0,
'image_x'=>0,
'image_y'=>0,
'imgRatio_quality'=>80,
'imgRatio_crop'=>0,
'imgRatio_preserve_headers'=>1,
'static_cdn'=>0,
'theme'=>'default',
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.6',
'TinyPng_key'=>'',
'checkImg'=>0,
'checkImg_value'=>50,
'moderatecontent_key'=>'',
'nsfwjs_url'=>'',
'footer'=>'<a href="/admin/terms.php" target="_blank">请勿上传违反中国政策的图片</a>
<script>
var _hmt = _hmt || [];
@ -56,51 +56,51 @@ var _hmt = _hmt || [];
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>',
'ad_top'=>0,
</script>',
'ad_top'=>0,
'ad_top_info'=>' <!--广告 按照这个范例替换相应链接,如果想多几个广告,就多复制几个-->
<div class="col-md-12" style="text-align: center;margin:2px;">
<a href="https://app.cloudcone.com.cn/?ref=3521" target="_blank"><img src="/public/images/EasyImage2.0.png" /></a>
</div>',
'ad_bot'=>0,
</div>',
'ad_bot'=>0,
'ad_bot_info'=>'<div class="col-md-12" style="text-align: center;padding:12px 0 110px 0;">
<a href="../public/images/wechat.jpg" alt="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini" style="color:#329d38;" data-lightbox-group="group1644998953432"><i class="icon icon-wechat"></i> 打赏作者</a>
<a href="../public/images/alipay.jpg" alt="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini" style="color:#1970fc;" data-lightbox-group="group1644998953432"><i class="icon icon-zhifubao"></i> 打赏作者</a>
</div>',
'showSwitch'=>1,
'showSort'=>1,
'listNumber'=>20,
'customize'=>'',
'checkEnv'=>1,
'upload_logs'=>1,
'cache_freq'=>2,
'upload_first_show'=>1,
'show_user_hash_del'=>1,
'show_exif_info'=>1,
'chart_on'=>1,
'check_ip'=>0,
'check_ip_model'=>0,
'check_ip_list'=>'',
'public'=>0,
'public_list'=>Array
(
0=>'time',
1=>'today',
2=>'yesterday',
3=>'total_space',
4=>'used_space',
5=>'free_space',
6=>'image_used',
7=>'file',
8=>'dir',
9=>'month'
),
'language'=>0,
'image_recycl'=>1,
'delDir'=>'thumbnails/',
'hide'=>0,
'version'=>'2.5.6',
'update'=>'2022-03-16 01:57:25',
</div>',
'showSwitch'=>1,
'showSort'=>1,
'listNumber'=>20,
'customize'=>'',
'checkEnv'=>1,
'upload_logs'=>1,
'cache_freq'=>2,
'upload_first_show'=>1,
'show_user_hash_del'=>1,
'show_exif_info'=>1,
'chart_on'=>1,
'check_ip'=>0,
'check_ip_model'=>0,
'check_ip_list'=>'',
'public'=>0,
'public_list'=>Array
(
0=>'time',
1=>'today',
2=>'yesterday',
3=>'total_space',
4=>'used_space',
5=>'free_space',
6=>'image_used',
7=>'file',
8=>'dir',
9=>'month'
),
'language'=>0,
'image_recycl'=>1,
'delDir'=>'thumbnails/',
'hide'=>0,
'version'=>'2.5.6',
'update'=>'2022-03-16 01:57:25',
'terms'=>'<div class="container">
<div class="row">
<div class="col-xs-3">
@ -184,5 +184,5 @@ var _hmt = _hmt || [];
</div>
</div>
</div>
</div>'
</div>'
);

View File

@ -17,12 +17,12 @@ mustLogin();
<div class="content"></div>
<button type="button" class="close">x</button>
</div>
<div class="uploader-files file-list file-list-lg file-rename-by-click" data-drag-placeholder="Ctrl+V粘贴/选择文件/将图片直接拖拽至此处" style="min-height: 160px; border-style: dashed;"></div>
<div class="uploader-files file-list file-list-lg file-rename-by-click" data-drag-placeholder="选择文件/Ctrl+V粘贴/拖拽至此处" style="min-height: 160px; border-style: dashed;"></div>
<div class="uploader-actions">
<div class="uploader-status pull-right text-muted"></div>
<button type="button" class="btn btn-link uploader-btn-browse"><i class="icon icon-plus"></i> 选择文件</button>
<button type="button" class="btn btn-link uploader-btn-start"><i class="icon icon-cloud-upload"></i> 开始上传</button>
<button type="button" class="btn btn-link uploader-btn-stop"><i class="icon icon-pause"></i>暂停上传</button>
<button type="button" class="btn btn-link uploader-btn-stop"><i class="icon icon-pause"></i> 暂停上传</button>
</div>
</div>
<div class="col-md-10 col-md-offset-1 clo-xs-12" style="margin-bottom:90px;">