修复标题

pull/141/head
= 2022-02-23 04:12:10 +01:00
parent 837bdd5e59
commit 6ef54dcdcb
6 changed files with 79 additions and 34 deletions

View File

@ -103,7 +103,11 @@ $HTTP["url"] =~ "^/(i|public)/" {
<details><summary><mark>点击查看2.0版更新日志</mark></summary> <details><summary><mark>点击查看2.0版更新日志</mark></summary>
* 2022-2-21 v2.5.3 Developing * 2022-2-21 v2.5.4 Developing
- 增加回收图片
- 修复广场标题
* 2022-2-21 v2.5.3
- 增加图床数据开放 - 增加图床数据开放
- 增加自定义服务条款 - 增加自定义服务条款
- 升级 Viewer.js 到 v1.10.4 - 升级 Viewer.js 到 v1.10.4

View File

@ -204,7 +204,7 @@ if (isset($_GET['reimg'])) {
<input type="radio" name="thumbnail" value="0" <?php if ($config['thumbnail'] === 0) echo 'checked="checked"'; ?> id="thumbnail0"><label for="thumbnail0" data-toggle="tooltip" title="直接输出上传图片,会导致流量增加"> 关闭</label> <input type="radio" name="thumbnail" value="0" <?php if ($config['thumbnail'] === 0) echo 'checked="checked"'; ?> id="thumbnail0"><label for="thumbnail0" data-toggle="tooltip" title="直接输出上传图片,会导致流量增加"> 关闭</label>
</div> </div>
<div class="radio-primary"> <div class="radio-primary">
<input type="radio" name="thumbnail" value="1" <?php if ($config['thumbnail'] === 1) echo 'checked="checked"'; ?> id="thumbnail1"><label for="thumbnail1" data-toggle="tooltip" title="利用TimThumb生成 | 优点: 带缓存周期 缺点:无法生成webp动图,无法被cdn缓存"> 实时生成 | 推荐</label> <input type="radio" name="thumbnail" value="1" <?php if ($config['thumbnail'] === 1) echo 'checked="checked"'; ?> id="thumbnail1"><label for="thumbnail1" data-toggle="tooltip" title="利用TimThumb生成 | 优点: 带缓存周期 | 缺点:无法生成webp动图,无法被cdn缓存"> 实时生成 | 推荐</label>
</div> </div>
<div class="radio-primary"> <div class="radio-primary">
<input type="radio" name="thumbnail" value="2" <?php if ($config['thumbnail'] === 2) echo 'checked="checked"'; ?> id="thumbnail2"><label for="thumbnail2" data-toggle="tooltip" title="优点: 缩略图直链 | 缺点: 每日首次访问需要刷新"> 实时生成 | 缩略图直链</label> <input type="radio" name="thumbnail" value="2" <?php if ($config['thumbnail'] === 2) echo 'checked="checked"'; ?> id="thumbnail2"><label for="thumbnail2" data-toggle="tooltip" title="优点: 缩略图直链 | 缺点: 每日首次访问需要刷新"> 实时生成 | 缩略图直链</label>
@ -369,7 +369,7 @@ if (isset($_GET['reimg'])) {
<div class="form-group"> <div class="form-group">
<div class="switch switch-inline"> <div class="switch switch-inline">
<input type="hidden" name="compress" value="0"> <input type="hidden" name="compress" value="0">
<input type="checkbox" name="compress" value="1" <?php if ($config['compress']) echo 'checked="checked"'; ?> title=" 轻微有损压缩图片, 此压缩有可能使图片变大! 特别是小图片 也有一定概率改变图片方向"> <input type="checkbox" name="compress" value="1" <?php if ($config['compress']) echo 'checked="checked"'; ?> data-toggle="tooltip" title=" 轻微有损压缩图片, 此压缩有可能使图片变大! 特别是小图片 也有一定概率改变图片方向">
<label style="font-weight: bold">后端压缩上传图片 | 更多图片格式的支持</label> <label style="font-weight: bold">后端压缩上传图片 | 更多图片格式的支持</label>
</div> </div>
</div> </div>
@ -693,7 +693,7 @@ if (isset($_GET['reimg'])) {
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label data-toggle="tooltip" title="界面语言切换 | 暂支持中文简繁体转换">界面语言</label> <label data-toggle="tooltip" title="暂支持中文简繁体转换">界面语言</label>
<select class="chosen-select form-control" name="language"> <select class="chosen-select form-control" name="language">
<option value="0" <?php if ($config['language'] == '0') echo 'selected'; ?>>简体中文</option> <option value="0" <?php if ($config['language'] == '0') echo 'selected'; ?>>简体中文</option>
<option value="1" <?php if ($config['language'] == '1') echo 'selected'; ?>>繁體中文</option> <option value="1" <?php if ($config['language'] == '1') echo 'selected'; ?>>繁體中文</option>
@ -878,8 +878,13 @@ if (isset($_GET['reimg'])) {
// tips提示 // tips提示
$('[data-toggle="tooltip"]').tooltip({ $('[data-toggle="tooltip"]').tooltip({
tipClass: 'tooltip',
placement: 'top', placement: 'top',
tipClass: 'tooltip-primary' html: true,
delay: {
show: 50,
hide: 100
}
}); });
// 账号密码 | 以md5加密方式发送 // 账号密码 | 以md5加密方式发送
function uploader_md5_post() { function uploader_md5_post() {

View File

@ -720,6 +720,11 @@ function checkImg($imageUrl, $type = 1)
} }
} }
// 移入回收站
if ($type == 3) {
$bad_pic = true;
}
/** # 如果违规则移动图片到违规文件夹 */ /** # 如果违规则移动图片到违规文件夹 */
if ($bad_pic == true) { if ($bad_pic == true) {
$old_path = APP_ROOT . str_replace($config['imgurl'], '', $imageUrl); // 提交网址中的文件路径 /i/2021/10/29/p8vypd.png $old_path = APP_ROOT . str_replace($config['imgurl'], '', $imageUrl); // 提交网址中的文件路径 /i/2021/10/29/p8vypd.png

View File

@ -163,7 +163,8 @@
<a class="btn btn-mini" onclick="opcheckboxed('checkbox', 'checkall')">全选</a> <a class="btn btn-mini" onclick="opcheckboxed('checkbox', 'checkall')">全选</a>
<a class="btn btn-mini" onclick="opcheckboxed('checkbox', 'reversecheck')">反选</a> <a class="btn btn-mini" onclick="opcheckboxed('checkbox', 'reversecheck')">反选</a>
<a class="btn btn-mini" onclick="opcheckboxed('checkbox', 'uncheckall')">取消</a> <a class="btn btn-mini" onclick="opcheckboxed('checkbox', 'uncheckall')">取消</a>
<a class="btn btn-mini" onclick="fun()">删除</a> <a class="btn btn-mini" onclick="recycle_img()">回收</a>
<a class="btn btn-mini" onclick="delete_img()">删除</a>
</div> </div>
</div> </div>
</div> </div>
@ -260,9 +261,40 @@
} }
} }
} }
//获取所有的 checkbox 属性的 input标签 // 回收图片
function fun() { function recycle_img() {
var r = confirm("确认要删除?\n* 删除文件夹后将无法恢复!") 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", {
'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) { if (r == true) {
obj = document.getElementsByName("checkbox"); obj = document.getElementsByName("checkbox");
check_val = []; check_val = [];
@ -389,6 +421,6 @@
endDate: new Date() // 只能选当前日期之前 endDate: new Date() // 只能选当前日期之前
}); });
// 更改网页标题 // 更改网页标题
document.title = "图床广场 今日上传<?php get_file_by_glob(APP_ROOT . config_path() . '*.*', 'number'); ?>张 昨日<?php echo get_file_by_glob(APP_ROOT . $config['path'] . date("Y/m/d/", strtotime("-1 day")) . '*.*', 'number'); ?>张 - <?php echo $config['title']; ?>" document.title = "图床广场 - 今日上传<?php echo get_file_by_glob(APP_ROOT . config_path(), 'number'); ?>张 昨日<?php echo get_file_by_glob(APP_ROOT . $config['path'] . date("Y/m/d/", strtotime("-1 day")) . '*.*', 'number'); ?>张 - <?php echo $config['title']; ?>"
</script> </script>
<?php require_once APP_ROOT . '/application/footer.php'; <?php require_once APP_ROOT . '/application/footer.php';

View File

@ -1,7 +1,9 @@
<?php <?php
/** /**
* 删除文件页面 * 删除/回收文件页面
* @author Icret
* 2022-2-23 11:01:52
*/ */
require_once __DIR__ . '/function.php'; require_once __DIR__ . '/function.php';
@ -9,26 +11,20 @@ if (!is_who_login('admin')) {
exit('Not Logged!'); exit('Not Logged!');
} }
$del_url_array = isset($_POST['del_url_array']) ? $_POST['del_url_array'] : exit; // 删除文件
$del_num = count($del_url_array); if (isset($_POST['del_url_array'])) {
for ($i = 0; $i < $del_num; $i++) { $del_url_array = $_POST['del_url_array'];
getDel($del_url_array[$i], 'url'); $del_num = count($del_url_array);
for ($i = 0; $i < $del_num; $i++) {
getDel($del_url_array[$i], 'url');
}
} }
$path = '/i/cache/'; // 回收文件
if (isset($_POST['recycle_url_array'])) {
if (deldir($path)) { $recycle_url_array = $_POST['recycle_url_array'];
echo ' $del_num = count($recycle_url_array);
<script> new $.zui.Messager("删除成功!", { for ($i = 0; $i < $del_num; $i++) {
type: "success", // 定义颜色主题 checkImg($recycle_url_array[$i], 3);
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后刷新当前页面
} }

View File

@ -40,14 +40,17 @@ $config=Array
'imgRatio_crop'=>0, 'imgRatio_crop'=>0,
'imgRatio_preserve_headers'=>1, 'imgRatio_preserve_headers'=>1,
'static_cdn'=>0, 'static_cdn'=>0,
'theme'=>'default', 'theme'=>'red',
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.2', 'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.2',
'TinyPng_key'=>'', 'TinyPng_key'=>'',
'checkImg'=>0, 'checkImg'=>0,
'checkImg_value'=>50, 'checkImg_value'=>50,
'moderatecontent_key'=>'', 'moderatecontent_key'=>'',
'nsfwjs_url'=>'', 'nsfwjs_url'=>'',
'footer'=>'<a href="/admin/terms.php" target="_blank">请勿上传违反中国政策的图片</a> 'footer'=>' <a href="../public/images/alipay.jpg" title="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini" style="color:#1970fc;"><i class="icon icon-zhifubao"></i> 打赏作者</a>
<button class="btn btn-mini " type="button" style="color:#1970fc;" data-toggle="tooltip" title="您的赞美是我开发的动力!<img src=\'../public/images/alipay.jpg\'/>"><i class="icon icon-zhifubao"></i> 打赏作者</button>
<a href="/admin/terms.php" target="_blank">请勿上传违反中国政策的图片</a>
<script> <script>
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
@ -97,7 +100,7 @@ var _hmt = _hmt || [];
), ),
'language'=>0, 'language'=>0,
'version'=>'2.5.3', 'version'=>'2.5.3',
'update'=>'2022-02-22 21:08:18', 'update'=>'2022-02-23 00:06:31',
'terms'=>'<div class="container"> 'terms'=>'<div class="container">
<div class="row"> <div class="row">
<div class="col-xs-3"> <div class="col-xs-3">