v2.7.2 dev
* 2023-02-03 v2.7.2 dev - 增加 [web-indexr](https://github.com/rehiy/web-indexr) 文件管理 - - web-indexr处于实验中,作为Tinyfilemanager的替代 - 优化排版pull/141/head
parent
739ebcf489
commit
fae2b6effe
|
@ -18,7 +18,7 @@
|
|||
[![Code size](https://img.shields.io/github/languages/code-size/icret/EasyImages2.0?color=blueviolet)](https://github.com/icret/EasyImages2.0)
|
||||
-->
|
||||
|
||||
>[演示](https://png.cm/) | [Chrome/Edge 插件](https://github.com/icret/EasyImage-Browser-Extension) | [使用手册](https://www.kancloud.cn/easyimage/easyimage/) | [Telegram](https://t.me/Easy_Image)
|
||||
>[演示](https://png.cm/) | [Chrome/Edge 插件](https://github.com/icret/EasyImage-Browser-Extension) | [使用手册](https://www.kancloud.cn/easyimage/easyimage/) | [社区讨论](https://github.com/icret/EasyImages2.0/discussions) | [Telegram](https://t.me/Easy_Image)
|
||||
>
|
||||
>本人善写bug 发现bug可提交 [issues](https://github.com/icret/EasyImages2.0/issues) 追求稳定请下载 [稳定版](https://github.com/icret/EasyImages2.0/releases)
|
||||
|
||||
|
@ -230,7 +230,12 @@ $HTTP["url"] =~ "^/(i|public)/" {
|
|||
|
||||
<details><summary>点击查看2.0版更新日志</summary>
|
||||
|
||||
* 2023-02-01 v2.7.1 dev
|
||||
* 2023-02-03 v2.7.2 dev
|
||||
- 增加 [web-indexr](https://github.com/rehiy/web-indexr) 文件管理
|
||||
- - web-indexr处于实验中,作为Tinyfilemanager的替代
|
||||
- 优化排版
|
||||
|
||||
* 2023-02-01 v2.7.1
|
||||
- 更新版本号
|
||||
|
||||
* 2023-02-01 v2.7.0 dev
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
* 简单图床设置页面
|
||||
* 2022-1-24 05:57:35
|
||||
*/
|
||||
require_once __DIR__ . '/../application/header.php';
|
||||
require_once __DIR__ . '/../application/header.php';
|
||||
require_once APP_ROOT . '/config/api_key.php';
|
||||
require_once APP_ROOT . '/config/config.guest.php';
|
||||
require_once APP_ROOT . '/config/config.guest.php';
|
||||
|
||||
// 检查登录
|
||||
if (!is_who_login('admin')) {
|
||||
|
@ -31,14 +31,14 @@ if (isset($_POST['update'])) {
|
|||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
</script>
|
||||
</script>
|
||||
';
|
||||
header("refresh:1;");
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加token
|
||||
* $_POST['add_token'] 生成的Token
|
||||
* $_POST['add_token'] 生成的Token
|
||||
* $_POST['add_token_id'] Token的ID
|
||||
* $_POST['add_token_expired'] 过期时间
|
||||
*/
|
||||
|
@ -57,14 +57,14 @@ if (isset($_POST['add_token_id'])) {
|
|||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
</script>
|
||||
</script>
|
||||
';
|
||||
header("refresh:1;");
|
||||
}
|
||||
|
||||
// 禁用Token
|
||||
if (isset($_GET['stop_token'])) {
|
||||
$stop_token = $_GET['stop_token'];
|
||||
$stop_token = $_GET['stop_token'];
|
||||
$postArr = array(
|
||||
$stop_token => array(
|
||||
'id' => 0,
|
||||
|
@ -81,7 +81,7 @@ if (isset($_GET['stop_token'])) {
|
|||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
</script>
|
||||
</script>
|
||||
';
|
||||
header("refresh:1;url=/admin/admin.inc.php");
|
||||
}
|
||||
|
@ -97,14 +97,14 @@ if (isset($_GET['delete_token'])) {
|
|||
type: "primary", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();
|
||||
</script>
|
||||
</script>
|
||||
';
|
||||
header("refresh:1;url=/admin/admin.inc.php");
|
||||
}
|
||||
|
||||
// 禁用用户
|
||||
if (isset($_GET['stop_guest'])) {
|
||||
$stop_guest = $_GET['stop_guest'];
|
||||
$stop_guest = $_GET['stop_guest'];
|
||||
$postArr = array(
|
||||
$stop_guest => array(
|
||||
'password' => $guestConfig[$stop_guest]['password'],
|
||||
|
@ -336,6 +336,7 @@ if (isset($_POST['del_version_file'])) {
|
|||
</form>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="Content2">
|
||||
|
||||
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
|
||||
<div class="form-group col-md-12">
|
||||
<div class="form-group col-md-1">
|
||||
|
@ -414,6 +415,7 @@ if (isset($_POST['del_version_file'])) {
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="Content3">
|
||||
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
|
||||
<div class="form-group">
|
||||
|
@ -506,68 +508,76 @@ if (isset($_POST['del_version_file'])) {
|
|||
</form>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="Content6">
|
||||
<h5 class="header-dividing">上传日志 <small>需要开启上传日志</small></h5>
|
||||
<form class="form-inline" action="../application/viewlog.php" method="post" target="_blank">
|
||||
<div class="form-group">
|
||||
<label for="logDate" class="text-primary">选择月份: </label>
|
||||
<input type="text" class="form-control logDate input-sm" id="logDate" name="logDate" value="<?php echo date('Y-m'); ?>" required="required" readonly>
|
||||
<input type="hidden" class="form-control" name="pass" value="<?php echo md5($config['password'] . date('YMDH')); ?>" placeholder="日志访问秘钥">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<h5 class="header-dividing">上传日志 <small>需要开启上传日志</small></h5>
|
||||
<form class="form-inline" action="../application/viewlog.php" method="post" target="_blank">
|
||||
<div class="form-group">
|
||||
<label for="logDate" class="text-primary">选择月份: </label>
|
||||
<input type="text" class="form-control logDate input-sm" id="logDate" name="logDate" value="<?php echo date('Y-m'); ?>" required="required" readonly>
|
||||
<input type="hidden" class="form-control" name="pass" value="<?php echo md5($config['password'] . date('YMDH')); ?>" placeholder="日志访问秘钥">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-sm btn-primary">查看日志</button>
|
||||
</form>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-sm btn-primary">查看日志</button>
|
||||
</form>
|
||||
<hr />
|
||||
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
|
||||
<div class="form-group col-md-12">
|
||||
<div class="form-group col-md-6">
|
||||
<label>缩略图生成方式</label>
|
||||
<div class="radio-primary">
|
||||
<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 class="col-md-6">
|
||||
<h5 class="header-dividing">清理缓存 <small>已缓存: <?php echo getFileNumber(APP_ROOT . $config['path'] . 'cache/') . '文件 | 占用' . getDistUsed(getDirectorySize(APP_ROOT . $config['path'] . 'cache/')); ?></small></h5>
|
||||
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
|
||||
<button type="submit" class="btn btn-mini btn-success" name="delDir" value="cache/" onClick="return confirm('确认要清理缓存?\n* 删除文件夹后将无法恢复! ');"><i class="icon icon-trash"> 清理缓存</i></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<h5 class="header-dividing">缩略图</h5>
|
||||
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
|
||||
<div class="form-group col-md-12">
|
||||
<div class="form-group col-md-6">
|
||||
<label data-toggle="tooltip" title="请选择合适的缩略图生成方式">生成方式</label>
|
||||
<div class="input-group" data-toggle="tooltip" title="原图 | 直接输出上传链接,会导致流量增加<br/>缓存方式 (推荐) | 利用TimThumb生成 优点: 带缓存周期 | 缺点: cdn无法缓存<br/>上传生成 | 优点: 缩略图直链,缓存不失效 | 低配vps负载较大,影响前端上传速度">
|
||||
<span class="input-group-addon input-sm">生成模式</span>
|
||||
<select class="form-control input-sm" name="thumbnail">
|
||||
<option value="0" <?php if ($config['thumbnail'] == 0) echo 'selected'; ?>>原图</option>
|
||||
<option value="1" <?php if ($config['thumbnail'] == 1) echo 'selected'; ?>>缓存方式 | 推荐</option>
|
||||
<option value="2" <?php if ($config['thumbnail'] == 2) echo 'selected'; ?>>上传生成 | 直链</option>
|
||||
</select>
|
||||
</div>
|
||||
</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生成 | 优点: 带缓存周期 | 缺点: 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="优点: 缩略图直链,缓存不失效 | 低配vps负载较大,影响前端上传速度"> 访问生成 | 直链</label>
|
||||
<div class="form-group col-md-6">
|
||||
<label data-toggle="tooltip" title="已生成的缩略图不会失效 需清理缓存">生成大小</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon input-sm">宽</span>
|
||||
<input type="number" name="thumbnail_w" class="form-control input-sm" placeholder="258" value="<?php if (!empty($config['thumbnail_w'])) echo $config['thumbnail_w']; ?>">
|
||||
<span class="input-group-addon input-sm">px</span>
|
||||
<span class="input-group-addon input-sm">高</span>
|
||||
<input type="number" name="thumbnail_h" class="form-control input-sm" placeholder="258" value="<?php if (!empty($config['thumbnail_h'])) echo $config['thumbnail_h']; ?>">
|
||||
<span class="input-group-addon input-sm">px</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label data-toggle="tooltip" title="更改后已经生成的缩略图不会失效 需清除缓存">缩略图尺寸</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon input-sm">宽</span>
|
||||
<input type="number" name="thumbnail_w" class="form-control input-sm" placeholder="258" value="<?php if (!empty($config['thumbnail_w'])) echo $config['thumbnail_w']; ?>">
|
||||
<span class="input-group-addon input-sm">px</span>
|
||||
<span class="input-group-addon fix-border fix-padding"></span>
|
||||
<span class="input-group-addon input-sm">高</span>
|
||||
<input type="number" name="thumbnail_h" class="form-control input-sm" placeholder="258" value="<?php if (!empty($config['thumbnail_h'])) echo $config['thumbnail_h']; ?>">
|
||||
<span class="input-group-addon input-sm">px</span>
|
||||
<div class="form-group">
|
||||
<label for="report" data-toggle="tooltip" title="举报地址支持Zoho表单、金数据、表单大师等<br/>(推荐ZOHO)留空则不显示">举报地址 <a href="https://store.zoho.com.cn/referral.do?servicename=ZohoForms&category=ZohoForms&ref=52f8a4e98a7a7d4c2475713784605af0dc842f6cc9732dd77f37b87f2959149e212e550f50a869f70360f15b80a4abc6" target="_blank"><i class="icon icon-external-link"></i></a></label>
|
||||
<input type="text" class="form-control" id="report" name="report" value="<? if ($config['report']) echo $config['report']; ?>" placeholder="可以是网址或邮箱" onkeyup="this.value=this.value.replace(/\s/g,'')">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="switch switch-inline">
|
||||
<input type="hidden" name="static_cdn" value="0">
|
||||
<input type="checkbox" name="static_cdn" value="1" <?php if ($config['static_cdn']) echo 'checked="checked"'; ?>>
|
||||
<label style="font-weight: bold">静态文件CDN地址 | 末尾不加'/'</label>
|
||||
</div>
|
||||
<input type="url" class="form-control" name="static_cdn_url" value="<?php echo $config['static_cdn_url']; ?>" onkeyup="this.value=this.value.replace(/\s/g,'')" data-toggle="tooltip" title="jsdelivr可在后边添加版本号 例:@2.5.6">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="report" data-toggle="tooltip" title="举报地址支持Zoho表单、金数据、表单大师等<br/>(推荐ZOHO)留空则不显示">举报地址 <a href="https://store.zoho.com.cn/referral.do?servicename=ZohoForms&category=ZohoForms&ref=52f8a4e98a7a7d4c2475713784605af0dc842f6cc9732dd77f37b87f2959149e212e550f50a869f70360f15b80a4abc6" target="_blank"><i class="icon icon-external-link"></i></a></label>
|
||||
<input type="text" class="form-control" id="report" name="report" value="<? if ($config['report']) echo $config['report']; ?>" placeholder="可以是网址或邮箱" onkeyup="this.value=this.value.replace(/\s/g,'')">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="switch switch-inline">
|
||||
<input type="hidden" name="static_cdn" value="0">
|
||||
<input type="checkbox" name="static_cdn" value="1" <?php if ($config['static_cdn']) echo 'checked="checked"'; ?>>
|
||||
<label style="font-weight: bold">静态文件CDN地址 | 末尾不加'/'</label>
|
||||
<div class="form-group">
|
||||
<div class="switch switch-inline">
|
||||
<input type="hidden" name="check_ip" value="0">
|
||||
<input type="checkbox" name="check_ip" value="1" <?php if ($config['check_ip']) echo 'checked="checked"'; ?>>
|
||||
<label style="font-weight: bold">黑/白IP名单上传</label>
|
||||
</div>
|
||||
<textarea class="form-control" rows="5" name="check_ip_list" data-toggle="tooltip" title="每个IP以英文,结尾 支持IP段 例:123.23.23.44,193.134.*.*" placeholder=" 每个IP以英文,结尾 支持IP段 例:192.168.1.13,123.23.23.44,193.134.*.*"><?php echo $config['check_ip_list']; ?></textarea>
|
||||
<label class="radio-inline"><input type="radio" name="check_ip_model" value="0" <?php if ($config['check_ip_model'] == 0) echo 'checked'; ?>> 黑名单模式</label>
|
||||
<label class="radio-inline"><input type="radio" name="check_ip_model" value="1" <?php if ($config['check_ip_model'] == 1) echo 'checked'; ?>> 白名单模式</label>
|
||||
</div>
|
||||
<input type="url" class="form-control" name="static_cdn_url" value="<?php echo $config['static_cdn_url']; ?>" onkeyup="this.value=this.value.replace(/\s/g,'')" data-toggle="tooltip" title="jsdelivr可在后边添加版本号 例:@2.5.6">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="switch switch-inline">
|
||||
<input type="hidden" name="check_ip" value="0">
|
||||
<input type="checkbox" name="check_ip" value="1" <?php if ($config['check_ip']) echo 'checked="checked"'; ?>>
|
||||
<label style="font-weight: bold">黑/白IP名单上传</label>
|
||||
</div>
|
||||
<textarea class="form-control" rows="5" name="check_ip_list" data-toggle="tooltip" title="每个IP以英文,结尾 支持IP段 例:123.23.23.44,193.134.*.*" placeholder=" 每个IP以英文,结尾 支持IP段 例:192.168.1.13,123.23.23.44,193.134.*.*"><?php echo $config['check_ip_list']; ?></textarea>
|
||||
<label class="radio-inline"><input type="radio" name="check_ip_model" value="0" <?php if ($config['check_ip_model'] == 0) echo 'checked'; ?>> 黑名单模式</label>
|
||||
<label class="radio-inline"><input type="radio" name="check_ip_model" value="1" <?php if ($config['check_ip_model'] == 1) echo 'checked'; ?>> 白名单模式</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h5 class="header-dividing">高级设置 <?php if ($config['domain'] == $config['imgurl']) echo '<small> 网站域名与图片域名相同,锁定隐藏' . $config['path'] . '目录开关</small>'; ?></h5>
|
||||
<div class="col-md-12">
|
||||
<h5 class="header-dividing">高级设置 <?php if ($config['domain'] == $config['imgurl']) echo '<small> 网站域名与图片域名相同,锁定隐藏' . $config['path'] . '目录开关</small>'; ?></h5>
|
||||
<div class="col-md-2">
|
||||
<div class="switch switch-inline" data-toggle="tooltip" title="网址设置->弹窗公告修改内容<br />重开浏览器访问网站会再次展示公告弹窗">
|
||||
<input type="hidden" name="notice_status" value="0">
|
||||
|
@ -689,94 +699,94 @@ if (isset($_POST['del_version_file'])) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="switch switch-inline" data-toggle="tooltip" title="通过指定参数查询图床的开放数据 | 与缓存周期同步 | 使用方法见使用手册->公共查询">
|
||||
<input type="hidden" name="public" value="0">
|
||||
<input type="checkbox" name="public" value="1" <?php if ($config['public']) echo 'checked'; ?>>
|
||||
<label style="font-weight: bold">开放数据<i class="icon icon-long-arrow-down"></i></label>
|
||||
<div class="col-md-12">
|
||||
<div class="switch switch-inline" data-toggle="tooltip" title="通过指定参数查询图床的开放数据 | 与缓存周期同步 | 使用方法见使用手册->公共查询">
|
||||
<input type="hidden" name="public" value="0">
|
||||
<input type="checkbox" name="public" value="1" <?php if ($config['public']) echo 'checked'; ?>>
|
||||
<label style="font-weight: bold">开放数据<i class="icon icon-long-arrow-down"></i></label>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="<?php echo $config['domain']; ?>/api/public.php?show=time">
|
||||
<input type="checkbox" name="public_list[]" value="time" id="time" <?php if (in_array('time', $config['public_list'])) echo 'checked'; ?>><label for="time">统计时间</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="开启分离后仅统计游客上传<br />public.php?show=today">
|
||||
<input type="checkbox" name="public_list[]" value="today" id="today" <?php if (in_array('today', $config['public_list'])) echo 'checked'; ?>><label for="today">今日</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="开启分离后仅统计游客上传<br />public.php?show=yesterday">
|
||||
<input type="checkbox" name="public_list[]" value="yesterday" id="yesterday" <?php if (in_array('yesterday', $config['public_list'])) echo 'checked'; ?>><label for="yesterday">昨日</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=total_space">
|
||||
<input type="checkbox" name="public_list[]" value="total_space" id="total_space" <?php if (in_array('total_space', $config['public_list'])) echo 'checked'; ?>><label for="total_space">总空间</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=used_space">
|
||||
<input type="checkbox" name="public_list[]" value="used_space" id="used_space" <?php if (in_array('used_space', $config['public_list'])) echo 'checked'; ?>><label for="used_space">已用</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=free_space">
|
||||
<input type="checkbox" name="public_list[]" value="free_space" id="free_space" <?php if (in_array('free_space', $config['public_list'])) echo 'checked'; ?>><label for="free_space">剩余</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=image_used">
|
||||
<input type="checkbox" name="public_list[]" value="image_used" id="image_used" <?php if (in_array('image_used', $config['public_list'])) echo 'checked'; ?>><label for="image_used">图片占用</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=file">
|
||||
<input type="checkbox" name="public_list[]" value="file" id="file" <?php if (in_array('file', $config['public_list'])) echo 'checked'; ?>><label for="file">文件数量</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=dir">
|
||||
<input type="checkbox" name="public_list[]" value="dir" id="dir" <?php if (in_array('dir', $config['public_list'])) echo 'checked'; ?>><label for="dir">文件夹数量</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="开启分离后仅统计游客上传<br />public.php?show=month">
|
||||
<input type="checkbox" name="public_list[]" value="month" id="month" <?php if (in_array('month', $config['public_list'])) echo 'checked'; ?>><label for="month">最近30日上传</label>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<div class="panel-body">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="<?php echo $config['domain']; ?>/api/public.php?show=time">
|
||||
<input type="checkbox" name="public_list[]" value="time" id="time" <?php if (in_array('time', $config['public_list'])) echo 'checked'; ?>><label for="time">统计时间</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="开启分离后仅统计游客上传<br />public.php?show=today">
|
||||
<input type="checkbox" name="public_list[]" value="today" id="today" <?php if (in_array('today', $config['public_list'])) echo 'checked'; ?>><label for="today">今日</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="开启分离后仅统计游客上传<br />public.php?show=yesterday">
|
||||
<input type="checkbox" name="public_list[]" value="yesterday" id="yesterday" <?php if (in_array('yesterday', $config['public_list'])) echo 'checked'; ?>><label for="yesterday">昨日</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=total_space">
|
||||
<input type="checkbox" name="public_list[]" value="total_space" id="total_space" <?php if (in_array('total_space', $config['public_list'])) echo 'checked'; ?>><label for="total_space">总空间</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=used_space">
|
||||
<input type="checkbox" name="public_list[]" value="used_space" id="used_space" <?php if (in_array('used_space', $config['public_list'])) echo 'checked'; ?>><label for="used_space">已用</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=free_space">
|
||||
<input type="checkbox" name="public_list[]" value="free_space" id="free_space" <?php if (in_array('free_space', $config['public_list'])) echo 'checked'; ?>><label for="free_space">剩余</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=image_used">
|
||||
<input type="checkbox" name="public_list[]" value="image_used" id="image_used" <?php if (in_array('image_used', $config['public_list'])) echo 'checked'; ?>><label for="image_used">图片占用</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=file">
|
||||
<input type="checkbox" name="public_list[]" value="file" id="file" <?php if (in_array('file', $config['public_list'])) echo 'checked'; ?>><label for="file">文件数量</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="public.php?show=dir">
|
||||
<input type="checkbox" name="public_list[]" value="dir" id="dir" <?php if (in_array('dir', $config['public_list'])) echo 'checked'; ?>><label for="dir">文件夹数量</label>
|
||||
</label>
|
||||
<label class="checkbox-inline" data-toggle="tooltip" title="开启分离后仅统计游客上传<br />public.php?show=month">
|
||||
<input type="checkbox" name="public_list[]" value="month" id="month" <?php if (in_array('month', $config['public_list'])) echo 'checked'; ?>><label for="month">最近30日上传</label>
|
||||
</label>
|
||||
<label>缓存周期 | 当前: </label>
|
||||
<label id="cache_freq"><?php echo $config['cache_freq']; ?></label><label>小时</label>
|
||||
<input type="range" class="form-control" name="cache_freq" value="<?php echo $config['cache_freq']; ?>" min="1" step="1" max="24" onchange="document.getElementById('cache_freq').innerHTML=value">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>图片违规判断率 | 当前: </label>
|
||||
<label id="checkImg_value"><?php echo $config['checkImg_value']; ?></label><label>%</label>
|
||||
<input type="range" class="form-control" name="checkImg_value" value="<?php echo $config['checkImg_value']; ?>" min="1" max="100" step="1" onchange="document.getElementById('checkImg_value').innerHTML=value">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>缓存周期 | 当前: </label>
|
||||
<label id="cache_freq"><?php echo $config['cache_freq']; ?></label><label>小时</label>
|
||||
<input type="range" class="form-control" name="cache_freq" value="<?php echo $config['cache_freq']; ?>" min="1" step="1" max="24" onchange="document.getElementById('cache_freq').innerHTML=value">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="input-group" data-toggle="tooltip" title="请输入限制数量 | 0 为不限制<br /> 开启监黄,水印等受网络波动和机器性能,执行完毕前限制不生效!">
|
||||
<span class="input-group-addon">游客上传限制</span>
|
||||
<input class="form-control input-sm" type="number" name="ip_upload_counts" value="<?php echo $config['ip_upload_counts']; ?>">
|
||||
<span class="input-group-addon">张</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>图片违规判断率 | 当前: </label>
|
||||
<label id="checkImg_value"><?php echo $config['checkImg_value']; ?></label><label>%</label>
|
||||
<input type="range" class="form-control" name="checkImg_value" value="<?php echo $config['checkImg_value']; ?>" min="1" max="100" step="1" onchange="document.getElementById('checkImg_value').innerHTML=value">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="input-group" data-toggle="tooltip" title="请输入限制数量 | 0 为不限制<br /> 开启监黄,水印等受网络波动和机器性能,执行完毕前限制不生效!">
|
||||
<span class="input-group-addon">游客上传限制</span>
|
||||
<input class="form-control input-sm" type="number" name="ip_upload_counts" value="<?php echo $config['ip_upload_counts']; ?>">
|
||||
<span class="input-group-addon">张</span>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="input-group" data-toggle="tooltip" title="使用nsfwjs方式需要自行搭建或使用开源接口 据说准确率能达到93%">
|
||||
<span class="input-group-addon input-sm">图片鉴黄</span>
|
||||
<select class="form-control input-sm" name="checkImg">
|
||||
<option value="0" <?php if ($config['checkImg'] == 0) echo 'selected'; ?>>关闭</option>
|
||||
<option value="1" <?php if ($config['checkImg'] == 1) echo 'selected'; ?>>moderatecontent | API 设置中填入Moderate Key</option>
|
||||
<option value="2" <?php if ($config['checkImg'] == 2) echo 'selected'; ?> title="">nsfwjs | API 设置中填入nsfwjs url</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="input-group" data-toggle="tooltip" title="使用nsfwjs方式需要自行搭建或使用开源接口 据说准确率能达到93%">
|
||||
<span class="input-group-addon input-sm">图片鉴黄</span>
|
||||
<select class="form-control input-sm" name="checkImg">
|
||||
<option value="0" <?php if ($config['checkImg'] == 0) echo 'selected'; ?>>关闭</option>
|
||||
<option value="1" <?php if ($config['checkImg'] == 1) echo 'selected'; ?>>moderatecontent | API 设置中填入Moderate Key</option>
|
||||
<option value="2" <?php if ($config['checkImg'] == 2) echo 'selected'; ?> title="">nsfwjs | API 设置中填入nsfwjs url</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="hidden" class="form-control" name="update" value="<?php echo date("Y-m-d H:i:s"); ?>" placeholder="隐藏的保存">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="hidden" class="form-control" name="update" value="<?php echo date("Y-m-d H:i:s"); ?>" placeholder="隐藏的保存">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">保存</button>
|
||||
</form>
|
||||
<button type="submit" class="btn btn-primary">保存</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="Content7">
|
||||
<h5 class="header-dividing">可疑图片<small> 鉴黄查到的可疑图片</small></h5>
|
||||
|
@ -797,16 +807,16 @@ if (isset($_POST['del_version_file'])) {
|
|||
<tbody>
|
||||
<?php
|
||||
// 获取被隔离的文件
|
||||
$cache_dir = APP_ROOT . $config['path'] . 'suspic/'; // cache目录
|
||||
$cache_file = get_file_by_glob($cache_dir . '*.*'); // 获取所有文件
|
||||
$cache_num = count($cache_file); // 统计目录文件个数
|
||||
for ($i = 0; $i < $cache_num and $i < 21; $i++) : // 循环输出文件
|
||||
$file_cache_path = APP_ROOT . $config['path'] . 'suspic/' . $cache_file[$i]; // 绝对路径
|
||||
$file_path = $config['path'] . 'suspic/' . $cache_file[$i]; // 相对路径
|
||||
$file_size = getDistUsed(filesize($file_cache_path)); // 大小
|
||||
$filen_name = $cache_file[$i]; // 名称
|
||||
$url = $config['domain'] . $file_path; // 网络连接
|
||||
$unlink_img = $config['domain'] . '/application/del.php?url=' . $file_path; // 删除连接
|
||||
$cache_dir = APP_ROOT . $config['path'] . 'suspic/'; // cache目录
|
||||
$cache_file = get_file_by_glob($cache_dir . '*.*'); // 获取所有文件
|
||||
$cache_num = count($cache_file); // 统计目录文件个数
|
||||
for ($i = 0; $i < $cache_num and $i < 21; $i++) : // 循环输出文件
|
||||
$file_cache_path = APP_ROOT . $config['path'] . 'suspic/' . $cache_file[$i]; // 绝对路径
|
||||
$file_path = $config['path'] . 'suspic/' . $cache_file[$i]; // 相对路径
|
||||
$file_size = getDistUsed(filesize($file_cache_path)); // 大小
|
||||
$filen_name = $cache_file[$i]; // 名称
|
||||
$url = $config['domain'] . $file_path; // 网络连接
|
||||
$unlink_img = $config['domain'] . '/application/del.php?url=' . $file_path; // 删除连接
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $i; ?></td>
|
||||
|
@ -835,7 +845,7 @@ if (isset($_POST['del_version_file'])) {
|
|||
<hr />
|
||||
<p class="text-ellipsis">服务系统: <?PHP echo php_uname('s') . ' <small class="text-muted">' . php_uname() . '</small>'; ?></p>
|
||||
<p class="text-ellipsis">Web服务: <?PHP echo $_SERVER['SERVER_SOFTWARE']; ?></p>
|
||||
<p class="text-ellipsis">服务器IP: <?PHP echo $_SERVER["SERVER_ADDR"] ?></p>
|
||||
<p class="text-ellipsis">服务器IP: <?PHP echo $_SERVER["SERVER_ADDR"] ?></p>
|
||||
<p class="text-ellipsis">系统时间: <?PHP echo date("Y-m-d H:i:s"); ?></p>
|
||||
<p class="text-ellipsis">占用内存: <?php echo getDistUsed(memory_get_usage()); ?></p>
|
||||
<p class="text-ellipsis">占用磁盘: <?php echo getDistUsed(disk_total_space(__DIR__) - disk_free_space(__DIR__)) ?></p>
|
||||
|
@ -860,7 +870,16 @@ if (isset($_POST['del_version_file'])) {
|
|||
<a href="https://github.com/icret/EasyImage-Browser-Extension" target="_blank"><span class="label label-badge label-primary" data-toggle="tooltip" title="浏览器插件">Chrome</span></a>
|
||||
<a href="https://www.kancloud.cn/easyimage/easyimage/2625228" target="_blank"><span class="label label-badge label-primary" 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-primary" data-toggle="tooltip" title="使用PicGo上传">PicGo</span></a>
|
||||
<h6>图床依赖</h6>
|
||||
<h6>开发支持</h6>
|
||||
<p>
|
||||
<a href="https://png.cm/?demo" target="_blank"><span class="label label-badge label-primary" data-toggle="tooltip" title="演示地址"><i class="icon icon-external-link"></i> demo</span></a>
|
||||
<a href="https://www.kancloud.cn/easyimage/easyimage/content" target="_blank"><span class="label label-badge label-primary" data-toggle="tooltip" title="使用手册"><i class="icon icon-book"></i> manual</span></a>
|
||||
<a href="https://github.com/icret/EasyImages2.0/discussions" target="_blank"><span class="label label-badge label-primary" data-toggle="tooltip" title="GitHub 社区"><i class="icon icon-comments-alt"></i> discussions</span></a>
|
||||
<a href="https://t.me/Easy_Image" target="_blank"><span class="label label-badge label-primary" data-toggle="tooltip" title="EasyImage Telegram Group"><i class="icon icon-comments-alt"></i> Telegram</span></a>
|
||||
<a href="../public/images/wechat.jpg" data-toggle="lightbox" style="color:#329d38;"><i data-toggle="tooltip" title="您的赞美是我开发的动力!" class="icon icon-wechat"></i></a>
|
||||
<a href="../public/images/alipay.jpg" data-toggle="lightbox" class="hidden-xs inline-block" style="color:#1970fc;"><i class="icon icon-zhifubao" data-toggle="tooltip" title="您的赞美是我开发的动力!"> </i></a>
|
||||
</p>
|
||||
<h6>程序依赖</h6>
|
||||
<p>
|
||||
<a href="https://www.openzui.com/" target="_blank"><span class="label label-badge label-primary" data-toggle="tooltip" title="前端框架">ZUI</span></a>
|
||||
<a href="https://github.com/verot/class.upload.php" target="_blank"><span class="label label-badge label-primary" data-toggle="tooltip" title="图像处理类">Verot</span></a>
|
||||
|
@ -879,7 +898,7 @@ if (isset($_POST['del_version_file'])) {
|
|||
<span class="label label-badge label-primary" data-toggle="tooltip" title="当前版本"><?php echo get_current_version(); ?></span>
|
||||
<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>
|
||||
<p class="text-muted"><i class="icon icon-certificate"> EasyImage2.0简单图床构建于众多优秀的开源项目之上, 非常感谢这些项目!</i></p>
|
||||
</div>
|
||||
<div class="collapse" id="Ip2Region">
|
||||
<div class="bg-primary with-padding">
|
||||
|
@ -1246,10 +1265,7 @@ if (isset($_POST['del_version_file'])) {
|
|||
<div class="tab-pane fade" id="Content14">
|
||||
<h5 class="header-dividing">文件管理 <small>由作者定制,非必要请勿替换</small></h5>
|
||||
<a class="btn btn-mini btn-primary" href="/admin/manager.php?p=<?php echo date('Y/m/d'); ?> " target="_blank" data-toggle="tooltip" title="使用Tinyfilemanager管理文件"><i class="icon icon-folder-open"> 文件管理</i></a>
|
||||
<h5 class="header-dividing">清理缓存 <small>已缓存: <?php echo getFileNumber(APP_ROOT . $config['path'] . 'cache/') . '文件 | 占用' . getDistUsed(getDirectorySize(APP_ROOT . $config['path'] . 'cache/')); ?></small></h5>
|
||||
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
|
||||
<button type="submit" class="btn btn-mini btn-success" name="delDir" value="cache/" onClick="return confirm('确认要清理缓存?\n* 删除文件夹后将无法恢复! ');"><i class="icon icon-trash"> 清理缓存</i></button>
|
||||
</form>
|
||||
<a class="btn btn-mini btn-primary" href="/i/manag.php?path=<?php echo date('Y/m/d'); ?> " target="_blank" data-toggle="tooltip" title="使用web-indexr管理文件"><i class="icon icon-folder-close"> 文件管理</i></a>
|
||||
<h5 class="header-dividing">删除文件 <small>* 删除后不可恢复</small></h5>
|
||||
<form class="form-inline" method="get" action="../application/del.php" id="form" name="delForm" target="_blank" style="margin-bottom: 5px;">
|
||||
<p id="delimgurl"></p>
|
||||
|
|
|
@ -1 +1 @@
|
|||
2.7.1
|
||||
2.7.2 dev
|
|
@ -15,7 +15,7 @@ include_once __DIR__ . "/header.php";
|
|||
<div class="col-md-12 history_clear">
|
||||
</div>
|
||||
<script src="<?php static_cdn(); ?>/public/static/EasyImage.js"></script>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/lazyload/lazyload.js"></script>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/lazyload/lazyload.min.js"></script>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/viewjs/viewer.min.js"></script>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/zui/lib/clipboard/clipboard.min.js"></script>
|
||||
<script>
|
||||
|
@ -25,7 +25,7 @@ include_once __DIR__ . "/header.php";
|
|||
console.log('url list: ' + value['url']) // 获取所有链接
|
||||
if (value['url'] !== undefined) {
|
||||
let v_url = parseURL(value['url']); // 获取链接路径 console.log(parseURL(value['url']).path);
|
||||
$('.listNum').append('<div class="col-md-4 col-sm-6 col-lg-3"><div class="card"><li><img src="../public/images/loading.svg" data-image="' + value['thumb'] + '" data-original="" alt="简单图床-EasyImage"></li><div class="bottom-bar"><a href="' + value['url'] + '" target="_blank"><i class="icon icon-picture" data-toggle="tooltip" title="打开" style="margin-left:10px;"></i></a><a href="#" class="copy" data-clipboard-text="' + value['url'] + '" data-toggle="tooltip" title="复制" style="margin-left:10px;"><i class="icon icon-copy"></i></a><a href="info.php?history=' + v_url.path + '" data-toggle="tooltip" title="信息" target="_blank" style="margin-left:10px;"><i class="icon icon-info-sign"></i></a><a href="down.php?dw=' + v_url.path + '" data-toggle="tooltip" title="下载" target="_blank" style="margin-left:10px;"><i class="icon icon-cloud-download"></i></a><a href="' + value['del'] + '" target="_blank"><i class="icon icon-trash" data-toggle="tooltip" title="删除" style="margin-left:10px;"></i></a><a href="#" data-toggle="tooltip" title="文件名" class="copy text-ellipsis" data-clipboard-text="' + value['srcName'] + '" style="margin-left:10px;">' + value['srcName'] + '</a></div></div></div>')
|
||||
$('.listNum').append('<div class="col-md-4 col-sm-6 col-lg-3"><div class="card"><li><img src="../public/images/loading.svg" data-image="' + value['thumb'] + '" data-original="" alt="简单图床-EasyImage"></li><div class="bottom-bar"><a href="' + value['url'] + '" target="_blank"><i class="icon icon-picture" data-toggle="tooltip" title="打开" style="margin-left:10px;"></i></a><a href="#" class="copy" data-clipboard-text="' + value['url'] + '" data-toggle="tooltip" title="复制" style="margin-left:10px;"><i class="icon icon-copy"></i></a><a href="info.php?img=' + v_url.path + '" data-toggle="tooltip" title="信息" target="_blank" style="margin-left:10px;"><i class="icon icon-info-sign"></i></a><a href="down.php?dw=' + v_url.path + '" data-toggle="tooltip" title="下载" target="_blank" style="margin-left:10px;"><i class="icon icon-cloud-download"></i></a><a href="' + value['del'] + '" target="_blank"><i class="icon icon-trash" data-toggle="tooltip" title="删除" style="margin-left:10px;"></i></a><a href="#" data-toggle="tooltip" title="文件名" class="copy text-ellipsis" data-clipboard-text="' + value['srcName'] + '" style="margin-left:10px;">' + value['srcName'] + '</a></div></div></div>')
|
||||
}
|
||||
})
|
||||
$('.history_clear').append('<h3 class="header-dividing" style="text-align: center;" data-toggle="tooltip" title="非上传记录|清空缓存|浏览器版本低不显示<br/>点击清空历史上传记录"><button class="btn btn-mini btn-primary" type="button"><i class="icon icon-eye-open"></i> 历史上传记录</button></h3>');
|
||||
|
|
|
@ -285,6 +285,7 @@ if ($config['ad_top']) echo $config['ad_top_info'];
|
|||
});
|
||||
}
|
||||
*/
|
||||
|
||||
//禁用右键
|
||||
document.onkeydown = function() {
|
||||
var e = window.event || arguments[0];
|
||||
|
|
Binary file not shown.
|
@ -184,7 +184,7 @@ if ($config['ad_top']) echo $config['ad_top_info'];
|
|||
}
|
||||
</style>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/zui/lib/bootbox/bootbox.min.js"></script>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/lazyload/lazyload.js"></script>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/lazyload/lazyload.min.js"></script>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/viewjs/viewer.min.js"></script>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/zui/lib/clipboard/clipboard.min.js"></script>
|
||||
<script type="application/javascript" src="<?php static_cdn(); ?>/public/static/zui/lib/datetimepicker/datetimepicker.min.js"></script>
|
||||
|
@ -357,7 +357,7 @@ if ($config['ad_top']) echo $config['ad_top_info'];
|
|||
onload: function(elem) {
|
||||
console.log(elem)
|
||||
},
|
||||
delay: 300
|
||||
delay: 300,
|
||||
})
|
||||
|
||||
// 按日期浏览
|
||||
|
|
|
@ -74,6 +74,7 @@ $ALLOWED_SITES = array(
|
|||
$config['imgurl'],
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* 修复无法生成生成webp动态图片的缩略图bug
|
||||
*/
|
||||
|
@ -81,6 +82,15 @@ if (isset($_GET['img'])) {
|
|||
|
||||
// 引入文件
|
||||
require_once __DIR__ . '/TimThumb.php';
|
||||
$src = $_GET['img'];
|
||||
|
||||
// 重定向不包含存储路径的缩略图地址
|
||||
if (!stristr($src, $config['path'])) {
|
||||
$src = $config['path'] . $src;
|
||||
header("Location:thumb.php?img=$src");
|
||||
exit();
|
||||
}
|
||||
|
||||
// 图片绝对路径
|
||||
$src = APP_ROOT . $_GET['img'];
|
||||
// 获取文件后缀
|
||||
|
|
|
@ -15,11 +15,12 @@ $config=Array
|
|||
<h5>目录保存以 年/月/日/ 递进,非必要请勿修改! 否则会导致部分操作不可用;</h5>
|
||||
<h5>本人仅为程序开源创作,如遇非法网站使用与本人无关,请勿用于商业用途;</h5>
|
||||
<h5>作为开发者你可以对相应的后台功能进行扩展(增删改相应代码),但请保留代码中源作者信息。</h5>
|
||||
<a href="https://png.cm/?admin.inc" 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://png.cm/?admin.inc" 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-book"></i> 手册</button></a>
|
||||
<a href="https://github.com/icret/EasyImages2.0/discussions" target="_blank"><button type="button" class="btn btn-mini"><i class="icon icon-comments-alt"></i> 社区</button></a>
|
||||
<a href="https://t.me/Easy_Image" target="_blank" data-toggle="tooltip" title="EasyImage Telegram Group"><button type="button" class="btn btn-mini"><i class="icon icon-plane"></i> Telegram</button></a>
|
||||
<a href="https://s2.loli.net/2023/01/20/laTuceHD3qjpd82.jpg" title="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini" style="color:#329d38;"><i class="icon icon-wechat"></i> 打赏作者</a>
|
||||
<a href="https://s2.loli.net/2023/01/20/rREU1dJk9HMxDFA.jpg" title="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini hidden-xs inline-block" style="color:#1970fc;"><i class="icon icon-zhifubao"></i> 打赏作者</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>',
|
||||
'domain'=>'http://127.0.0.1',
|
||||
'imgurl'=>'http://127.0.0.1',
|
||||
|
@ -41,7 +42,7 @@ $config=Array
|
|||
'textSize'=>50,
|
||||
'textFont'=>'/public/static/pang_men_zheng_dao_biao_ti_ti_3.0.ttf',
|
||||
'waterImg'=>'/public/images/watermark.png',
|
||||
'extensions'=>'gif,jpeg,png,tif,bmp,tif,svg,webp,jpg,tga,ico',
|
||||
'extensions'=>'gif,jpeg,png,tif,bmp,svg,webp,jpg,tga,ico',
|
||||
'compress'=>0,
|
||||
'compress_ratio'=>80,
|
||||
'thumbnail'=>1,
|
||||
|
@ -113,7 +114,7 @@ $config=Array
|
|||
'guest_path_status'=>0,
|
||||
'token_path_status'=>0,
|
||||
'admin_path'=>'u',
|
||||
'update'=>'2023-02-01 22:12:10',
|
||||
'update'=>'2023-02-03 16:44:22',
|
||||
'footer'=>'<a href="https://github.com/icret/EasyImages2.0" target="_blank" rel="nofollow" data-toggle="tooltip" title="Since 2018 - Github">© Since 2018</a>
|
||||
<a href="https://png.cm/" target="_blank" data-toggle="tooltip" title="EasyImage 简单图床">EasyImage</a>
|
||||
<a href="/admin/terms.php" target="_blank" data-toggle="tooltip" title="使用协议">DMCA</a>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,20 +0,0 @@
|
|||
|
||||
(function(){var root=(typeof self=='object'&&self.self==self&&self)||(typeof global=='object'&&global.global==global&&global)||this||{};Function.prototype.bind=Function.prototype.bind||function(context){if(typeof this!=="function"){throw new Error("Function.prototype.bind - what is trying to be bound is not callable");}
|
||||
var self=this;var args=Array.prototype.slice.call(arguments,1);var fNOP=function(){};var fBound=function(){var bindArgs=Array.prototype.slice.call(arguments);self.apply(this instanceof fNOP?this:context,args.concat(bindArgs));}
|
||||
fNOP.prototype=this.prototype;fBound.prototype=new fNOP();return fBound;}
|
||||
var util={extend:function(target){for(var i=1,len=arguments.length;i<len;i++){for(var prop in arguments[i]){if(arguments[i].hasOwnProperty(prop)){target[prop]=arguments[i][prop]}}}
|
||||
return target},addEvent:function(elem,type,fn){if(document.addEventListener){elem.addEventListener(type,fn,false);return fn;}else if(document.attachEvent){var bound=function(){return fn.apply(elem,arguments)}
|
||||
elem.attachEvent('on'+type,bound);return bound;}},removeEvent:function(elem,type,fn){if(document.removeEventListener){elem.removeEventListener(type,fn,false)}
|
||||
else{elem.detachEvent("on"+type,fn)}}}
|
||||
function Lazy(opts){this.opts=util.extend({},this.constructor.defaultOpts,opts)
|
||||
this.init();}
|
||||
Lazy.VERSION='1.0.0';Lazy.defaultOpts={delay:250,useDebounce:false}
|
||||
var proto=Lazy.prototype;proto.init=function(){this.calulateView();this.bindScrollEvent();};proto.calulateView=function(){this.view={top:0-(parseInt(this.opts.top,10)||0),bottom:(root.innerHeight||document.documentElement.clientHeight)+(parseInt(this.opts.bottom,10)||0),left:0-(parseInt(this.opts.left,10)||0),right:(root.innerWidth||document.documentElement.clientWidth)+(parseInt(this.opts.right,10)||0)}};proto.bindScrollEvent=function(){var scrollEvent=util.addEvent(root,'scroll',this.handleLazyLoad.bind(this))
|
||||
var loadEvent=util.addEvent(root,'load',this.handleLazyLoad.bind(this))
|
||||
this.event={scrollEvent:scrollEvent,loadEvent:loadEvent}};var timer=null;proto.handleLazyLoad=function(){var self=this;if(!this.opts.useDebounce&&!!timer){return;}
|
||||
clearTimeout(timer);timer=setTimeout(function(){timer=null;self.render()},this.opts.delay);};proto.isHidden=function(element){return(element.offsetParent===null);};proto.checkInView=function(element){if(this.isHidden(element)){return false;}
|
||||
var rect=element.getBoundingClientRect();return(rect.right>=this.view.left&&rect.bottom>=this.view.top&&rect.left<=this.view.right&&rect.top<=this.view.bottom);};proto.render=function(){var nodes=document.querySelectorAll('[data-image], [data-lazy-background]');var length=nodes.length;for(var i=0;i<length;i++){elem=nodes[i];if(this.checkInView(elem)){if(elem.getAttribute('data-lazy-background')!==null){elem.style.backgroundImage='url('+elem.getAttribute('data-lazy-background')+')';}else if(elem.src!==(src=elem.getAttribute('data-image'))){elem.src=src;}
|
||||
elem.removeAttribute('data-image');elem.removeAttribute('data-lazy-background');if(this.opts.onload&&typeof this.opts.onload==='function'){this.opts.onload(elem);}}}
|
||||
if(!length){this.unbindScrollEvent();}};proto.unbindScrollEvent=function(){util.removeEvent(root,'scroll',this.event.scrollEvent)
|
||||
util.removeEvent(root,'load',this.event.loadEvent)};if(typeof exports!='undefined'&&!exports.nodeType){if(typeof module!='undefined'&&!module.nodeType&&module.exports){exports=module.exports=Lazy;}
|
||||
exports.Lazy=Lazy;}else{root.Lazy=Lazy;}}());
|
|
@ -0,0 +1,5 @@
|
|||
/*!
|
||||
* 懒加载 - 因兼容问题将 data-lazy-src 替换为data-image
|
||||
* https://github.com/mqyqingfeng/LazyLoad
|
||||
*/
|
||||
!function(){function t(t){this.opts=n.extend({},this.constructor.defaultOpts,t),this.init()}var e="object"==typeof self&&self.self==self&&self||"object"==typeof global&&global.global==global&&global||this||{};Function.prototype.bind=Function.prototype.bind||function(t){if("function"!=typeof this)throw new Error("Function.prototype.bind - what is trying to be bound is not callable");var e=this,n=Array.prototype.slice.call(arguments,1),o=function(){},i=function(){var i=Array.prototype.slice.call(arguments);e.apply(this instanceof o?this:t,n.concat(i))};return o.prototype=this.prototype,i.prototype=new o,i};var n={extend:function(t){for(var e=1,n=arguments.length;e<n;e++)for(var o in arguments[e])arguments[e].hasOwnProperty(o)&&(t[o]=arguments[e][o]);return t},addEvent:function(t,e,n){if(document.addEventListener)return t.addEventListener(e,n,!1),n;if(document.attachEvent){var o=function(){return n.apply(t,arguments)};return t.attachEvent("on"+e,o),o}},removeEvent:function(t,e,n){document.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)}};t.VERSION="1.0.0",t.defaultOpts={delay:250,useDebounce:!1};var o=t.prototype;o.init=function(){this.calulateView(),this.bindScrollEvent()},o.calulateView=function(){this.view={top:0-(parseInt(this.opts.top,10)||0),bottom:(e.innerHeight||document.documentElement.clientHeight)+(parseInt(this.opts.bottom,10)||0),left:0-(parseInt(this.opts.left,10)||0),right:(e.innerWidth||document.documentElement.clientWidth)+(parseInt(this.opts.right,10)||0)}},o.bindScrollEvent=function(){var t=n.addEvent(e,"scroll",this.handleLazyLoad.bind(this)),o=n.addEvent(e,"load",this.handleLazyLoad.bind(this));this.event={scrollEvent:t,loadEvent:o}};var i=null;o.handleLazyLoad=function(){var t=this;!this.opts.useDebounce&&i||(clearTimeout(i),i=setTimeout(function(){i=null,t.render()},this.opts.delay))},o.isHidden=function(t){return null===t.offsetParent},o.checkInView=function(t){if(this.isHidden(t))return!1;var e=t.getBoundingClientRect();return e.right>=this.view.left&&e.bottom>=this.view.top&&e.left<=this.view.right&&e.top<=this.view.bottom},o.render=function(){for(var t=document.querySelectorAll("[data-image], [data-lazy-background]"),e=t.length,n=0;n<e;n++)elem=t[n],this.checkInView(elem)&&(null!==elem.getAttribute("data-lazy-background")?elem.style.backgroundImage="url("+elem.getAttribute("data-lazy-background")+")":elem.src!==(src=elem.getAttribute("data-image"))&&(elem.src=src),elem.removeAttribute("data-image"),elem.removeAttribute("data-lazy-background"),this.opts.onload&&"function"==typeof this.opts.onload&&this.opts.onload(elem));e||this.unbindScrollEvent()},o.unbindScrollEvent=function(){n.removeEvent(e,"scroll",this.event.scrollEvent),n.removeEvent(e,"load",this.event.loadEvent)},"undefined"==typeof exports||exports.nodeType?e.Lazy=t:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=t),exports.Lazy=t)}();
|
Loading…
Reference in New Issue