修复标题
parent
837bdd5e59
commit
6ef54dcdcb
|
@ -103,7 +103,11 @@ $HTTP["url"] =~ "^/(i|public)/" {
|
|||
|
||||
<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
|
||||
|
|
|
@ -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>
|
||||
</div>
|
||||
<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 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>
|
||||
|
@ -369,7 +369,7 @@ if (isset($_GET['reimg'])) {
|
|||
<div class="form-group">
|
||||
<div class="switch switch-inline">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -693,7 +693,7 @@ if (isset($_GET['reimg'])) {
|
|||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-toggle="tooltip" title="界面语言切换 | 暂支持中文简繁体转换">界面语言</label>
|
||||
<label data-toggle="tooltip" title="暂支持中文简繁体转换">界面语言</label>
|
||||
<select class="chosen-select form-control" name="language">
|
||||
<option value="0" <?php if ($config['language'] == '0') echo 'selected'; ?>>简体中文</option>
|
||||
<option value="1" <?php if ($config['language'] == '1') echo 'selected'; ?>>繁體中文</option>
|
||||
|
@ -878,8 +878,13 @@ if (isset($_GET['reimg'])) {
|
|||
|
||||
// tips提示
|
||||
$('[data-toggle="tooltip"]').tooltip({
|
||||
tipClass: 'tooltip',
|
||||
placement: 'top',
|
||||
tipClass: 'tooltip-primary'
|
||||
html: true,
|
||||
delay: {
|
||||
show: 50,
|
||||
hide: 100
|
||||
}
|
||||
});
|
||||
// 账号密码 | 以md5加密方式发送
|
||||
function uploader_md5_post() {
|
||||
|
|
|
@ -720,6 +720,11 @@ function checkImg($imageUrl, $type = 1)
|
|||
}
|
||||
}
|
||||
|
||||
// 移入回收站
|
||||
if ($type == 3) {
|
||||
$bad_pic = true;
|
||||
}
|
||||
|
||||
/** # 如果违规则移动图片到违规文件夹 */
|
||||
if ($bad_pic == true) {
|
||||
$old_path = APP_ROOT . str_replace($config['imgurl'], '', $imageUrl); // 提交网址中的文件路径 /i/2021/10/29/p8vypd.png
|
||||
|
|
|
@ -163,7 +163,8 @@
|
|||
<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', '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>
|
||||
|
@ -260,9 +261,40 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
//获取所有的 checkbox 属性的 input标签
|
||||
function fun() {
|
||||
var r = confirm("确认要删除?\n* 删除文件夹后将无法恢复!")
|
||||
// 回收图片
|
||||
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);
|
||||
}
|
||||
$.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 = [];
|
||||
|
@ -389,6 +421,6 @@
|
|||
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>
|
||||
<?php require_once APP_ROOT . '/application/footer.php';
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* 删除文件页面
|
||||
* 删除/回收文件页面
|
||||
* @author Icret
|
||||
* 2022-2-23 11:01:52
|
||||
*/
|
||||
require_once __DIR__ . '/function.php';
|
||||
|
||||
|
@ -9,26 +11,20 @@ if (!is_who_login('admin')) {
|
|||
exit('Not Logged!');
|
||||
}
|
||||
|
||||
$del_url_array = isset($_POST['del_url_array']) ? $_POST['del_url_array'] : exit;
|
||||
// 删除文件
|
||||
if (isset($_POST['del_url_array'])) {
|
||||
$del_url_array = $_POST['del_url_array'];
|
||||
$del_num = count($del_url_array);
|
||||
for ($i = 0; $i < $del_num; $i++) {
|
||||
getDel($del_url_array[$i], 'url');
|
||||
}
|
||||
|
||||
$path = '/i/cache/';
|
||||
|
||||
if (deldir($path)) {
|
||||
echo '
|
||||
<script> new $.zui.Messager("删除成功!", {
|
||||
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后刷新当前页面
|
||||
}
|
||||
|
||||
// 回收文件
|
||||
if (isset($_POST['recycle_url_array'])) {
|
||||
$recycle_url_array = $_POST['recycle_url_array'];
|
||||
$del_num = count($recycle_url_array);
|
||||
for ($i = 0; $i < $del_num; $i++) {
|
||||
checkImg($recycle_url_array[$i], 3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,14 +40,17 @@ $config=Array
|
|||
'imgRatio_crop'=>0,
|
||||
'imgRatio_preserve_headers'=>1,
|
||||
'static_cdn'=>0,
|
||||
'theme'=>'default',
|
||||
'theme'=>'red',
|
||||
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.2',
|
||||
'TinyPng_key'=>'',
|
||||
'checkImg'=>0,
|
||||
'checkImg_value'=>50,
|
||||
'moderatecontent_key'=>'',
|
||||
'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>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
|
@ -97,7 +100,7 @@ var _hmt = _hmt || [];
|
|||
),
|
||||
'language'=>0,
|
||||
'version'=>'2.5.3',
|
||||
'update'=>'2022-02-22 21:08:18',
|
||||
'update'=>'2022-02-23 00:06:31',
|
||||
'terms'=>'<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
|
|
Loading…
Reference in New Issue