v2.5.9
parent
1c0a5415d0
commit
54a010c9bd
|
@ -11,7 +11,7 @@
|
|||
[](https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@EasyImage2.0/)
|
||||
[](https://github.com/icret/EasyImages2.0)
|
||||
[](https://github.com/icret/EasyImages2.0/blob/master/LICENSE)
|
||||
[](https://qm.qq.com/cgi-bin/qm/qr?k=TmGoIK7BXij_CR3lqZoJZu3_trPwtJ09&jump_from=webapi)
|
||||
[](https://jq.qq.com/?_wv=1027&k=jfXRHU8Y)
|
||||
|
||||
>[演示](https://png.cm/) | [Chrome/Edge 插件](https://github.com/icret/EasyImage-Browser-Extension) | [使用手册](https://www.kancloud.cn/easyimage/easyimage/)
|
||||
>
|
||||
|
|
|
@ -194,7 +194,7 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
<a href="https://png.cm/" target="_blank"><button type="button" class="btn btn-mini"><i class="icon icon-external-link"></i> 演示网站</button></a>
|
||||
<a href="https://www.kancloud.cn/easyimage/easyimage/content" target="_blank"><button type="button" class="btn btn-mini"><i class="icon icon-hand-right"></i> 使用手册</button></a>
|
||||
<!-- <a href="https://support.qq.com/products/367633" target="_blank"><button type="button" class="btn btn-mini hidden-xs inline-block"><i class="icon icon-bug"></i> 问题反馈</button></a> -->
|
||||
<a href="https://qm.qq.com/cgi-bin/qm/qr?k=kpzasY8VdPfrJrpAYdk0rxQJjqddgyAm&jump_from=webapi" target="_blank"><button type="button" class="btn btn-mini"><i class="icon icon-qq"></i> 问题反馈</button></a>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=OBIlf2y7" target="_blank"><button type="button" class="btn btn-mini"><i class="icon icon-qq"></i> 954441002</button></a>
|
||||
<a href="../public/images/wechat.jpg" title="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini" style="color:#329d38;"><i class="icon icon-wechat"></i> 打赏作者</a>
|
||||
<a href="../public/images/alipay.jpg" title="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini hidden-xs inline-block" style="color:#1970fc;"><i class="icon icon-zhifubao"></i> 打赏作者</a>
|
||||
</div>
|
||||
|
@ -210,7 +210,7 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
<li><a data-tab href="#Content11">图片回收<span class="label label-badge label-success"><?php echo get_file_by_glob(APP_ROOT . $config['path'] . 'recycle', 'number'); ?></span></a></li>
|
||||
<li><a data-tab href="#Content7">可疑图片<span class="label label-badge label-success"><?php echo get_file_by_glob(APP_ROOT . $config['path'] . 'suspic', 'number'); ?></span></a></li>
|
||||
<li><a data-tab href="#Content3">广告设置</a></li>
|
||||
<li><a href="<?php echo $config['domain'] . '/admin/manager.php?p=' . date('Y/m/d'); ?>" target="_blank">文件管理</a></li>
|
||||
<li><a data-tab href="#Content14">文件管理</a></li>
|
||||
<li><a data-tab href="#Content6">图床安全</a></li>
|
||||
<li><a data-tab href="#Content10">账号密码</a></li>
|
||||
<li><a data-tab href="#Content8">系统信息</a></li>
|
||||
|
@ -302,7 +302,7 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<label>单次最多上传 | 当前: </label><label id="maxUploadFiles"><?php echo $config['maxUploadFiles']; ?></label><label>张</label>
|
||||
<input type="range" class="form-control" name="maxUploadFiles" value="<?php echo $config['maxUploadFiles']; ?>" min="1" max="100" step="1" onchange="document.getElementById('maxUploadFiles').innerHTML=value">
|
||||
<input type="range" class="form-control" name="maxUploadFiles" value="<?php echo $config['maxUploadFiles']; ?>" min="1" max="200" step="1" onchange="document.getElementById('maxUploadFiles').innerHTML=value">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>最大上传宽度 | 当前: </label><label id="maxWidth"><?php echo $config['maxWidth']; ?></label><label>px</label>
|
||||
|
@ -361,21 +361,6 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
</form>
|
||||
</div>
|
||||
<div class="tab-pane fade " id="Content4">
|
||||
<form class="form-inline" method="get" action="../application/del.php" id="form" name="delForm" onSubmit="getStr();" target="_blank">
|
||||
<p id="delimgurl"></p>
|
||||
<div class="form-group">
|
||||
<label for="del">删除单张图片文件: </label>
|
||||
<input type="url" name="url" class="form-control input-sm" id="del" placeholder="请输入图片链接">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-sm btn-primary" onClick="return confirm('确认要删除?\n* 删除文件后将无法恢复! ');">删除单文件</button>
|
||||
</form>
|
||||
<form class="form-inline" action="<?php $_SERVER['SCRIPT_NAME']; ?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="delDir" style="color:red">删除指定日期文件: </label>
|
||||
<input type="text" class="form-control form-date input-sm" name="delDir" value="<?php echo date('Y/m/d/'); ?>" readonly="">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-sm btn-danger" onClick="return confirm('确认要删除?\n* 删除文件夹后将无法恢复! ');">删除文件夹</button>
|
||||
</form>
|
||||
<form action="../application/compressing.php" method="post" target="_blank">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputInviteCode1">压缩文件夹</label>
|
||||
|
@ -693,7 +678,8 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
<h5>图床信息</h5>
|
||||
<hr />
|
||||
<h6>API 插件</h6>
|
||||
<a href="https://github.com/icret/EasyImage-Browser-Extension" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="浏览器插件">Edge/Chrome</span></a>
|
||||
<a href="https://microsoftedge.microsoft.com/addons/detail/%E7%AE%80%E5%8D%95%E5%9B%BE%E5%BA%8A-edge-version/hdafcoenpmebcjjcccojdlhfnndelefk" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="浏览器插件">Edge</span></a>
|
||||
<a href="https://github.com/icret/EasyImage-Browser-Extension" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="浏览器插件">Chrome</span></a>
|
||||
<a href="https://www.kancloud.cn/easyimage/easyimage/2625228" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="使用ShareX上传">ShareX</span></a>
|
||||
<a href="https://www.kancloud.cn/easyimage/easyimage/2625229" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="使用PicGo上传">PicGo</span></a>
|
||||
<h6>图床依赖</h6>
|
||||
|
@ -709,12 +695,15 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
<span class="label label-badge label-success" data-toggle="tooltip" title="图片审查moderatecontent已填写">Moderatecontent</span>
|
||||
<?php endif; ?>
|
||||
<a href="https://easysoft.github.io/zui/" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="前端框架">ZUI</span></a>
|
||||
<a href="https://github.com/verot/class.upload.php" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="图像处理类">verot</span></a>
|
||||
<a href="https://github.com/verot/class.upload.php" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="文件管理">Tinyfilemanager</span></a>
|
||||
<span class="label label-badge label-success" data-toggle="tooltip" title="当前版本"><?php echo $config['version']; ?></span>
|
||||
<?php if (getVersion() !== $config['version']) : ?>
|
||||
<a href="https://github.com/icret/EasyImages2.0/releases" target="_blank"><span class="label label-badge label-warning" data-toggle="tooltip" title="Github有更新,更新后删除<p>/admin/logs/verson/</p>文件夹会自动同步最新版本号"><?php echo getVersion(); ?> New</span></a>
|
||||
<?php endif; ?>
|
||||
<a href="https://github.com/icret/EasyImages2.0/blob/master/LICENSE" target="_blank"><span class="label label-badge" data-toggle="tooltip" title="许可证">GPL-2.0</span></a>
|
||||
</p>
|
||||
<p class="text-muted"><i class="icon icon-certificate"> EasyImage2.0简单图床构建于众多优秀的开源项目之上,非常感谢这些项目!</i></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="Content9">
|
||||
|
@ -765,10 +754,10 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="switch switch-inline" data-toggle="tooltip" title="删除链接是经过加密的">
|
||||
<div class="switch switch-inline" data-toggle="tooltip" title="上传后显示删除链接<br/>删除链接是经过加密的">
|
||||
<input type="hidden" name="show_user_hash_del" value="0">
|
||||
<input type="checkbox" name="show_user_hash_del" value="1" <?php if ($config['show_user_hash_del']) echo 'checked="checked"'; ?>>
|
||||
<label style="font-weight: bold">上传后显示删除链接</label>
|
||||
<label style="font-weight: bold">删除</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -800,7 +789,7 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>默认游客浏览数量 | 当前: </label>
|
||||
<label>广场默认浏览数量 | 当前: </label>
|
||||
<label id="listNumber"><?php echo $config['listNumber']; ?>张</label>
|
||||
|
||||
<input type="range" class="form-control" name="listNumber" value="<?php echo $config['listNumber']; ?>" min="10" max="100" step="10" onchange="document.getElementById('listNumber').innerHTML=value" data-toggle="tooltip" title="可在网址后填写参数实时更改预览数量 如: https://png.cm/application/list.php?num=3">
|
||||
|
@ -1044,6 +1033,28 @@ if (isset($_GET['recycle_reimg'])) {
|
|||
<button type="submit" class="btn btn-primary">保存</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="Content14">
|
||||
<h4>文件管理 <small>Tinyfilemanager是由作者定制开发,非必要请勿替换</small></h4>
|
||||
<a class="btn btn-mini btn-primary" href="<?php echo $config['domain'] . '/admin/manager.php?p=' . date('Y/m/d'); ?> " target="_blank" data-toggle="tooltip" title="使用Tinyfilemanager管理文件"><i class="icon icon-folder-open"> 文件管理</i></a>
|
||||
<hr />
|
||||
<h4>删除文件 <small>* 删除后不可恢复</small></h4>
|
||||
<form class="form-inline" method="get" action="../application/del.php" id="form" name="delForm" target="_blank">
|
||||
<p id="delimgurl"></p>
|
||||
<div class="form-group">
|
||||
<label for="del" class="text-primary">删除单张图片文件: </label>
|
||||
<input type="url" name="url" class="form-control input-sm" id="del" placeholder="请输入图片链接">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-sm btn-primary" onClick="return confirm('确认要删除?\n* 删除文件后将无法恢复! ');">删除单文件</button>
|
||||
</form>
|
||||
<br />
|
||||
<form class="form-inline" action="<?php $_SERVER['SCRIPT_NAME']; ?>" method="post">
|
||||
<div class="form-group">
|
||||
<label for="delDir" class="text-danger">删除指定日期文件: </label>
|
||||
<input type="text" class="form-control form-date input-sm" name="delDir" value="<?php echo date('Y/m/d/'); ?>" readonly="">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-sm btn-danger" onClick="return confirm('确认要删除?\n* 删除文件夹后将无法恢复! ');">删除文件夹</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php static_cdn(); ?>/public/static/jscolor/jscolor.min.js"></script>
|
||||
|
|
|
@ -89,6 +89,27 @@ if (isset($_GET['login'])) {
|
|||
}
|
||||
}
|
||||
?>
|
||||
<!-- 忘记密码 -->
|
||||
<div class="modal fade" id="fogot">
|
||||
<div class="modal-dialog ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">x</span><span class="sr-only">关闭</span></button>
|
||||
<h4 class="modal-title">
|
||||
<i class="icon icon-bell-alt"> </i>忘记账号/密码?
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="text-primary">忘记账号可以打开-><code>/config/config.php</code>文件->找到user对应的键值->填入</p>
|
||||
<p class="text-success">忘记密码请将密码->转换成MD5小写-><a href="https://md5jiami.bmcx.com/" target="_blank" class="text-purple">转换网址</a>->打开<code>/config/config.php</code>文件->找到password对应的键值->填入</p>
|
||||
<h4 class="text-danger">更改后会立即生效并重新登录,请务必牢记账号和密码! </h4>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post" onsubmit="return md5_post()">
|
||||
<div class="form-group">
|
||||
<label for="account" class="col-sm-2">账号</label>
|
||||
|
@ -116,6 +137,9 @@ if (isset($_GET['login'])) {
|
|||
<label title="选不选都记得你,想退出就点击退出才可以哦!">
|
||||
<input type="checkbox" checked="checked"> 记住我
|
||||
</label>
|
||||
<label title="选不选都记得你,想退出就点击退出才可以哦!">
|
||||
<a href="#fogot" data-moveable="inside" data-remember-pos="false" data-toggle="modal" data-target="#fogot" data-position="center">忘记账号/密码?</a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -9,6 +9,7 @@ require_once APP_ROOT . '/application/compress/function.compress.php';
|
|||
// 检测登录
|
||||
if (!is_who_login('admin')) {
|
||||
checkLogin();
|
||||
echo '<div class="alert alert-info">未登陆~~</div>';
|
||||
exit(require_once APP_ROOT . '/application/footer.php');
|
||||
}
|
||||
// 文件夹压缩
|
||||
|
@ -23,7 +24,7 @@ if (isset($_POST['folder'])) {
|
|||
$folder = '..' . $config['path'] . $getFolder;
|
||||
|
||||
if (!is_dir($folder)) {
|
||||
exit($folder . '<script> new $.zui.Messager("没有这个文件夹!", {
|
||||
exit($folder . '<script> new $.zui.Messager("没有这个文件夹!", {
|
||||
type: "danger", // 定义颜色主题
|
||||
icon: "exclamation-sign" // 定义消息图标
|
||||
}).show();</script>');
|
||||
|
@ -35,30 +36,34 @@ if (isset($_POST['folder'])) {
|
|||
compress($folder, $type, $source);
|
||||
|
||||
echo '
|
||||
<script> new $.zui.Messager("压缩完毕!", {
|
||||
<script> new $.zui.Messager("压缩完毕!", {
|
||||
type: "success", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();</script>';
|
||||
} else {
|
||||
$folder = 0;
|
||||
$sizeBefor = 0;
|
||||
}
|
||||
// 压缩后
|
||||
$sizeAfter = getDirectorySize($folder);
|
||||
|
||||
echo '
|
||||
?>
|
||||
<h2 style="text-align:center">压缩完毕</h2>
|
||||
<h4 style="text-align:center;">压缩前:<font color="red">' . getDistUsed($sizeBefor) . ' </font>压缩后:<font color="green">' . getDistUsed($sizeAfter) . '</font></h3>
|
||||
<pre><h4>
|
||||
无论使用哪种压缩均为不可逆操作,并且非常占用硬件资源。
|
||||
|
||||
如机器配置过低可能会导致CPU、内存飙升!
|
||||
|
||||
<font color="red">Imgcompress</font> 自带压缩为轻微有损压缩图片 此压缩有可能使图片变大,特别是小图片!也有一定概率改变图片方向。
|
||||
|
||||
<font color="red">Imgcompress</font> 对自身机器要求高,如图片过多会导致脚本崩溃或者超时(已经预处理超时和脚本崩溃处理,但是有概率重现)!
|
||||
|
||||
<font color="red">TinyPng</font> 是 https://tinify.cn/ 提供的API,需要自行申请,对服务器要求较低,但是对网络要求高!如在国内可能导致非常慢而超时崩溃(已预处理,但是有概率重现)。
|
||||
|
||||
获取TinyPng key https://tinify.cn/developers 并填入 <font color="red">/config/api_key.php</font> 文件。
|
||||
</h4></pre>
|
||||
';
|
||||
|
||||
include 'footer.php';
|
||||
<h4 style="text-align:center;">压缩前:<font color="red"><?php echo getDistUsed($sizeBefor); ?></font>压缩后:<font color="green"><?php echo getDistUsed($sizeAfter); ?></font>
|
||||
</h4>
|
||||
<pre>
|
||||
无论使用哪种压缩均为不可逆操作,并且非常占用硬件资源。
|
||||
如机器配置过低可能会导致CPU、内存飙升!
|
||||
<font color="red">Imgcompress</font> 自带压缩为轻微有损压缩图片 此压缩有可能使图片变大,特别是小图片!也有一定概率改变图片方向。
|
||||
<font color="red">Imgcompress</font> 对自身机器要求高,如图片过多会导致脚本崩溃或者超时(已经预处理超时和脚本崩溃处理,但是有概率重现)!
|
||||
<font color="red">TinyPng</font> 是 https://tinify.cn/ 提供的API,需要自行申请,对服务器要求较低,但是对网络要求高!如在国内可能导致非常慢而超时崩溃(已预处理,但是有概率重现)。
|
||||
获取TinyPng key https://tinify.cn/developers 并填入 <font color="red">API 设置->TinyPng Key</font> 文件。
|
||||
</pre>
|
||||
<script>
|
||||
// 更改网页标题
|
||||
document.title = "图片压缩"
|
||||
</script>
|
||||
<?php
|
||||
/** 底部广告 */
|
||||
if ($config['ad_bot']) echo $config['ad_bot_info'];
|
||||
/** 引入底部 */
|
||||
include APP_ROOT . '/application/footer.php';
|
||||
|
|
|
@ -1278,7 +1278,7 @@ function isWebpAnimated($src)
|
|||
}
|
||||
|
||||
/**
|
||||
* 根据URL判断是否本地局域网访问(PHP代码函数)
|
||||
* 根据URL判断是否本地局域网访问(PHP代码函数)
|
||||
* https://blog.csdn.net/monxinmonxin0/article/details/44854383
|
||||
* @param $url 要判断的网址
|
||||
* @return bool 是|否
|
||||
|
@ -1287,7 +1287,6 @@ function is_local($url)
|
|||
{
|
||||
if (stristr($url, 'localhost') || stristr($url, '127.') || stristr($url, '192.')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -126,6 +126,8 @@ if ($config['ad_top']) echo $config['ad_top_info'];
|
|||
<link rel="stylesheet" href="<?php static_cdn(); ?>/public/static/EasyImage.css">
|
||||
<link rel="stylesheet" href="<?php static_cdn(); ?>/public/static/viewjs/viewer.min.css">
|
||||
<link rel="stylesheet" href="<?php static_cdn(); ?>/public/static/zui/lib/datetimepicker/datetimepicker.min.css">
|
||||
<link rel="stylesheet" href="<?php static_cdn(); ?>/public/static/zui/lib/bootbox/bootbox.min.css">
|
||||
<script src="<?php static_cdn(); ?>/public/static/zui/lib/bootbox/bootbox.min.js"></script>
|
||||
<script src="<?php static_cdn(); ?>/public/static/lazyload/lazyload.js"></script>
|
||||
<script src="<?php static_cdn(); ?>/public/static/viewjs/viewer.min.js"></script>
|
||||
<script src="<?php static_cdn(); ?>/public/static/zui/lib/clipboard/clipboard.min.js"></script>
|
||||
|
@ -178,76 +180,107 @@ if ($config['ad_top']) echo $config['ad_top_info'];
|
|||
}
|
||||
// 回收图片
|
||||
function recycle_img() {
|
||||
var r = confirm("确认要放入回收站?\n* 可在可疑图片中恢复!")
|
||||
if (r == true) {
|
||||
obj = document.getElementsByName("checkbox");
|
||||
check_val = [];
|
||||
for (k in obj) {
|
||||
//判断复选框是否被选中
|
||||
if (obj[k].checked)
|
||||
//获取被选中的复选框的值
|
||||
check_val.push(obj[k].value);
|
||||
console.log(check_val);
|
||||
bootbox.confirm({
|
||||
message: "确认要放入回收站? <br /> 可在可疑图片中恢复!",
|
||||
buttons: {
|
||||
confirm: {
|
||||
label: '确定',
|
||||
className: 'btn-success'
|
||||
},
|
||||
cancel: {
|
||||
label: '取消',
|
||||
className: 'btn-danger'
|
||||
}
|
||||
},
|
||||
callback: function(result) {
|
||||
if (result == true) {
|
||||
obj = document.getElementsByName("checkbox");
|
||||
check_val = [];
|
||||
for (k in obj) {
|
||||
//判断复选框是否被选中
|
||||
if (obj[k].checked)
|
||||
//获取被选中的复选框的值
|
||||
check_val.push(obj[k].value);
|
||||
console.log(check_val);
|
||||
}
|
||||
$.post("./post_del.php", {
|
||||
'recycle_url_array': check_val
|
||||
}, );
|
||||
new $.zui.Messager("放入回收站成功", {
|
||||
type: "success", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
// 延时2秒刷新
|
||||
window.setTimeout(function() {
|
||||
window.location.reload();
|
||||
}, 1500)
|
||||
} else {
|
||||
new $.zui.Messager("取消回收", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "info-sign" // 定义消息图标
|
||||
}).show();
|
||||
}
|
||||
console.log('是否回收图片: ' + result);
|
||||
}
|
||||
$.post("./post_del.php", {
|
||||
'recycle_url_array': check_val
|
||||
}, );
|
||||
new $.zui.Messager("放入回收站成功", {
|
||||
type: "success", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
// 延时2秒刷新
|
||||
window.setTimeout(function() {
|
||||
window.location.reload();
|
||||
}, 1500)
|
||||
} else {
|
||||
new $.zui.Messager("取消回收", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "info-sign" // 定义消息图标
|
||||
}).show();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
// 删除图片
|
||||
function delete_img() {
|
||||
var r = confirm("确认要删除?\n* 删除文件夹后将无法恢复!")
|
||||
if (r == true) {
|
||||
obj = document.getElementsByName("checkbox");
|
||||
check_val = [];
|
||||
for (k in obj) {
|
||||
//判断复选框是否被选中
|
||||
if (obj[k].checked)
|
||||
//获取被选中的复选框的值
|
||||
check_val.push(obj[k].value);
|
||||
console.log(check_val);
|
||||
}
|
||||
$.post("./post_del.php", {
|
||||
'del_url_array': check_val
|
||||
bootbox.confirm({
|
||||
message: "确认要删除?<br />* 删除文件夹后将无法恢复!",
|
||||
buttons: {
|
||||
confirm: {
|
||||
label: '确定',
|
||||
className: 'btn-success'
|
||||
},
|
||||
function(data) {
|
||||
if (data.search('success') > 0) {
|
||||
new $.zui.Messager("删除成功", {
|
||||
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);
|
||||
cancel: {
|
||||
label: '取消',
|
||||
className: 'btn-danger'
|
||||
}
|
||||
},
|
||||
callback: function(result) {
|
||||
if (result == true) {
|
||||
obj = document.getElementsByName("checkbox");
|
||||
check_val = [];
|
||||
for (k in obj) {
|
||||
//判断复选框是否被选中
|
||||
if (obj[k].checked)
|
||||
//获取被选中的复选框的值
|
||||
check_val.push(obj[k].value);
|
||||
console.log(check_val);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
new $.zui.Messager("取消删除", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "info-sign" // 定义消息图标
|
||||
}).show();
|
||||
}
|
||||
$.post("./post_del.php", {
|
||||
'del_url_array': check_val
|
||||
},
|
||||
function(data) {
|
||||
if (data.search('success') > 0) {
|
||||
new $.zui.Messager("删除成功", {
|
||||
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);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
new $.zui.Messager("取消删除", {
|
||||
type: "primary", // 定义颜色主题
|
||||
icon: "info-sign" // 定义消息图标
|
||||
}).show();
|
||||
}
|
||||
console.log('是否删除图片: ' + result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 返回顶部
|
||||
|
|
|
@ -103,8 +103,8 @@ var _hmt = _hmt || [];
|
|||
'tinyfilemanager'=>1,
|
||||
'delDir'=>'thumbnails/',
|
||||
'hide'=>0,
|
||||
'version'=>'2.5.8',
|
||||
'update'=>'2022-04-11 13:38:41',
|
||||
'version'=>'2.5.9',
|
||||
'update'=>'2022-04-16 13:19:50',
|
||||
'terms'=>'<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
.bootbox.modal .modal-dialog{width:400px}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue