diff --git a/README.md b/README.md index 9bb0b68..3efda4a 100644 --- a/README.md +++ b/README.md @@ -73,10 +73,10 @@ chown -R www:www /web目录 5. 首次使用会执行安装程序并生成`install.lock` 跳过安装流程请删除`install`目录 6. 首次访问首页会检查环境并在`config`目录下生成`EasyImage.lock` 7. 可以使用谷歌浏览器的调试模式查看错误`F12->console` -8. 不显示验证码: 1. 权限问题见问题`1` 2. CDN缓存了 3. 开防火墙了 -9. `upload File size exceeds the maximum value` 调整`PHP`上传大小 -10. `undefined function imagecreatefromwebp()`GD没安装webp, 以此类推 -11. `Warning: is_dir(): open_basedir restriction in effect`解决方法同`3` +8. `upload File size exceeds the maximum value` 调整`PHP`上传大小 +9. `undefined function imagecreatefromwebp()`GD没安装webp, 以此类推 +10. `Warning: is_dir(): open_basedir restriction in effect`解决方法同`3` +11. 无法上传/访问/不显示验证码: 1. 权限问题见问题`1` 2. CDN缓存了 3. 开防火墙了 12. `Fatal error: Allowed memory size......`主机内存或分配给PHP的内存不够 解决方法百度 13. 开启原图保护功能后打开图片链接显示`404`是因为`nginx`或`Apache`页面缓存导致的,`Nginx`解决办法: ```Nginx @@ -180,10 +180,13 @@ $HTTP["url"] =~ "^/(i|public)/" {
点击查看2.0版更新日志 -* 2022-05-22 v2.6.3 Deving 此版本正在开发中, 更新到此版本需要删除上传日志 +* 2022-05-24 v2.6.3 Deving 此版本正在开发中, 更新到此版本需要删除上传日志 +- 增加图片下载 +- 增加简单暗黑模式 - 增加读取上传日志 - 增加广场浏览往日限制 - 有助于防爬虫抓取 +- 增加登陆验证码开关(默认关闭) - 删除图片详情页Exif信息 - 文件管理中图片使用缩略图显示 - 更改广场->信息中图片长宽获取方式 diff --git a/admin/admin.inc.php b/admin/admin.inc.php index 7cf6a02..3288c74 100644 --- a/admin/admin.inc.php +++ b/admin/admin.inc.php @@ -476,6 +476,16 @@ if (isset($_GET['recycle_reimg'])) {
+
上传日志 需要开启上传日志
+
+
+ + + +
+ +
+
@@ -618,6 +628,11 @@ if (isset($_GET['recycle_reimg'])) {
+
+ + > + +
> @@ -672,7 +687,7 @@ if (isset($_GET['recycle_reimg'])) {

获得key后打开->API 设置->Moderate Key->填入key

为了访问速度,仅显示最近20张图片;鉴黄需要在图床安全->图片鉴黄中开启

- +
@@ -799,6 +814,11 @@ if (isset($_GET['recycle_reimg'])) {
+
+ + > + +
> @@ -814,10 +834,10 @@ if (isset($_GET['recycle_reimg'])) { >
-
+
> - +
@@ -957,7 +977,7 @@ if (isset($_GET['recycle_reimg'])) {
图片回收 用户自行删除的会显示在这个页面

为了访问速度,仅显示最近20张图片; 图片回收需要在图床安全->图片回收中开启

-
序号
+
@@ -1056,7 +1076,6 @@ if (isset($_GET['recycle_reimg'])) {
前端裁剪/压缩 优点:服务器无压力 缺点:PC配置低的会导致浏览器卡顿,偶现丢失方向信息,仅支持JPG
-
@@ -1109,22 +1128,12 @@ if (isset($_GET['recycle_reimg'])) {
+
文件管理 由作者定制,非必要请勿替换
+ 文件管理
清理缓存 已缓存:
-
文件管理 由作者定制,非必要请勿替换
- 文件管理 - -
上传日志 需要在图床安全->开启上传日志
-
-
- - - -
- -
删除文件 * 删除后不可恢复

@@ -1186,16 +1195,6 @@ if (isset($_GET['recycle_reimg'])) { $('#Content1').addClass("active in") } - // tips提示 - $('[data-toggle="tooltip"]').tooltip({ - tipClass: 'tooltip', - placement: 'auto', - html: true, - delay: { - show: 50, - hide: 100 - } - }); // 账号密码 | 以md5加密方式发送 function uploader_md5_post() { var password = document.getElementById('uploader_password'); @@ -1327,7 +1326,6 @@ if (isset($_GET['recycle_reimg'])) { // 按照 `name` 列降序排序 tokenMyDataGrid.sortBy('expired', 'desc'); - // guest 上传用户数据表格 $('#guest').datagrid({ dataSource: { diff --git a/admin/index.php b/admin/index.php index 81942f7..999a3bc 100644 --- a/admin/index.php +++ b/admin/index.php @@ -7,54 +7,7 @@ require_once APP_ROOT . '/application/header.php'; require_once APP_ROOT . '/config/config.guest.php'; // 验证登录 header("Content-Type: text/html;charset=utf-8"); -if (isset($_REQUEST['code'])) { - session_start(); - if (strtolower($_REQUEST['code']) == $_SESSION['code']) { - // 提交登录 - if (isset($_POST['password']) and isset($_POST['user'])) { - - global $guestConfig; - $postUser = strip_tags($_POST['user']); - $postPWD = strip_tags($_POST['password']); - - if ($postUser == $config['user'] || in_array($guestConfig[$postUser], $guestConfig)) { - if ($postPWD == $config['password'] || $postPWD == $guestConfig[$postUser]['password']) { - // 将账号密码序列化后存储 - $setCOK = serialize(array($postUser, $postPWD)); - - setcookie('auth', $setCOK, time() + 3600 * 24 * 14, '/'); - echo ' - '; - header("refresh:2;url=" . $config['domain'] . ""); - } else { - echo ' - '; - header("refresh:2;"); - } - } else { - echo ' - '; - header("refresh:2;"); - } - } - } else { - echo ' - '; - } -} // 退出 if (isset($_GET['login'])) { @@ -86,6 +39,62 @@ if (isset($_GET['login'])) { '; } } + exit(require_once APP_ROOT . '/application/footer.php'); +} + +// 验证码 +if ($config['captcha']) { + if (isset($_REQUEST['code'])) { + session_start(); + if (strtolower($_REQUEST['code']) !== $_SESSION['code']) { + echo ' + '; + + exit(require_once APP_ROOT . '/application/footer.php'); + } + } +} + +// 提交登录 +if (isset($_POST['password']) and isset($_POST['user'])) { + + global $guestConfig; + $postUser = strip_tags($_POST['user']); + $postPWD = strip_tags($_POST['password']); + + if ($postUser == $config['user'] || in_array($guestConfig[$postUser], $guestConfig)) { + if ($postPWD == $config['password'] || $postPWD == $guestConfig[$postUser]['password']) { + // 将账号密码序列化后存储 + $setCOK = serialize(array($postUser, $postPWD)); + + setcookie('auth', $setCOK, time() + 3600 * 24 * 14, '/'); + echo ' + '; + header("refresh:2;url=" . $config['domain'] . ""); + } else { + echo ' + '; + header("refresh:2;"); + } + } else { + echo ' + '; + header("refresh:2;"); + } } ?> @@ -123,12 +132,14 @@ if (isset($_GET['login'])) { - -
-
- + + +
+
+ +
-
+ diff --git a/application/down.php b/application/down.php new file mode 100644 index 0000000..ae1c128 --- /dev/null +++ b/application/down.php @@ -0,0 +1,21 @@ + Icret DMCA - - + + + - + - +

@@ -104,16 +106,94 @@ if ($config['notice_status'] == 1 && !empty($config['notice'])) : ?> console.log('网站公告已显示完毕') }) } - - - + $.getScript("/public/static/i18n/jquery.s2t.js", function() { //加载成功后,并执行回调函数 $('*').s2t(); }); + + // cookie 操作封装 https://www.jb51.net/article/94456.htm + var cookieUtil = { + // 设置cookie + setItem: function(name, value, days) { + var date = new Date(); + date.setDate(date.getDate() + days); + document.cookie = name + '=' + value + ';expires=' + date; + }, + // 获取cookie + getItem: function(name) { + var arr = document.cookie.replace(/\s/g, "").split(';'); + for (var i = 0; i < arr.length; i++) { + var tempArr = arr[i].split('='); + if (tempArr[0] == name) { + return decodeURIComponent(tempArr[1]); + } + } + return ''; + }, + // 删除cookie + removeItem: function(name) { + this.setItem(name, '1', -1); + }, + // 检查是否含有某cookie + hasItem: function(name) { + return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(name).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie); + }, + // 获取全部的cookie列表 + getAllItems: function() { + var cookieArr = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, "").split(/\s*(?:\=[^;]*)?;\s*/); + for (var nIdx = 0; nIdx < cookieArr.length; nIdx++) { + cookieArr[nIdx] = decodeURIComponent(cookieArr[nIdx]); + } + return cookieArr; + } + }; + + // 暗黑操作 + let styleLabel = document.createElement('style'); + document.getElementById('dark').onclick = function() { + if (cookieUtil.getItem('dark-mode') == null) { + const style = 'html{filter: invert(80%) hue-rotate(180deg);} img,video {filter: invert(100%) hue-rotate(180deg);}'; + styleLabel.appendChild(document.createTextNode(style)); + document.head.appendChild(styleLabel); + cookieUtil.setItem('dark-mode', 1, 1); + } else { + if (cookieUtil.getItem('dark-mode') == 1) { + document.head.removeChild(styleLabel); + cookieUtil.setItem('dark-mode', 0, 1); + } else { + const style = 'html{filter: invert(80%) hue-rotate(180deg);} img,video {filter: invert(100%) hue-rotate(180deg);}'; + styleLabel.appendChild(document.createTextNode(style)); + document.head.appendChild(styleLabel); + cookieUtil.setItem('dark-mode', 1, 1); + } + } + } + + if (cookieUtil.getItem('dark-mode') == 1) { + const style = 'html{filter: invert(80%) hue-rotate(180deg);} img,video {filter: invert(100%) hue-rotate(180deg);}'; + styleLabel.appendChild(document.createTextNode(style)); + document.head.appendChild(styleLabel); + } + if (cookieUtil.getItem('dark-mode') == null) { + document.head.removeChild(styleLabel); + } + // tips提示 + $('[data-toggle="tooltip"]').tooltip({ + tipClass: 'tooltip', + placement: 'auto', + html: true, + delay: { + show: 50, + hide: 0.5 + } + }); + // console - console.log("%cEasyImage2.0", "background: rgba(252,234,187,1);background: -moz-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%,rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 100%);background: -webkit-gradient(left top, right top, color-stop(0%, rgba(252,234,187,1)), color-stop(12%, rgba(175,250,77,1)), color-stop(28%, rgba(0,247,49,1)), color-stop(39%, rgba(0,210,247,1)), color-stop(51%, rgba(0,189,247,1)), color-stop(64%, rgba(133,108,217,1)), color-stop(78%, rgba(177,0,247,1)), color-stop(87%, rgba(247,0,189,1)), color-stop(100%, rgba(245,22,52,1)));background: -webkit-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 100%);background: -o-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 100%);background: -ms-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 100%);background: linear-gradient(to right, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb', endColorstr='#f51634', GradientType=1 );font-size:2.34em;font-weight:bold") + console.log("%cEasyImage2.0", "background: rgba(252,234,187,1);background: -moz-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%,rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);background: -webkit-gradient(left top, right top, color-stop(0%, rgba(252,234,187,1)), color-stop(12%, rgba(175,250,77,1)), color-stop(28%, rgba(0,247,49,1)), color-stop(39%, rgba(0,210,247,1)), color-stop(51%, rgba(0,189,247,1)), color-stop(64%, rgba(133,108,217,1)), color-stop(78%, rgba(177,0,247,1)), color-stop(87%, rgba(247,0,189,1)), color-stop(0.5%, rgba(245,22,52,1)));background: -webkit-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);background: -o-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);background: -ms-linear-gradient(left, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);background: linear-gradient(to right, rgba(252,234,187,1) 0%, rgba(175,250,77,1) 12%, rgba(0,247,49,1) 28%, rgba(0,210,247,1) 39%, rgba(0,189,247,1) 51%, rgba(133,108,217,1) 64%, rgba(177,0,247,1) 78%, rgba(247,0,189,1) 87%, rgba(245,22,52,1) 0.5%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb', endColorstr='#f51634', GradientType=1 );font-size:2.34em;font-weight:bold") console.log('%c图床演示网站: https://png.cm\n作为开发者你可以对相应的后台功能进行扩展(增删改相应代码), 但请保留代码中相关来源信息(例如: 本人博客, 邮箱等);\n本程序由 Icret 独自开发并完全开源, 碰到收费发布的请不要轻易付款; 本人仅为程序开源创作, 如非法网站使用与本人无关, 请勿用于非法用途.%c ', 'color: #eaad1a; padding:5px 0; border:1px solid #448ef6; font-size:12px;', ''); diff --git a/application/header.php b/application/header.php index b9a7813..1882c71 100644 --- a/application/header.php +++ b/application/header.php @@ -23,7 +23,6 @@ - @@ -45,4 +44,4 @@
- + \ No newline at end of file diff --git a/application/info.php b/application/info.php index 87d7b9a..5dcfb2f 100644 --- a/application/info.php +++ b/application/info.php @@ -40,22 +40,61 @@ if ($config['ad_top']) echo $config['ad_top_info']; ?>
- <?php echo $img_url; ?> + <?php echo $img_url; ?>
-
-

图片名称:

-

图片大小:

-

图片类型: image/

+
+
序号
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
图片名称
图片大小
图片类型image/
图片宽高px
上传时间
文件操作 + 查看 + 下载 + + 回收 + 删除 + +
+

此图片来自网友上传, 不代表本站立场, 若有侵权, 请联系管理员删除!

+