This commit is contained in:
icret 2024-06-14 17:08:13 +08:00
parent bc9515dd99
commit 28c56dbab2
10 changed files with 24 additions and 74 deletions

2
.github/FUNDING.yml vendored
View File

@ -1 +1 @@
custom: ['https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.5/public/images/wechat.jpg']
custom: ['https://raw.githubusercontent.com/icret/EasyImages2.0/2.8.4/public/images/wechat.jpg']

View File

@ -1,31 +0,0 @@
name: PHP 兼容性测试
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
php-compatibility:
name: PHP 兼容性测试
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2]
steps:
- name: 检出代码
uses: actions/checkout@v2
- name: 设置 PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: 安装依赖
run: composer install
- name: 运行测试
run: vendor/bin/phpunit

View File

@ -64,7 +64,7 @@
## 鸣谢
- [verot](https://github.com/verot/class.upload.php "verot" )
- [ZUI](https://github.com/easysoft/zui "ZUI" )
- [ZUI](https://github.com/easysoft/zui/tree/zui1 "ZUI" )
## 开源许可

View File

@ -10,7 +10,7 @@ require_once APP_ROOT . '/config/config.guest.php';
// 是否关闭图床设置
if ($config['show_admin_inc'] === 0) {
echo '<h2 class="alert alert-danger">已关闭图床设置~~ <br><small>再次开启请修改config.php文件: <code>\'show_admin_inc\' => 1,</code></small></h2>';
echo '<h2 class="alert alert-danger">已关闭图床设置~~ <br><small>再次开启请修改<code>/config/config.php</code>文件的代码: <code>\'show_admin_inc\' => 1,</code></small></h2>';
exit(require_once APP_ROOT . '/app/footer.php');
}
@ -691,10 +691,10 @@ auto_delete(); //定时删除
</div>
</div>
<div class="col-md-2">
<div class="switch switch-inline" data-toggle="tooltip" title="关闭后将不能进入后台设置<br/>再次开启需修改config.php: <code>'show_admin_inc'=>1,</code>">
<div class="switch switch-inline" data-toggle="tooltip" title="关闭后将不能进入当前设置<br/>再次开启需修改config.php: <code>'show_admin_inc'=>1,</code>">
<input type="hidden" name="show_admin_inc" value="0">
<input type="checkbox" name="show_admin_inc" value="1" <?php if ($config['show_admin_inc']) echo 'checked="checked"'; ?>>
<label style="font-weight: bold">关闭设置</label>
<label style="font-weight: bold">开启设置</label>
</div>
</div>
<div class="col-md-2">

View File

@ -85,6 +85,14 @@ if (isset($_POST['del_url_array'])) {
// FTP删除
any_upload($del_url_array[$i], $del_url_array[$i], 'delete');
}
echo json_encode(array(
'code' => 200,
'msg' => '删除成功',
'type' => 'success',
'icon' => 'ok-sign',
'mode' => 'delete',
'url' => $del_url_array
), JSON_UNESCAPED_UNICODE);
}
// 广场 - 批量回收文件

View File

@ -596,40 +596,14 @@ function getDel($url, $type)
if (is_file($url) && strrpos($url, $config['path'])) {
// 执行删除
if (@unlink($url)) {
echo '
<script>
new $.zui.Messager("删除成功", {
type: "success", // 定义颜色主题
icon: "ok-sign" // 定义消息图标
}).show();
// 延时5s跳转
// window.setTimeout("window.location=\'/../ \'",5000);
</script>
';
return TRUE;
} else {
echo '
<script>
new $.zui.Messager("删除失败", {
type: "black", // 定义颜色主题
icon: "exclamation-sign" // 定义消息图标
}).show();
</script>
';
return FALSE;
}
} else {
echo '
<script>
new $.zui.Messager("文件不存在", {
type: "danger", // 定义颜色主题
icon: "question-sign" // 定义消息图标
}).show();
</script>
';
}
// 清除查询
clearstatcache();
}
/**
* 删除指定文件
* @param $url string 文件

View File

@ -331,18 +331,16 @@ if ($config['ad_top']) echo $config['ad_top_info'];
type: "success", // 定义颜色主题
icon: "ok-sign" // 定义消息图标
}).show();
// 延时2秒刷新
window.setTimeout(function() {
window.location.reload();
}, 1500)
} else {
new $.zui.Messager("删除失败 请登录后再删除!", {
type: "danger", // 定义颜色主题
icon: "exclamation-sign" // 定义消息图标
}).show();
// 延时2s跳转
window.setTimeout("window.location=\'/../admin/index.php \'", 2000);
}
// 延时2秒刷新
window.setTimeout(function() {
window.location.reload();
}, 1500)
});
} else {
new $.zui.Messager("取消删除", {

File diff suppressed because one or more lines are too long

View File

@ -64,7 +64,7 @@
## 鸣谢
- [verot](https://github.com/verot/class.upload.php "verot" )
- [ZUI](https://github.com/easysoft/zui "ZUI" )
- [ZUI](https://github.com/easysoft/zui/tree/zui1 "ZUI" )
## 开源许可

View File

@ -1,10 +1,11 @@
* 2024-05-07 v2.8.5
* 2024-06-14 v2.8.5
- 优化API示例
- 优化二级目录使用
- 修复对PHP8.2支持
- 上传返回状态统一
- 增加返回状态文档解释
- 增加通过文件md5禁止上传
- Fix [#114](https://github.com/icret/EasyImages2.0/issues/184)
* 2024-01-20 v2.8.4
- Fix [#163](https://github.com/icret/EasyImages2.0/pull/163)