diff --git a/README.md b/README.md index b37d4ec..55777f7 100755 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ [![License](https://img.shields.io/badge/license-GPL_V2.0-yellowgreen.svg)](https://github.com/icret/EasyImages2.0/blob/master/LICENSE) [![QQ group](https://pub.idqqimg.com/wpa/images/group.png)](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/) +>[演示](https://png.cm/) | [Chrome/Edge 插件](https://github.com/icret/EasyImage-Browser-Extension) | [使用手册](https://www.kancloud.cn/easyimage/easyimage/) | [Telegram](https://t.me/Easy_Image) > >本人善写bug 发现bug可提交 [issues](https://github.com/icret/EasyImages2.0/issues) 追求稳定请下载 [稳定版](https://github.com/icret/EasyImages2.0/releases) @@ -149,12 +149,20 @@ $HTTP["url"] =~ "^/(i|public)/" {
点击查看2.0版更新日志 +* 2022-05-01 v2.6.0 +- 修复源图缺陷 +- 修复API回收不能还原问题 +- 布局修改 +- 登录页美化 +- 屏蔽登陆页面chrome类浏览器自动填充 + * 2022-04-02 v2.5.9 - 增加安装提示 - 增加忘记密码提示 - 增加检测水印图片/水印字体是否存在 - 修复登陆逻辑 - 修复广场重复显示图片 +- 修改广场删除/回收样式 - 调整了广告的位置 - 调整后台设置分表 diff --git a/admin/admin.inc.php b/admin/admin.inc.php index ac517e9..8da1b5d 100755 --- a/admin/admin.inc.php +++ b/admin/admin.inc.php @@ -194,7 +194,8 @@ if (isset($_GET['recycle_reimg'])) { - + + 打赏作者 @@ -363,7 +364,7 @@ if (isset($_GET['recycle_reimg'])) {
- +
压缩文件夹
@@ -379,7 +380,7 @@ if (isset($_GET['recycle_reimg'])) {
-
外部KEY
+
外部KEY
@@ -397,8 +398,8 @@ if (isset($_GET['recycle_reimg'])) { " placeholder="隐藏的保存"> -
-
已存在Token
+ +

API调用网址:/api/index.php

@@ -481,7 +482,7 @@ if (isset($_GET['recycle_reimg'])) {
> - +
@@ -497,37 +498,37 @@ if (isset($_GET['recycle_reimg'])) {
-
+
其他设置
-
+
>
-
+
>
-
+
>
-
+
> - +
-
+
> @@ -543,17 +544,17 @@ if (isset($_GET['recycle_reimg'])) {
-
+
>
-
+
> - +
@@ -564,37 +565,41 @@ if (isset($_GET['recycle_reimg'])) { >
-
- - - - - - - - - - +
+
+
+ + + + + + + + + + +
+
@@ -605,6 +610,7 @@ if (isset($_GET['recycle_reimg'])) {
+
可疑图片 鉴黄查到的可疑图片

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

key申请地址: https://client.moderatecontent.com/

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

@@ -655,28 +661,26 @@ if (isset($_GET['recycle_reimg'])) {
-
系统信息
-
+
系统信息

服务系统: ' . php_uname() . ''; ?>

Web服务:

服务器IP:

系统时间:

-

已用磁盘:

-

剩余磁盘:

-
PHP信息
-
-

PHP Version:

+

占用内存:

+

占用磁盘:

+

剩余磁盘:

+
PHP信息
+

PHP Version:

+

PHP Model:

PHP Max UP:

-

POST Max UP:

-

PHP Max Time:

+

PHP Max Time:

PHP Max Memery:

+

POST Max Upload:

GD:

-
我的信息
-
+
我的信息

Your IP:

Browser:

-
图床信息
-
+
图床信息
API 插件
Edge Chrome @@ -708,6 +712,34 @@ if (isset($_GET['recycle_reimg'])) {
+ +
+
+ + > + +
+
+ + > + +
+
+ + > + +
+
+ + > + +
+
+ + > + +
+
-
上传首选显示
+ + +
+
+
上传首选显示链接
-
-
- - > - -
-
-
-
- - > - -
-
-
-
- - > - -
-
-
-
- - > - -
-
-
-
- - > - -
-
@@ -801,8 +802,9 @@ if (isset($_GET['recycle_reimg'])) {
+
-
管理员账号管理 | 不变就不要保存更改
+
管理员账号 不更改账号或者密码就不要保存
@@ -817,7 +819,7 @@ if (isset($_GET['recycle_reimg'])) {
" placeholder="隐藏的保存">
- +
@@ -829,9 +831,8 @@ if (isset($_GET['recycle_reimg'])) {
-
-
上传者账号 | 开启登陆上传后只能上传的账号
+
上传者账号 账户只能用于上传
@@ -846,7 +847,7 @@ if (isset($_GET['recycle_reimg'])) {
" placeholder="隐藏的保存">
- +
@@ -878,9 +879,21 @@ if (isset($_GET['recycle_reimg'])) {
+ + +
源图保护Key *设定后请勿轻易更改,更改后所有源图加密链接失效
+
+
+ + +
+
+ " placeholder="隐藏的保存"> + +
-
用户自行删除的会显示在这个页面
+
图片回收 用户自行删除的会显示在这个页面

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

@@ -981,7 +994,8 @@ if (isset($_GET['recycle_reimg'])) {
-

前端裁剪压缩 - 优点:服务器无压力 缺点:PC配置低的会导致浏览器卡顿,偶现丢失方向信息,仅支持JPG

+
前端裁剪/压缩 优点:服务器无压力 缺点:PC配置低的会导致浏览器卡顿,偶现丢失方向信息,仅支持JPG
+
@@ -1015,7 +1029,8 @@ if (isset($_GET['recycle_reimg'])) {
-

后端压缩 - 优点:避免用户端欺骗,效果更好 缺点:增加服务器压力

+
后端压缩 优点:避免用户端欺骗,效果更好 缺点:增加服务器压力
+
@@ -1034,10 +1049,12 @@ if (isset($_GET['recycle_reimg'])) {
-

文件管理 Tinyfilemanager是由作者定制开发,非必要请勿替换

+ +
文件管理 Tinyfilemanager是由作者定制开发,非必要请勿替换
文件管理 -
-

删除文件 * 删除后不可恢复

+ + +
删除文件 * 删除后不可恢复

@@ -1046,7 +1063,6 @@ if (isset($_GET['recycle_reimg'])) {
-
@@ -1057,14 +1073,14 @@ if (isset($_GET['recycle_reimg'])) {
- - - - + + + + '; - header("refresh:2;url=" . $config['domain'] . ""); - } else { - echo ' + header("refresh:2;url=" . $config['domain'] . ""); + } else { + echo ' '; - header("refresh:2;"); - } - } else { - echo ' + header("refresh:2;"); + } + } else { + echo ' '; - header("refresh:2;"); - } - } - } else { - echo ' + header("refresh:2;"); + } + } + } else { + echo ' '; - } + } } // 退出 if (isset($_GET['login'])) { - if ($_GET['login'] = 'logout') { + if ($_GET['login'] = 'logout') { - if (isset($_COOKIE['auth'])) { - setcookie('auth', null, time() - 1, '/'); - header("Refresh:2;url=../index.php"); - echo ' + if (isset($_COOKIE['auth'])) { + setcookie('auth', null, time() - 1, '/'); + header("Refresh:2;url=../index.php"); + echo ' '; - } else { - echo ' + } else { + echo ' '; - } - } + } + } } ?> + - -
- -
- -
-
-
- -
- -
- -
-
- -
- - -
-
-
-
-
- - -
-
-
-
-
- -
-
+
+
+
+
+ 简单图床登陆界面背景图 +
+
+ +

登录

+ + + + + +
+
+ +
+
+ + + +
+
+
+
+
+

注册

+ + + + + + + +
+
简单图床登陆界面背景图 +
+
+
+
Terms not set!
使用条款未设置
'; + echo '
Terms not set!
未设置使用条款
'; } else { echo $config['terms']; + // echo '
'; } -echo " +/** 底部广告 */ +if ($config['ad_bot']) echo $config['ad_bot_info']; +?> + -"; +uploaded) { // 允许上传的mime类型 $handle->allowed = array('image/*'); // 文件命名 - $handle->file_new_name_body = imgName($handle->file_src_name_body) . '_' . $tokenID; + $handle->file_new_name_body = imgName($handle->file_src_name_body) . '-' . $tokenID; // 最大上传限制 $handle->file_max_sizes = $config['maxSize']; // 最大宽度 @@ -67,8 +70,8 @@ if ($handle->uploaded) { $pathIMG = config_path() . $handle->file_dst_name; $imageUrl = $config['imgurl'] . $pathIMG; - // 原图保护 key值是由crc32加密的登录密码 - $hide_original = $config['hide'] == 1 ? $config['domain'] . '/application/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['password'])) : $imageUrl; + // 原图保护 key值是由crc32加密的hide_key + $hide_original = $config['hide'] == 1 ? $config['domain'] . '/application/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['hide_key'])) : $imageUrl; // 关闭上传后显示加密删除链接 if ($config['show_user_hash_del']) { diff --git a/application/captcha.php b/application/captcha.php index 9d7c619..a461d9a 100755 --- a/application/captcha.php +++ b/application/captcha.php @@ -4,9 +4,9 @@ session_start(); //设置session require __DIR__ . "/function.php"; //创建背景画布 -$img_w = 270; +$img_w = 305; /*宽*/ -$img_h = 50; +$img_h = 54; $img = imagecreatetruecolor($img_w, $img_h); $bg_color = imagecolorallocate($img, 0xcc, 0xcc, 0xcc); diff --git a/application/check.php b/application/check.php index df38a44..ac0881d 100755 --- a/application/check.php +++ b/application/check.php @@ -38,10 +38,10 @@ file_put_contents(APP_ROOT . '/config/EasyIamge.lock', '安装环境检测锁定 foreach ($expand as $val) { if (extension_loaded($val)) { echo ' -

' . $val . " - 已安装

"; +

' . strtoupper($val) . " - 已安装

"; } else { echo ""; - echo '

' . $val . " - 未安装

"; + echo '

' . strtoupper($val) . " - 未安装

"; } } // 文件权限检测 diff --git a/application/class.upload.php b/application/class.upload.php index 30dc3b9..5552b0d 100755 --- a/application/class.upload.php +++ b/application/class.upload.php @@ -25,7 +25,7 @@ // | This script is free to use, don't abuse. | // +------------------------------------------------------------------------+ -// namespace Verot\Upload; +namespace Verot\Upload; if (!defined('IMG_WEBP')) define('IMG_WEBP', 32); diff --git a/application/function.php b/application/function.php index 252efbd..b064a94 100755 --- a/application/function.php +++ b/application/function.php @@ -482,7 +482,7 @@ function urlHash($data, $mode, $key = null) { global $config; - if ($key) { + if (!$key) { $key = $config['password']; } diff --git a/application/hide.php b/application/hide.php index 0ef88aa..2222107 100755 --- a/application/hide.php +++ b/application/hide.php @@ -4,14 +4,16 @@ * Program: EasyImage2.0 * Author: Icret * Date: 2022/3/13 20:11 - * For: 原图保护解密 + * For: 源图保护解密 */ require_once __DIR__ . '/function.php'; + + if (isset($_GET['key'])) { $hide_original = $_GET['key']; - $real_path = APP_ROOT . urlHash($hide_original, 1, crc32($config['password'])); + $real_path = APP_ROOT . urlHash($hide_original, 1, crc32($config['hide_key'])); } else { $real_path = APP_ROOT . '/public/images/404.png'; } diff --git a/application/list.php b/application/list.php index c9ce61c..9765f01 100755 --- a/application/list.php +++ b/application/list.php @@ -1,4 +1,8 @@ -
diff --git a/application/upload.php b/application/upload.php index 17d04a2..39f01af 100755 --- a/application/upload.php +++ b/application/upload.php @@ -1,5 +1,7 @@ - uploaded) { $pathIMG = config_path() . $handle->file_dst_name; $imageUrl = $config['imgurl'] . $pathIMG; - // 原图保护 key值是由crc32加密的登录密码 - $hide_original = $config['hide'] == 1 ? $config['domain'] . '/application/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['password'])) : $imageUrl; + // 原图保护 key值是由crc32加密的hide_key + $hide_original = $config['hide'] == 1 ? $config['domain'] . '/application/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['hide_key'])) : $imageUrl; // 关闭上传后显示加密删除链接 if ($config['show_user_hash_del']) { diff --git a/config/config.guest.php b/config/config.guest.php index ce60f78..c8d3a94 100755 --- a/config/config.guest.php +++ b/config/config.guest.php @@ -1,4 +1,4 @@ -'084e0343a0486ff05530df6c705c8bb4' diff --git a/config/config.php b/config/config.php index aa1ae02..681ede7 100755 --- a/config/config.php +++ b/config/config.php @@ -1,55 +1,55 @@ '简单图床 - EasyImage', - 'keywords'=>'简单图床,easyimage,easyimage2.0,无数据库图床,PHP多图长传程序,自适应页面,HTML5,markdown,bbscode,一键复制', - 'description'=>'简单图床EasyImage是一款支持多文件上传的无数据库图床,可以完美替代PHP多图上传程序,最新html5自适应页面兼容手机电脑,上传后返回图片直链,markdown图片,论坛贴图bbscode链接,简单方便支持一键复制,支持多域名,api上传', +$config=Array + ( + 'title'=>'简单图床 - EasyImage', + 'keywords'=>'简单图床,easyimage,easyimage2.0,无数据库图床,PHP多图长传程序,自适应页面,HTML5,markdown,bbscode,一键复制', + 'description'=>'简单图床EasyImage是一款支持多文件上传的无数据库图床,可以完美替代PHP多图上传程序,最新html5自适应页面兼容手机电脑,上传后返回图片直链,markdown图片,论坛贴图bbscode链接,简单方便支持一键复制,支持多域名,api上传', 'tips'=>' 如果你喜欢这种图床风格就下载喔 (๑•̀ㅂ•́)و✧ 简单图床是一款开源图床, 支持多文件上传无数据库 -
  • 单文件≤10M,单次上传≤30张
  • ', - 'notice_status'=>0, +
  • 单文件≤10M,单次上传≤30张
  • ', + 'notice_status'=>0, 'notice'=>'

    简单图床是一款开源图床, 支持多文件上传无数据库;

    -

    如果你喜欢这种图床风格就下载喔 (๑•̀ㅂ•́)و✧

    ', - 'domain'=>'http://127.0.0.1', - 'imgurl'=>'http://127.0.0.1', - 'user'=>'admin', - 'password'=>'e6e061838856bf47e1de730719fb2609', - 'mustLogin'=>0, - 'apiStatus'=>0, - 'path'=>'/i/', - 'imgName'=>'default', - 'maxSize'=>10485760, - 'maxUploadFiles'=>30, - 'watermark'=>0, - 'waterText'=>'简单图床 - png.cm', - 'waterPosition'=>5, - 'textColor'=>'rgba(255,0,0,1)', - 'textSize'=>50, - 'textFont'=>'/public/static/hkxzy.ttf', - 'waterImg'=>'/public/images/watermark.png', - 'extensions'=>'gif,jpeg,png,tif,bmp,tif,svg,webp,jpg,tga,svg,ico', - 'compress'=>0, - 'compress_ratio'=>80, - 'thumbnail'=>1, - 'imgConvert'=>'', - 'maxWidth'=>10240, - 'maxHeight'=>10240, - 'minWidth'=>5, - 'minHeight'=>5, - 'imgRatio'=>0, - 'image_x'=>0, - 'image_y'=>0, - 'imgRatio_quality'=>80, - 'imgRatio_crop'=>0, - 'imgRatio_preserve_headers'=>1, - 'static_cdn'=>0, - 'theme'=>'default', - 'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0', - 'TinyPng_key'=>'', - 'checkImg'=>0, - 'checkImg_value'=>50, - 'moderatecontent_key'=>'', - 'nsfwjs_url'=>'', +

    如果你喜欢这种图床风格就下载喔 (๑•̀ㅂ•́)و✧

    ', + 'domain'=>'http://127.0.0.1', + 'imgurl'=>'http://127.0.0.1', + 'user'=>'admin', + 'password'=>'e6e061838856bf47e1de730719fb2609', + 'mustLogin'=>0, + 'apiStatus'=>1, + 'path'=>'/i/', + 'imgName'=>'default', + 'maxSize'=>10485760, + 'maxUploadFiles'=>30, + 'watermark'=>2, + 'waterText'=>'简单图床 - png.cm', + 'waterPosition'=>0, + 'textColor'=>'rgba(255,0,0,1)', + 'textSize'=>50, + 'textFont'=>'/public/static/hkxzy.ttf', + 'waterImg'=>'/public/images/watermark.png', + 'extensions'=>'gif,jpeg,png,tif,bmp,tif,svg,webp,jpg,tga,svg,ico', + 'compress'=>0, + 'compress_ratio'=>80, + 'thumbnail'=>1, + 'imgConvert'=>'', + 'maxWidth'=>10240, + 'maxHeight'=>10240, + 'minWidth'=>5, + 'minHeight'=>5, + 'imgRatio'=>0, + 'image_x'=>0, + 'image_y'=>0, + 'imgRatio_quality'=>80, + 'imgRatio_crop'=>0, + 'imgRatio_preserve_headers'=>1, + 'static_cdn'=>0, + 'theme'=>'default', + 'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0', + 'TinyPng_key'=>'', + 'checkImg'=>0, + 'checkImg_value'=>50, + 'moderatecontent_key'=>'', + 'nsfwjs_url'=>'', 'footer'=>'请勿上传违反中国政策的图片 ', - 'ad_top'=>0, +', + 'ad_top'=>0, 'ad_top_info'=>'
    -
    ', - 'ad_bot'=>0, - 'ad_bot_info'=>'
    +
    ', + 'ad_bot'=>0, + 'ad_bot_info'=>'', - 'showSwitch'=>1, - 'showSort'=>1, - 'listNumber'=>20, - 'customize'=>'', - 'checkEnv'=>1, - 'upload_logs'=>1, - 'cache_freq'=>2, - 'upload_first_show'=>1, - 'show_user_hash_del'=>1, - 'show_exif_info'=>1, - 'chart_on'=>1, - 'check_ip'=>0, - 'check_ip_model'=>0, - 'check_ip_list'=>'', - 'public'=>0, - 'public_list'=>Array - ( - 0=>'time', - 1=>'today', - 2=>'yesterday', - 3=>'total_space', - 4=>'used_space', - 5=>'free_space', - 6=>'image_used', - 7=>'file', - 8=>'dir', - 9=>'month' - ), - 'language'=>0, - 'image_recycl'=>1, - 'tinyfilemanager'=>1, - 'delDir'=>'thumbnails/', - 'hide'=>0, - 'version'=>'2.5.9', - 'update'=>'2022-04-16 13:19:50', - 'terms'=>'
    +
    ', + 'showSwitch'=>1, + 'showSort'=>1, + 'listNumber'=>20, + 'customize'=>'', + 'checkEnv'=>1, + 'upload_logs'=>1, + 'cache_freq'=>2, + 'upload_first_show'=>1, + 'show_user_hash_del'=>1, + 'show_exif_info'=>1, + 'chart_on'=>1, + 'check_ip'=>0, + 'check_ip_model'=>0, + 'check_ip_list'=>'', + 'public'=>0, + 'public_list'=>Array + ( + 0=>'time', + 1=>'today', + 2=>'yesterday', + 3=>'total_space', + 4=>'used_space', + 5=>'free_space', + 6=>'image_used', + 7=>'file', + 8=>'dir', + 9=>'month' + ), + 'language'=>0, + 'login_bg'=>'https://png.cm/public/images/login_bg.jpg', + 'image_recycl'=>1, + 'tinyfilemanager'=>1, + 'delDir'=>'thumbnails/', + 'hide'=>0, + 'hide_key'=>'EasyImage2.0', + 'version'=>'2.6.0', + 'update'=>'2022-04-29 16:38:49', + 'terms'=>'
    -
    ' +
    ' ); \ No newline at end of file diff --git a/install/index.php b/install/index.php index db9521e..4e6fba2 100755 --- a/install/index.php +++ b/install/index.php @@ -62,7 +62,7 @@ function checkPASS($name) -

    EasyIamge 2.0 安装环境检测

    +

    EasyIamge 2.0 安装环境检测

    @@ -113,10 +113,12 @@ function checkPASS($name) $checkres = array($phpEnv, $fileinfo, $gd, $i_wjj, $file_php, $userINI); if (in_array(false, $checkres)) : ?> -

    对于Liunx主机可以使用以下命令: 宝塔面板演示

    +

    如果使用Liunx主机权限错误可以使用以下命令:

    chmod 755 -R /data/wwwroot/
    chown -R www:www /data/wwwroot/
    -

    如果你的PHP版本较低或者不想安装上述PHP扩展请删除install目录

    + 宝塔面板赋予权限演示 +
    +

    如果你不想安装上述PHP扩展或跳过安装过程请删除install目录 跳过安装页面

    diff --git a/install/install.php b/install/install.php index d22be65..3721e5f 100755 --- a/install/install.php +++ b/install/install.php @@ -48,7 +48,7 @@ if ($state !== 'checked') { -
    +

    EasyIamge 2.0 网站配置

    @@ -76,7 +76,6 @@ if ($state !== 'checked') {
    -
    @@ -103,20 +102,6 @@ if ($state !== 'checked') {
    -