删除多余

This commit is contained in:
=
2022-02-23 17:46:27 +01:00
parent 6ef54dcdcb
commit 2e9764f1b4
3 changed files with 31 additions and 8 deletions

View File

@@ -44,9 +44,35 @@ if (isset($_GET['hash'])) {
// 检查登录后再处理url删除请求
if (is_who_login('admin')) {
// 删除
if (isset($_GET['url'])) {
getDel($_GET['url'], 'url');
}
// 回收
if (isset($_GET['recycle_url'])) {
$recycle_url = $_GET['recycle_url'];
$recycle_url = parse_url($recycle_url)['path'];
if (file_exists(APP_ROOT . $recycle_url)) {
checkImg($recycle_url, 3);
echo '
<script>
new $.zui.Messager("已放入回收站!", {
type: "success", // 定义颜色主题
icon: "ok" // 定义消息图标
}).show();
</script>
';
} else {
echo '
<script>
new $.zui.Messager("文件不存在!", {
type: "danger", // 定义颜色主题
icon: "exclamation-sign" // 定义消息图标
}).show();
</script>
';
}
}
} else {
if (isset($_GET['url'])) {
echo '
@@ -59,7 +85,6 @@ if (is_who_login('admin')) {
window.setTimeout("window.location=\'/../admin/index.php \'",3000);
</script>
';
//header("refresh:2;url=".$config['domain']."/admin/index.php");
}
}

View File

@@ -124,6 +124,7 @@
<a href="' . $imgUrl . '" target="_blank"><i class="icon icon-picture" data-toggle="tooltip" title="原图" style="margin-left:10px;"></i></a>
<a href="#" class="copy" data-clipboard-text="' . $imgUrl . '" data-toggle="tooltip" title="复制" style="margin-left:10px;"><i class="icon icon-copy"></i></a>
<a href="/application/info.php?img=' . $imgUrl . '" data-toggle="tooltip" title="详细信息" target="_blank" style="margin-left:10px;"><i class="icon icon-info-sign"></i></a>
<a href="' . $config['domain'] . '/application/del.php?recycle_url=' . $imgUrl . '" target="_blank" data-toggle="tooltip" title="回收" style="margin-left:10px;"><i class="icon icon-undo"></i></a>
<a href="' . $config['domain'] . '/application/del.php?url=' . $imgUrl . '" target="_blank" data-toggle="tooltip" title="删除" style="margin-left:10px;"><i class="icon icon-trash"></i></a>
<label style="margin-left:10px;" class="text-primary"><input type="checkbox" style="margin: left 200px;" id="url" name="checkbox" value="' . $imgUrl . '"> 选择</label>
</div>