mirror of
https://github.com/icret/EasyImages2.0.git
synced 2025-01-07 03:17:07 +08:00
add&&fix
This commit is contained in:
parent
e998fd15e5
commit
25e437f887
@ -117,9 +117,10 @@ $HTTP["url"] =~ "^/(i|public)/" {
|
||||
|
||||
* 2022-3-15 v2.5.7 dev
|
||||
- 微调了广场样式
|
||||
- 日志记录上传IP端口
|
||||
- 日志记录通过API上传的ID
|
||||
- 修复图片回收中批量删除失败
|
||||
- 修复广场预览ico格式文件失败
|
||||
- 日志将记录通过API上传者的ID
|
||||
- 缩略图最大生成与用户设置关联
|
||||
- 安全检测中检测本地域名改为检测局域网
|
||||
|
||||
@ -447,6 +448,7 @@ RewriteRule config/(.*).(php)$ – [F]
|
||||
</details>
|
||||
|
||||
## 支持开发者
|
||||
|
||||
|支付宝支持|微信支持|
|
||||
|:----:|:----:|
|
||||
|![支付宝支持](./public/images/alipay.jpg)|![微信支持](./public/images/wechat.jpg)|
|
||||
@ -461,6 +463,7 @@ RewriteRule config/(.*).(php)$ – [F]
|
||||
|
||||
|
||||
## 兼容
|
||||
|
||||
- 最低`PHP 5.6`,推荐`PHP≥7.0`及以上版本,需要PHP支持`Fileinfo,iconv,zip,mbstring,openssl`扩展,如果缺失会导致无法上传/删除图片
|
||||
- 文件上传视图提供文件列表管理和文件批量上传功能,允许拖拽(需要`HTML5`支持)来添加上传文件,支持上传大图片,优先使用`HTML5`旧得浏览器自动使用`Flash和Silverlight`的方式兼容
|
||||
|
||||
@ -476,5 +479,5 @@ RewriteRule config/(.*).(php)$ – [F]
|
||||
|
||||
* have fun!
|
||||
|
||||
![项目状态](https://repobeats.axiom.co/api/embed/0922803f14091f0686de26fee5196b9984b106a4.svg "Repobeats analytics image")
|
||||
[![Stargazers over time](https://starchart.cc/icret/EasyImages2.0.svg)](https://github.com/icret/EasyImages2.0/stargazers)
|
||||
[![项目状态](https://repobeats.axiom.co/api/embed/0922803f14091f0686de26fee5196b9984b106a4.svg "Repobeats analytics image")](https://png.cm)
|
||||
[![Stargazers over time](https://starchart.cc/icret/EasyImages2.0.svg)](/stargazers)
|
||||
|
0
SECURITY.md
Normal file → Executable file
0
SECURITY.md
Normal file → Executable file
@ -124,14 +124,12 @@ if (isset($_POST['delDir'])) {
|
||||
type: "success", // 定义颜色主题
|
||||
icon: "ok-sign" // 定义消息图标
|
||||
}).show();</script>';
|
||||
|
||||
} else {
|
||||
echo '
|
||||
<script> new $.zui.Messager("删除失败! ", {
|
||||
type: "danger", // 定义颜色主题
|
||||
icon: "exclamation-sign" // 定义消息图标
|
||||
}).show();</script>';
|
||||
|
||||
}
|
||||
header("refresh:1;"); // 1s后刷新当前页面
|
||||
}
|
||||
@ -303,7 +301,7 @@ if (isset($_GET['recycle_reimg'])) {
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>将上传图片转换为指定格式<?php echo $config['imgConvert']; ?></label>
|
||||
<label>将上传图片转换为指定格式</label>
|
||||
<select class="chosen-select form-control" name="imgConvert">
|
||||
<option value="" <?php if (empty($config['imgConvert'])) echo 'selected'; ?>>不转换</option>
|
||||
<option value="webp" <?php if ($config['imgConvert'] == 'webp') echo 'selected'; ?>>WEBP</option>
|
||||
@ -369,7 +367,7 @@ if (isset($_GET['recycle_reimg'])) {
|
||||
<input type="range" class="form-control" name="maxHeight" value="<?php echo $config['maxHeight']; ?>" min="1024" max="51200" step="1024" onchange="document.getElementById('maxHeight').innerHTML=value">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>单文件最大上传(1-50MB) | 当前: </label><label id="maxSize"><?php echo $config['maxSize'] / 1024 / 1024; ?></label><label>MB</label>
|
||||
<label>单文件最大上传(1-100MB) | 当前: </label><label id="maxSize"><?php echo $config['maxSize'] / 1024 / 1024; ?></label><label>MB</label>
|
||||
<input type="range" class="form-control" name="maxSize" value="<?php echo $config['maxSize']; ?>" min="1048576" max="104857600" step="1048576" onchange="document.getElementById('maxSize').innerHTML=value/1024/1024">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -77,7 +77,22 @@ function process_checkImg($imgurl)
|
||||
|
||||
/**
|
||||
* 写日志
|
||||
* {图片名称{source:源文件名称,date:上传日期(Asia/Shanghai),ip:上传者IP,user_agent:上传者浏览器信息,path:文件相对路径,size:文件大小(格式化),md5:文件MD5,checkImg:图像审查,form:上传方式web/API ID}}
|
||||
*
|
||||
* 格式:
|
||||
* {
|
||||
* 上传图片名称{
|
||||
* source:源文件名称,
|
||||
* date:上传日期(Asia/Shanghai),
|
||||
* ip:上传者IP,port:IP端口,
|
||||
* user_agent:上传者浏览器信息,
|
||||
* path:文件相对路径,
|
||||
* size:文件大小(格式化),
|
||||
* md5:文件MD5,
|
||||
* checkImg:鉴黄状态,
|
||||
* form:上传方式web/API ID
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* $filePath 文件相对路径
|
||||
* $sourceName 源文件名称
|
||||
* $absolutePath 图片的绝对路径
|
||||
@ -88,19 +103,20 @@ function write_log($filePath, $sourceName, $absolutePath, $fileSize, $from = "we
|
||||
{
|
||||
global $config;
|
||||
|
||||
$checkImg = $config['checkImg'] == true ? "Images Passed" : "Check Closed";
|
||||
$checkImg = $config['checkImg'] == true ? "Passed" : "Closed";
|
||||
|
||||
$name = trim(basename($filePath), " \t\n\r\0\x0B"); // 当前图片名称
|
||||
$log = array($name => array(
|
||||
'source' => $sourceName, // 原始文件名称
|
||||
'date' => date('Y-m-d H:i:s'), // 上传日期
|
||||
'ip' => real_ip(), // 上传ip
|
||||
'user_agent' => $_SERVER['HTTP_USER_AGENT'], // 浏览器信息
|
||||
'path' => $filePath, // 文件相对路径
|
||||
'size' => getDistUsed($fileSize), // 文件大小(格式化)
|
||||
'md5' => md5_file($absolutePath), // 文件的md5
|
||||
'checkImg' => $checkImg, // 图像审查
|
||||
'from' => $from, // 图片上传来源
|
||||
// $name = trim(basename($filePath), " \t\n\r\0\x0B"); // 当前图片名称
|
||||
$log = array(basename($filePath) => array( // 以上传图片名称为Array
|
||||
'source' => $sourceName, // 原始文件名称
|
||||
'date' => date('Y-m-d H:i:s'), // 上传日期
|
||||
'ip' => real_ip(), // 上传IP
|
||||
'port' => $_SERVER['REMOTE_PORT'], // IP端口
|
||||
'user_agent' => $_SERVER['HTTP_USER_AGENT'], // 浏览器信息
|
||||
'path' => $filePath, // 文件相对路径
|
||||
'size' => getDistUsed($fileSize), // 文件大小(格式化)
|
||||
'md5' => md5_file($absolutePath), // 文件的md5
|
||||
'checkImg' => $checkImg, // 鉴黄状态
|
||||
'from' => $from, // 图片上传来源
|
||||
));
|
||||
|
||||
$logFileName = APP_ROOT . '/admin/logs/upload/' . date('Y-m') . '.php';
|
||||
@ -112,7 +128,7 @@ function write_log($filePath, $sourceName, $absolutePath, $fileSize, $from = "we
|
||||
|
||||
// 写入禁止浏览器直接访问
|
||||
if (filesize($logFileName) == 0) {
|
||||
$php_exit = '<?php /** {图片名称{source:源文件名称,date:上传日期(Asia/Shanghai),ip:上传者IP,user_agent:上传者浏览器信息,path:文件相对路径,size:文件大小(格式化),md5:文件MD5,checkImg:图像审查,form:上传方式web/API ID}} */ exit;?>';
|
||||
$php_exit = '<?php /** {图片名称{source:源文件名称,date:上传日期(Asia/Shanghai),ip:上传者IP,port:IP端口,user_agent:上传者浏览器信息,path:文件相对路径,size:文件大小(格式化),md5:文件MD5,checkImg:鉴黄状态,form:上传方式web/API ID}} */ exit;?>';
|
||||
file_put_contents($logFileName, $php_exit);
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ $config=Array
|
||||
'user'=>'admin',
|
||||
'password'=>'e6e061838856bf47e1de730719fb2609',
|
||||
'mustLogin'=>0,
|
||||
'apiStatus'=>1,
|
||||
'apiStatus'=>0,
|
||||
'path'=>'/i/',
|
||||
'imgName'=>'default',
|
||||
'maxSize'=>10485760,
|
||||
@ -100,7 +100,7 @@ var _hmt = _hmt || [];
|
||||
'delDir'=>'thumbnails/',
|
||||
'hide'=>0,
|
||||
'version'=>'2.5.6',
|
||||
'update'=>'2022-03-19 14:44:36',
|
||||
'update'=>'2022-03-24 12:39:24',
|
||||
'terms'=>'<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
|
Loading…
Reference in New Issue
Block a user