Compare commits

...

10 Commits
2.5.4 ... 2.5.6

Author SHA1 Message Date
icret
699b4451ce v2.5.6 2022-03-14 17:52:21 +08:00
icret
d2ce0a2470 修复文字水印透明度不生效 2022-03-12 14:19:45 +08:00
icret
736588e98d 修复webp转换其他格式失败 2022-03-10 23:40:15 +08:00
icret
8b05affa30 fix tips 2022-03-07 12:34:04 +08:00
icret
5f2ffb5c7b 更新svg图片 2022-03-05 13:59:13 +08:00
icret
b2b9d17591 更改版本号 2022-03-05 10:51:00 +08:00
icret
5cc558c266 ADD QQ Group 2022-03-04 22:09:46 +08:00
icret
0fd10babb5 v2.5.5 2022-03-04 21:45:10 +08:00
icret
b2e5972d7f v2.5.5 2022-03-02 21:57:53 +08:00
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
409b6f3dcc v2.5.5 2022-03-02 21:33:03 +08:00
33 changed files with 1234 additions and 1196 deletions

2
.github/FUNDING.yml vendored
View File

@@ -1 +1 @@
custom: ['https://png.cm/sponsor/images/wechat.jpg']
custom: ['https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.5/public/images/wechat.jpg']

View File

@@ -6,7 +6,7 @@
>
[演示](https://png.cm/)  
[Chrome 拓展](https://github.com/icret/EasyImage-Browser-Extension)  
[Chrome/Edge 插件](https://github.com/icret/EasyImage-Browser-Extension)  
[使用手册](https://www.kancloud.cn/easyimage/easyimage/)  
[问题反馈](https://support.qq.com/products/367633)  
[QQ群](https://shang.qq.com/wpa/qunwpa?idkey=3feb4e8be8f1839f71e53bf2e876de36afc6889b2630c33c877d8df5a5583a6f)
@@ -15,13 +15,14 @@
[![Release](https://img.shields.io/github/v/release/icret/EasyImages2.0)](https://github.com/icret/EasyImages2.0/releases)
[![Issues](https://img.shields.io/github/issues/icret/EasyImages2.0)](https://github.com/icret/EasyImages2.0/issues)
[![stargazers](https://img.shields.io/github/stars/icret/EasyImages2.0)](https://github.com/icret/EasyImages2.0/stargazers)
[![jsdelivr](https://data.jsdelivr.com/v1/package/gh/icret/EasyImages2.0/badge)](https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@EasyImage2.0/)
[![Code size](https://img.shields.io/github/languages/code-size/icret/EasyImages2.0?color=blueviolet)](https://github.com/icret/EasyImages2.0)
[![License](https://img.shields.io/badge/license-GPL_V2.0-yellowgreen.svg)](https://github.com/icret/EasyImages2.0/blob/master/LICENSE)
>本人善写bug 发现bug可提交 [issues](https://github.com/icret/EasyImages2.0/issues) 追求稳定请下载 [稳定版](https://github.com/icret/EasyImages2.0/releases)
## 目录
[特点](#特点)  [使用注意](#使用注意)  [安装](#安装)  [程序升级](#程序升级)  [安全配置](#安全配置)  [更新日志](#更新日志)  [支持开发者](#支持开发者)  [界面演示](#界面演示)  [兼容](#兼容)  [鸣谢](#鸣谢)  [开源许可](#开源许可)  
[特点](#特点)  [注意](#常见问题)  [安装](#安装)  [升级](#程序升级)  [安全](#安全配置)  [更新日志](#更新日志)  [支持开发者](#支持开发者)  [界面演示](#界面演示)  [兼容](#兼容)  [鸣谢](#鸣谢)  [开源许可](#开源许可)  
## 特点
@@ -41,21 +42,31 @@
- [x] 支持创建仅上传用户
- [x] 更多支持请安装尝试···
## 使用注意
## 常见问题
1. 请将所有文件赋予`0755``www`权限
2.`PHP`不太熟悉的请不要将图床程序放置于二级目录
3. 请关闭防跨站或删除域名文件夹内的`user.ini`文件 如宝塔面板
3. 请关闭防跨站或删除域名文件夹内的`user.ini`文件 如`宝塔面板`|`军哥lnmp`
4. 网站域名与图片域名必须填写,如果只有一个域名请填写成一样的
5. 第一次使用会执行安装程序并生成`install.lock` 不执行安装可以删除`install`目录
6. 第一次访问会检查环境并在`config`目录下生成`EasyImage.lock`
5. 次使用会执行安装程序并生成`install.lock` 跳过安装流程请删除`install`目录
6. 次访问首页会检查环境并在`config`目录下生成`EasyImage.lock`
7. 可以使用谷歌浏览器的调试模式查看错误`F12->console`
8. 出现`undefined function imagecreatefromwebp()`是因为GD没安装webp
9. 出现`upload File size exceeds the maximum value` 调整`PHP`上传大小
10. 出现`Warning: is_dir(): open_basedir restriction in effect`解决方法同`3`
11. 出现`Fatal error: Allowed memory size......`主机内存或分配给PHP的内存不够 解决方法百度
12. 不出验证码: 权限问题见问题1 CDN缓存了/开防火墙了
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`
12. 出现`Fatal error: Allowed memory size......`主机内存或分配给PHP的内存不够 解决方法百度
13. 如果开启原图保护功后打开图片链接显示`404`是因为`nginx``Apache`页面缓存导致的,`Nginx`解决办法:
```Nginx
# 把Nginx这段配置删掉
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
error_log /dev/null;
access_log /dev/null;
}
```
## 安装
- windows:
@@ -67,8 +78,10 @@
## 程序升级
- 备份`config`(没有增加上传用户和api可以只保留`config.php`文件)目录和`上传目录`
- 备份`config`目录(没有增加上传用户和api可以只保留`config.php`文件)和`上传文件目录`
- 将新程序下载至网站目录解压覆盖,然后将备份的文件替换既完成升级
- 如果出现错误请在设置中把所有底部设置点击一次`保存`
-
## 安全配置
@@ -101,9 +114,24 @@ $HTTP["url"] =~ "^/(i|public)/" {
## 更新日志
<details><summary><mark>点击查看2.0版更新日志</mark></summary>
<details><summary>点击查看2.0版更新日志</summary>
* 2022-2-21 v2.5.4 Developing
* 2022-3-13 v2.5.6 dev
- 修复加密删除后不能正确提示
- 修复webp转换其他格式失败
- 修复文字水印透明度不生效
- 修复jscolor显示不正确
- 增加原图保护
- 增加检测版本
* 2022-3-4 v2.5.5
- 增加设置页面检测是否开启登录上传
- 将footer固定在底部
- 移除function_API.php
- 修复TimThumb不支持bmp格式的bug
- 修复TimThumb不支持webp动态图片bug
* 2022-2-29 v2.5.4
- 增加Token有效期
- 增加回收图片按钮
- 增加加密删除回收站
@@ -391,7 +419,7 @@ RewriteRule config/(.*).(php)$ [F]
- ~~支持删除自定义删除图片(仅管理员)~~
</details>
<details><summary><mark>与1.6.4版本差别</mark></summary>
<details><summary>与1.6.4版本差别</summary>
##### 不建议再使用 [EasyImage 1.6.4版本](https://github.com/icret/easyImages)
@@ -414,14 +442,14 @@ RewriteRule config/(.*).(php)$ [F]
## 支持开发者
|支付宝支持|微信支持|
|:----:|:----:|
|![支付宝支持](https://png.cm/sponsor/images/alipay.jpg)|![微信支持](https://png.cm/sponsor/images/wechat.jpg)|
|![支付宝支持](./public/images/alipay.jpg)|![微信支持](./public/images/wechat.jpg)|
## 界面演示
![简单图床 - 上传界面](https://blog.png.cm/usr/uploads/2022/02/674074848.png)
![简单图床 - 广场界面](https://blog.png.cm/usr/uploads/2022/02/3053540273.png)
![简单图床 - 后台界面](https://blog.png.cm/usr/uploads/2022/02/2657944724.png)
![简单图床 - 统计界面](https://blog.png.cm/usr/uploads/2022/02/1305032567.png)
![简单图床 - 上传界面](./install/README/674074848.png)
![简单图床 - 广场界面](./install/README/3053540273.png)
![简单图床 - 后台界面](./install/README/2657944724.png)
![简单图床 - 统计界面](./install/README/1305032567.png)
## 兼容
- 最低`PHP 5.6`,推荐`PHP 7.0`及以上版本需要PHP支持`Fileinfo,iconv,zip,mbstring,openssl`扩展,如果缺失会导致无法上传/删除图片
@@ -438,5 +466,6 @@ RewriteRule config/(.*).(php)$ [F]
- Copyright © 2018 EasyImage dev By [Icret](https://github.com/icret)
* have fun!
[![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")
[![Stargazers over time](https://starchart.cc/icret/EasyImages2.0.svg)](https://github.com/icret/EasyImages2.0/stargazers)

File diff suppressed because it is too large Load Diff

View File

@@ -3,8 +3,6 @@
* 统计中心
*/
require_once '../application/header.php';
require_once APP_ROOT . '/config/api_key.php';
require_once APP_ROOT . '/api/function_API.php';
require_once APP_ROOT . '/application/chart.php';
// 检测是否开启统计
@@ -67,7 +65,7 @@ if (is_array($char_data)) {
box-shadow: 3px 2px 3px 2px rgba(19, 17, 36, 0.5);
}
</style>
<div class="row">
<div class="row" style="margin-bottom:100px">
<div class="clo-md-12">
<div class="alert alert-warning">
<form action="chart.php" method="post">

View File

@@ -3,8 +3,6 @@
* 统计中心
*/
require_once '../application/header.php';
require_once APP_ROOT . '/config/api_key.php';
require_once APP_ROOT . '/api/function_API.php';
require_once APP_ROOT . '/application/chart.php';
// 检测是否开启统计

View File

@@ -1,80 +0,0 @@
<?php
require_once './../config/api_key.php';
require_once './../config/config.php';
// Token 生成
function privateToken($length = 32)
{
$output = '';
for ($a = 0; $a < $length; $a++) {
$output .= chr(mt_rand(65, 122)); //生成php随机数
}
return md5($output);
}
// 通过Token查找用户ID
function getID($token)
{
global $tokenList;
$token = preg_replace('/[\W]/', '', $token); // 过滤非字母数字,删除空格
$key = array_search($token, $tokenList);
if ($key >= 0) {
return $key;
} else {
return ('没有这个用户ID');
}
}
// 通过ID查找用户Token
function getIDToken($id)
{
global $tokenList;
$id = preg_replace('/[\W]/', '', $id); // 过滤非字母数字,删除空格
foreach ($tokenList as $key => $value) {
if ($key == $id) {
return $value;
}
}
}
/**
* 检查是否开启api上传
* code:201 访问成功但是服务端关闭API上传
* code:202 访问成功但是Token错误
*/
function check_api($token)
{
global $config;
global $tokenList;
if (!$config['apiStatus']) {
// API关闭 服务端关闭API上传
$reJson = array(
"result" => 'failed',
'code' => 201,
'message' => 'API Closed',
);
exit(json_encode($reJson, JSON_UNESCAPED_UNICODE));
}
if (!in_array($tokenList[$token], $tokenList)) {
// Token 是否存在
$reJson = array(
"result" => 'failed',
'code' => 202,
'message' => 'Token Error',
);
exit(json_encode($reJson, JSON_UNESCAPED_UNICODE));
}
if ($tokenList[$token]['expired'] < time()) {
// Token 是否过期
$reJson = array(
"result" => 'failed',
'code' => 203,
'message' => 'Token Expired',
);
exit(json_encode($reJson, JSON_UNESCAPED_UNICODE));
}
}

View File

@@ -1,6 +1,5 @@
<?php
require_once __DIR__ . '/../application/function.php';
require_once APP_ROOT . '/api/function_API.php';
require_once APP_ROOT . '/application/class.upload.php';
require_once APP_ROOT . '/config/api_key.php';
@@ -40,7 +39,12 @@ if ($handle->uploaded) {
// 最小高度
$handle->image_min_height = $config['minHeight'];
// 转换图片为指定格式
$handle->image_convert = $config['imgConvert'];
if (isset($config['imgConvert'])) {
// 只转换非webp格式和非动态图片
if ($handle->file_src_name_ext !== 'webp' && !isAnimatedGif($handle->file_src_pathname)) {
$handle->image_convert = $config['imgConvert'];
}
}
// 存储图片路径:images/201807/
$handle->process('../' . config_path());
@@ -52,6 +56,9 @@ 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;
// 关闭上传后显示加密删除链接
if ($config['show_user_hash_del']) {
// 判断PHP版本启用删除
@@ -75,10 +82,10 @@ if ($handle->uploaded) {
echo json_encode($reJson, JSON_UNESCAPED_UNICODE);
$handle->clean();
} else {
// 上传错误 code:403 客户端文件有问题
// 上传错误 code:400 客户端文件有问题
$reJson = array(
"result" => "failed",
"code" => 403,
"code" => 400,
"message" => $handle->error,
);

View File

@@ -319,7 +319,7 @@ class timthumb
$cachePrefix = ($this->isURL ? '_ext_' : '_int_');
if ($this->isURL) {
$arr = explode('&', $_SERVER ['QUERY_STRING']);
$arr = explode('&', $_SERVER['QUERY_STRING']);
asort($arr);
$this->cachefile = $this->cacheDirectory . '/' . FILE_CACHE_PREFIX . $cachePrefix . md5($this->salt . implode('', $arr) . $this->fileCacheVersion) . FILE_CACHE_SUFFIX;
} else {
@@ -333,7 +333,7 @@ class timthumb
$this->debug(1, "Local image path is {$this->localImage}");
$this->localImageMTime = @filemtime($this->localImage);
//We include the mtime of the local file in case in changes on disk.
$this->cachefile = $this->cacheDirectory . '/' . FILE_CACHE_PREFIX . $cachePrefix . md5($this->salt . $this->localImageMTime . $_SERVER ['QUERY_STRING'] . $this->fileCacheVersion) . FILE_CACHE_SUFFIX;
$this->cachefile = $this->cacheDirectory . '/' . FILE_CACHE_PREFIX . $cachePrefix . md5($this->salt . $this->localImageMTime . $_SERVER['QUERY_STRING'] . $this->fileCacheVersion) . FILE_CACHE_SUFFIX;
}
$this->debug(2, "Cache file is: " . $this->cachefile);
@@ -580,7 +580,7 @@ class timthumb
$mimeType = $sData['mime'];
$this->debug(3, "Mime type of image is $mimeType");
if (!preg_match('/^image\/(?:gif|jpg|jpeg|png|webp)$/i', $mimeType)) {
if (!preg_match('/^image\/(?:gif|jpg|jpeg|png|webp|bmp)$/i', $mimeType)) {
return $this->error("The image being resized is not a valid gif, jpg or png.");
}
@@ -828,8 +828,11 @@ class timthumb
$imgType = 'gif';
imagegif($canvas, $tempfile);
} else if (preg_match('/^image\/webp$/i', $mimeType)) {
$imgType = 'WEBP';
$imgType = 'webp';
imagewebp($canvas, $tempfile);
} else if (preg_match('/^image\/bmp$/i', $mimeType)) {
$imgType = 'bmp';
imagebmp($canvas, $tempfile);
} else {
return $this->sanityFail("Could not match mime type after verifying it previously.");
}
@@ -876,9 +879,9 @@ class timthumb
$tempfile4 = tempnam($this->cacheDirectory, 'timthumb_tmpimg_');
$context = stream_context_create();
$fp = fopen($tempfile, 'r', 0, $context);
if(strlen($imgType) == 3) {
if (strlen($imgType) == 3) {
file_put_contents($tempfile4, $this->filePrependSecurityBlock . $imgType . ' ?' . '>'); //7 extra bytes, first 3 being image type
}elseif (strlen($imgType) == 4){
} elseif (strlen($imgType) == 4) {
file_put_contents($tempfile4, $this->filePrependSecurityBlock . $imgType . ' ?' . '>'); //7 extra bytes, first 4 being image type
}
file_put_contents($tempfile4, $fp, FILE_APPEND);
@@ -1096,7 +1099,7 @@ class timthumb
}
$mimeType = $this->getMimeType($tempfile);
if (!preg_match("/^image\/(?:jpg|jpeg|gif|png|webp)$/i", $mimeType)) {
if (!preg_match("/^image\/(?:jpg|jpeg|gif|png|webp|bmp)$/i", $mimeType)) {
$this->debug(3, "Remote file has invalid mime type: $mimeType");
@unlink($this->cachefile);
touch($this->cachefile);
@@ -1171,6 +1174,9 @@ class timthumb
if (strtolower($mimeType) == 'image/webp') {
$mimeType = 'image/webp';
}
if (strtolower($mimeType) == 'image/bmp') {
$mimeType = 'image/bmp';
}
$gmdate_expires = gmdate('D, d M Y H:i:s', strtotime('now +10 days')) . ' GMT';
$gmdate_modified = gmdate('D, d M Y H:i:s') . ' GMT';
// send content headers then display image
@@ -1193,7 +1199,6 @@ class timthumb
protected function securityChecks()
{
}
protected function param($property, $default = '')
@@ -1215,6 +1220,10 @@ class timthumb
case 'image/webp':
$image = imagecreatefromwebp($src);
break;
case 'image/bmp':
$image = imagecreatefrombmp($src);
break;
case 'image/png':
$image = imagecreatefrompng($src);
@@ -1412,5 +1421,4 @@ class timthumb
{
return $this->is404;
}
}

View File

@@ -285,7 +285,8 @@ class Imgs
return array('code' => false, 'msg' => '请给正确的字体颜色');
}
$def['color'] = imagecolorallocatealpha($dst_img, $rgb[0], $rgb[1], $rgb[2], $rgb[3]);
// ceil(127 - 127 * $rgb[3]) 将CSS中的Alpha 0-1 转换为PHP Alpha 127-0 并取整
$def['color'] = imagecolorallocatealpha($dst_img, $rgb[0], $rgb[1], $rgb[2], ceil(127 - 127 * $rgb[3]));
imagettftext(
$dst_img,
$def['fontSize'],

View File

@@ -56,8 +56,8 @@ function write_chart_total()
$count_contents['chart_disk'][] = [$count_day[$i] => getDirectorySize($total_contents . $count_day[$i])];
}
if(!is_dir(APP_ROOT.'/admin/logs/counts/')){
mkdir(APP_ROOT.'/admin/logs/counts/',0755,true);
if (!is_dir(APP_ROOT . '/admin/logs/counts/')) {
mkdir(APP_ROOT . '/admin/logs/counts/', 0755, true);
}
$count_contents = json_encode($count_contents, true);

View File

@@ -28,9 +28,9 @@ file_put_contents(APP_ROOT . '/config/EasyIamge.lock', '安装环境检测锁定
<h4>EasyImage2.0 基础检测:</h4>
<p>当前PHP版本:<sapn style="color:green"><?php echo phpversion() ?></sapn>
</p>
<p>upload_max_filesize - PHP上传最大值:<sapn style="color:green"><?php echo ini_get('upload_max_filesize'); ?></sapn>
<p>PHP最大上传: <sapn style="color:green"><?php echo ini_get('upload_max_filesize'); ?></sapn>
</p>
<p>post_max_size - POST上传最大值:<sapn style="color:green"><?php echo ini_get('post_max_size'); ?></sapn>
<p>POST最大上传: <sapn style="color:green"><?php echo ini_get('post_max_size'); ?></sapn>
</p>
<?php
// 扩展检测 取消检测imagick扩展
@@ -49,19 +49,19 @@ file_put_contents(APP_ROOT . '/config/EasyIamge.lock', '安装环境检测锁定
if (IS_WIN) {
echo '
<p style="color:green">upload.php 文件可执行</p>
<p style="color:green">/i 目录可读写</p>
<p style="color:green">' . $config['path'] . ' 目录可读写</p>
';
}
if (!IS_WIN) {
if ($quanxian !== '755' and !is_writable(APP_ROOT . '/i/')) {
if ($quanxian !== '755' and !is_writable(APP_ROOT . $config['path'])) {
echo '
<p style="color:red">upload.php 文件不可执行</font>>
<p style="color:red">/i 目录可读写</font>>
<p style="color:red">' . $config['path'] . ' 目录可读写</font>>
';
} else {
echo '
<p style="color:green">upload.php 文件可执行</p>
<p style="color:green">/i 目录可读写</p>
<p style="color:green">' . $config['path'] . ' 目录可读写</p>
';
}
}

View File

@@ -29,7 +29,7 @@ if ($config['password'] === 'e6e061838856bf47e1de730719fb2609') {
<script>
new $.zui.Messager("请修改默认密码,否则会有泄露风险! ",{
type: "warning", // 定义颜色主题
time:7000
time:6000
}).show();
</script>
';
@@ -83,10 +83,31 @@ if ($configp['checkImg'] !== 0) {
if (file_exists(APP_ROOT . '/.user.ini')) {
echo '
<script>
new $.zui.Messager("请关闭防跨目录读写或删除.user.ini文件 ",{
new $.zui.Messager("请关闭防跨目录读写或删除.user.ini文件",{
type: "danger", // 定义颜色主题
time:10000
time:7000
}).show();
</script>
';
}
// 检查当前版本与GitHub版本
if (@getVersion() !== $config['version']) {
echo '
<script>
new $.zui.Messager("当前版本与GitHub不一致,请检查当前是否最新版本!",{
type: "danger", // 定义颜色主题
time:9000
}).show();
</script>
';
}
// 检测是否开启登录上传
if ($config['mustLogin']) {
echo '
<script>
$.zui.browser.tip("请注意: 当前已开启登录上传,非登录用户不可上传图片!");
</script>
';
}

View File

@@ -44,8 +44,8 @@ if (isset($_GET['hash'])) {
if ($config['image_recycl']) {
// 如果开启回收站则进入回收站
checkImg($delHash, 3, 'recycle/');
echo '
if (checkImg($delHash, 3, 'recycle/') == true) {
echo '
<script>
new $.zui.Messager("删除成功", {
type: "success", // 定义颜色主题
@@ -53,6 +53,16 @@ if (isset($_GET['hash'])) {
}).show();
</script>
';
} else {
echo '
<script>
new $.zui.Messager("文件不存在!", {
type: "danger", // 定义颜色主题
icon: "exclamation-sign" // 定义消息图标
}).show();
</script>
';
}
} else {
// 否则直接删除
getDel($delHash, 'url');

View File

@@ -2,7 +2,7 @@
defined('APP_ROOT') ?: exit; // 禁止访问
if ($config['ad_bot']) echo $config['ad_bot_info']; // 底部广告
?>
<footer class="col-md-12 text-muted small" style="text-align: center;">
<footer class="container text-muted small navbar-fixed-bottom" style="text-align: center;background-color:rgba(255,255,255,0.7);">
<hr>
<!-- 对话框HTML -->
<div class="modal fade" id="myModal">
@@ -43,9 +43,6 @@ if ($config['ad_bot']) echo $config['ad_bot_info']; // 底部广告
<script src="<?php static_cdn(); ?>/public/static/nprogress/nprogress.min.js"></script>
<script src="<?php static_cdn(); ?>/public/static/qrcode/qrcode.min.js"></script>
<script>
// NProgress
NProgress.start();
NProgress.done();
// 导航状态
$('.nav-pills').find('a').each(function() {
if (this.href == document.location.href) {
@@ -53,6 +50,10 @@ if ($config['ad_bot']) echo $config['ad_bot_info']; // 底部广告
}
});
// NProgress
NProgress.start();
NProgress.done();
// js 获取当前网址二维码
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: window.location.href,

View File

@@ -6,7 +6,7 @@ require_once APP_ROOT . '/config/config.guest.php';
/**
* 判断GIF图片是否为动态
* @param $filename string 文件
* @return int
* @return int 是|否
*/
function isAnimatedGif($filename)
{
@@ -155,18 +155,20 @@ function static_cdn()
echo $config['domain'];
}
}
/*
// 获取允许上传的扩展名
/**
* 获取允许上传的扩展名
*/
function getExtensions()
{
global $config;
$arr = explode(',', $config['extensions']);
$mime = '';
for ($i = 0; $i < count($config['extensions']); $i++) {
$mime .= $config['extensions'][$i] . ',';
for ($i = 0; $i < count($arr); $i++) {
$mime .= $arr . ',';
}
return rtrim($mime, ',');
}
*/
/**
* 获取目录大小 如果目录文件较多将很费时
@@ -370,11 +372,16 @@ function getActive($url)
* 加密/解密图片路径
* @param string $data 要加密的内容
* @param int $mode =1或0 1解密 0加密
* @param String $key 盐
*/
function urlHash($data, $mode)
function urlHash($data, $mode, $key = null)
{
global $config;
$key = $config['password'];
if ($key) {
$key = $config['password'];
}
$iv = 'sciCuBC7orQtDhTO';
if ($mode) {
return openssl_decrypt(base64_decode($data), "AES-128-CBC", $key, 0, $iv);
@@ -656,7 +663,10 @@ function nsfwjs_json($url, $data = '')
/**
* 检查图片是否违规
* @param $imageUrl string 图片url
* @param $imageUrl 图片链接
* @param int $type 模式: 1|moderatecontent 2|nsfwjs 3|移入回收站
* @param string $dir 移入的目录
* @return bool
*/
function checkImg($imageUrl, $type = 1, $dir = 'suspic/')
{
@@ -730,13 +740,18 @@ function checkImg($imageUrl, $type = 1, $dir = 'suspic/')
if ($bad_pic == true) {
$old_path = APP_ROOT . str_replace($config['imgurl'], '', $imageUrl); // 提交网址中的文件路径 /i/2021/10/29/p8vypd.png
$name = date('Y_m_d') . '_' . basename($imageUrl); // 文件名 2021_10_30_p8vypd.png
$new_path = APP_ROOT . $config['path'] . $dir . $name; // 新路径含文件名
$suspic_dir = APP_ROOT . $config['path'] . $dir; // suspic路径
$new_path = APP_ROOT . $config['path'] . $dir . $name; // 新路径含文件名
$suspic_dir = APP_ROOT . $config['path'] . $dir; // suspic路径
if (!is_dir($suspic_dir)) { // 创建suspic目录并移动
if (!is_dir($suspic_dir)) { // 创建suspic目录并移动
mkdir($suspic_dir, 0777, true);
}
rename($old_path, $new_path);
if (is_file($old_path)) {
rename($old_path, $new_path);
return true;
} else {
return false;
}
}
}
@@ -1078,3 +1093,78 @@ function IP_URL_Ping($host, $port, $timeout)
}
return true;
}
/**
* 生成Token
* @param int $length Token长度
* @return string 返回Token
*/
function privateToken($length = 32)
{
$output = '';
for ($a = 0; $a < $length; $a++) {
$output .= chr(mt_rand(65, 122)); //生成php随机数
}
return md5($output);
}
/**
* 检查Token
* @param $token 要检查的Token
* code:201 访问成功但是服务端关闭API上传
* code:202 访问成功但是Token错误
*/
function check_api($token)
{
global $config;
global $tokenList;
if (!$config['apiStatus']) {
// 关闭API
$reJson = array(
"result" => 'failed',
'code' => 201,
'message' => 'API Closed',
);
exit(json_encode($reJson, JSON_UNESCAPED_UNICODE));
}
if (!in_array($tokenList[$token], $tokenList)) {
// Token 存在
$reJson = array(
"result" => 'failed',
'code' => 202,
'message' => 'Token Error',
);
exit(json_encode($reJson, JSON_UNESCAPED_UNICODE));
}
if ($tokenList[$token]['expired'] < time()) {
// Token 过期
$reJson = array(
"result" => 'failed',
'code' => 203,
'message' => 'Token Expired',
);
exit(json_encode($reJson, JSON_UNESCAPED_UNICODE));
}
}
/**
* 判断webp是否为动态图片
* @param $src 图像文件
* @return bool 是|否
*/
function isWebpAnimated($src)
{
$webpContents = file_get_contents($src);
$where = strpos($webpContents, "ANMF");
if ($where !== FALSE) {
// animated
$isAnimated = true;
} else {
// non animated
$isAnimated = false;
}
return $isAnimated;
}

View File

@@ -12,7 +12,7 @@
<title><?php echo $config['title']; ?></title>
<meta name="keywords" content="<?php echo $config['keywords']; ?>" />
<meta name="description" content="<?php echo $config['description']; ?>" />
<link rel="shortcut icon" href="<?php echo $config['domain']; ?>/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<?php static_cdn(); ?>/favicon.ico" type="image/x-icon" />
<link href="<?php static_cdn(); ?>/public/static/zui/css/zui.min.css" rel="stylesheet">
<link href="<?php static_cdn(); ?>/public/static/zui/theme/zui-theme-<?php echo $config['theme']; ?>.css" rel="stylesheet">
<script src="<?php static_cdn(); ?>/public/static/zui/lib/jquery/jquery-3.6.0.min.js"></script>

33
application/hide.php Executable file
View File

@@ -0,0 +1,33 @@
<?php
/**
* Program: EasyImage2.0
* Author: Icret
* Date: 2022/3/13 20:11
* 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']));
} else {
$real_path = APP_ROOT . '/public/images/404.png';
}
// 文件不存在
if (!is_file($real_path)) {
$real_path = APP_ROOT . '/public/images/404.png';
}
// 获取文件后缀
$ex = pathinfo($real_path, PATHINFO_EXTENSION);
// 设置头
header("Content-Type: image/" . $ex . ";text/html; charset=utf-8");
//输出文件
echo file_get_contents($real_path);
exit;

View File

@@ -1,7 +1,5 @@
<?php require_once __DIR__ . '/header.php'; ?>
<link rel="stylesheet" href="<?php static_cdn(); ?>/public/static/viewjs/viewer.min.css">
<link rel="stylesheet" href="<?php static_cdn(); ?>/public/static/zui/lib/datetimepicker/datetimepicker.min.css">
<style>
/** 图片列表*/
@@ -97,26 +95,27 @@
background-color: rgba(0, 0, 0, 0.5);
}
</style>
<div class="col-md-12">
<?php
if (!$config['showSwitch'] && !is_who_login('admin')) {
echo '<div class="alert alert-info">管理员关闭了预览哦~~</div>';
} else {
$path = isset($_GET['date']) ? $_GET['date'] : date('Y/m/d/'); // 获取指定目录
$path = preg_replace("/^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$/s", "", trim($path)); // 过滤非日期,删除空格
$keyNum = isset($_GET['num']) ? $_GET['num'] : $config['listNumber']; // 获取指定浏览数量
$keyNum = preg_replace("/[\W]/", "", trim($keyNum)); // 过滤非数字,删除空格
// $fileArr = getFile(APP_ROOT . config_path($path)); // 获取当日上传列表
$fileType = isset($_GET['search']) ? '*.' . preg_replace("/[\W]/", "", $_GET['search']) : '*.*'; // 按照图片格式
$fileArr = get_file_by_glob(APP_ROOT . config_path($path) . $fileType, 'list'); // 获取当日上传列表
echo '
<div class="row" style="margin-bottom:100px">
<div class="col-md-12">
<?php
if (!$config['showSwitch'] && !is_who_login('admin')) {
echo '<div class="alert alert-info">管理员关闭了预览哦~~</div>';
} else {
$path = isset($_GET['date']) ? $_GET['date'] : date('Y/m/d/'); // 获取指定目录
$path = preg_replace("/^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$/s", "", trim($path)); // 过滤非日期,删除空格
$keyNum = isset($_GET['num']) ? $_GET['num'] : $config['listNumber']; // 获取指定浏览数量
$keyNum = preg_replace("/[\W]/", "", trim($keyNum)); // 过滤非数字,删除空格
// $fileArr = getFile(APP_ROOT . config_path($path)); // 获取当日上传列表
$fileType = isset($_GET['search']) ? '*.' . preg_replace("/[\W]/", "", $_GET['search']) : '*.*'; // 按照图片格式
$fileArr = get_file_by_glob(APP_ROOT . config_path($path) . $fileType, 'list'); // 获取当日上传列表
echo '
<ul id="viewjs">
<div class="cards listNum">';
if ($fileArr[0]) {
foreach ($fileArr as $key => $value) {
if ($key < $keyNum) {
$imgUrl = $config['imgurl'] . config_path($path) . $value;
echo '
if ($fileArr[0]) {
foreach ($fileArr as $key => $value) {
if ($key < $keyNum) {
$imgUrl = $config['imgurl'] . config_path($path) . $value;
echo '
<div class="col-md-4 col-sm-6 col-lg-3">
<div class="card">
<li><img src="../public/images/loading.svg" data-image="' . creat_thumbnail_by_list($imgUrl) . '" data-original="' . $imgUrl . '" alt="简单图床-EasyImage"></li>
@@ -130,48 +129,48 @@
</div>
</div>
</div>
';
';
}
}
echo '</div>';
} else {
echo '<div class="alert alert-danger">今天还没有上传的图片哟~~ <br />快来上传第一张吧~!</div>';
}
echo '</div>';
} else {
echo '<div class="alert alert-danger">今天还没有上传的图片哟~~ <br />快来上传第一张吧~!</div>';
echo '</ul>';
}
echo '</ul>';
}
// 当前日期全部上传
$allUploud = isset($_GET['date']) ? $_GET['date'] : date('Y/m/d/');
$allUploud = get_file_by_glob(APP_ROOT . $config['path'] . $allUploud, 'number');
// 组合url
@$httpUrl = array('date' => $path, 'num' => getFileNumber(APP_ROOT . config_path($path)));
?>
</div>
<div class="col-md-12">
<hr />
<div class="col-md-8 col-xs-12" style="padding-bottom:5px">
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn btn-danger btn-mini" href="?<?php echo http_build_query($httpUrl); ?>">当前<?php echo $allUploud; ?></a>
<a class="btn btn-primary btn-mini" href="list.php">今日<?php echo get_file_by_glob(APP_ROOT . config_path() . '*.*', 'number'); ?></a>
<a class="btn btn-mini" href="?date=<?php echo date("Y/m/d/", strtotime("-1 day")) ?>">昨日<?php echo get_file_by_glob(APP_ROOT . $config['path'] . date("Y/m/d/", strtotime("-1 day")), 'number'); ?></a>
<?php
// 倒推日期显示上传图片
for ($x = 2; $x <= 6; $x++)
echo '<a class="btn btn-mini hidden-xs inline-block" href="?date=' . date('Y/m/d/', strtotime("-$x day")) . '">' . date('m月d日', strtotime("-$x day")) . '</a>';
?>
</div>
<div class="btn-group">
<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="recycle_img()">回收</a>
<a class="btn btn-mini" onclick="delete_img()">删除</a>
// 当前日期全部上传
$allUploud = isset($_GET['date']) ? $_GET['date'] : date('Y/m/d/');
$allUploud = get_file_by_glob(APP_ROOT . $config['path'] . $allUploud, 'number');
// 组合url
@$httpUrl = array('date' => $path, 'num' => getFileNumber(APP_ROOT . config_path($path)));
?>
</div>
<div class="col-md-12">
<hr />
<div class="col-md-8 col-xs-12" style="padding-bottom:5px">
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn btn-danger btn-mini" href="?<?php echo http_build_query($httpUrl); ?>">当前<?php echo $allUploud; ?></a>
<a class="btn btn-primary btn-mini" href="list.php">今日<?php echo get_file_by_glob(APP_ROOT . config_path() . '*.*', 'number'); ?></a>
<a class="btn btn-mini" href="?date=<?php echo date("Y/m/d/", strtotime("-1 day")) ?>">昨日<?php echo get_file_by_glob(APP_ROOT . $config['path'] . date("Y/m/d/", strtotime("-1 day")), 'number'); ?></a>
<?php
// 倒推日期显示上传图片
for ($x = 2; $x <= 6; $x++)
echo '<a class="btn btn-mini hidden-xs inline-block" href="?date=' . date('Y/m/d/', strtotime("-$x day")) . '">' . date('m月d日', strtotime("-$x day")) . '</a>';
?>
</div>
<div class="btn-group">
<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="recycle_img()">回收</a>
<a class="btn btn-mini" onclick="delete_img()">删除</a>
</div>
</div>
</div>
</div>
<!-- 按格式 -->
<div class="row">
<!--
<!-- 按格式 -->
<div class="row">
<!--
<div class="col-md-2 col-xs-6">
<form action="list.php" method="get">
<div class="input-group">
@@ -186,33 +185,36 @@
</div>
</form>
</div> -->
<div class="col-md-2 col-xs-6">
<div class="btn-group">
<a class="btn btn-sm" href="<?php echo '?' . http_build_query($httpUrl) . '&search=jpg'; ?>">JPG</a>
<a class="btn btn-sm" href="<?php echo '?' . http_build_query($httpUrl) . '&search=png'; ?>">PNG</a>
<a class="btn btn-sm" href="<?php echo '?' . http_build_query($httpUrl) . '&search=gif'; ?>">GIF</a>
<a class="btn btn-sm" href="<?php echo '?' . http_build_query($httpUrl) . '&search=webp'; ?>">Webp</a>
<div class="col-md-2 col-xs-6">
<div class="btn-group">
<a class="btn btn-sm" href="<?php echo '?' . http_build_query($httpUrl) . '&search=jpg'; ?>">JPG</a>
<a class="btn btn-sm" href="<?php echo '?' . http_build_query($httpUrl) . '&search=png'; ?>">PNG</a>
<a class="btn btn-sm" href="<?php echo '?' . http_build_query($httpUrl) . '&search=gif'; ?>">GIF</a>
<a class="btn btn-sm" href="<?php echo '?' . http_build_query($httpUrl) . '&search=webp'; ?>">Webp</a>
</div>
</div>
<!-- 按日期-->
<div class="col-md-2 col-xs-6">
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="get">
<div class="input-group">
<span class="input-group-addon fix-border fix-padding"></span>
<input type="text" class="form-control form-date input-sm" name="date" value="<?php echo date('Y/m/d/'); ?>" readonly="readonly">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary input-sm">按日期</button>
</span>
</div>
</form>
</div>
</div>
<!-- 按日期-->
<div class="col-md-2 col-xs-6">
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="get">
<div class="input-group">
<span class="input-group-addon fix-border fix-padding"></span>
<input type="text" class="form-control form-date input-sm" name="date" value="<?php echo date('Y/m/d/'); ?>" readonly="readonly">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary input-sm">按日期</button>
</span>
</div>
</form>
</div>
</div>
<!-- 返回顶部 -->
<div style="display: none;" id="rocket-to-top">
<div style="opacity:0;display: block;" class="level-2"></div>
<div class="level-3"></div>
</div>
</div>
<!-- 返回顶部 -->
<div style="display: none;" id="rocket-to-top">
<div style="opacity:0;display: block;" class="level-2"></div>
<div class="level-3"></div>
</div>
<link rel="stylesheet" href="<?php static_cdn(); ?>/public/static/viewjs/viewer.min.css">
<link rel="stylesheet" href="<?php static_cdn(); ?>/public/static/zui/lib/datetimepicker/datetimepicker.min.css">
<script src="<?php static_cdn(); ?>/public/static/lazyload/lazyload.js"></script>
<script src="<?php static_cdn(); ?>/public/static/viewjs/viewer.min.js"></script>
<script src="<?php static_cdn(); ?>/public/static/zui/lib/datetimepicker/datetimepicker.min.js"></script>
@@ -293,7 +295,7 @@
}).show();
}
}
// 删除图片
// 删除图片
function delete_img() {
var r = confirm("确认要删除?\n* 删除文件夹后将无法恢复!")
if (r == true) {

View File

@@ -39,7 +39,7 @@ function water($source)
'name' => $source,
'font' => APP_ROOT . $config['textFont'],
'fontSize' => $config['textSize'],
'color' => $config['textColor'],
'color' => str_replace(array('rgba', '(', ')'), '', $config['textColor']),
];
Imgs::setWater($source, $arr);
}
@@ -127,4 +127,4 @@ function write_log($filePath, $sourceName, $absolutePath, $fileSize, $from = "We
$log = array_replace($logs, $log);
cache_write($logFileName, $log, 'logs');
*/
}
}

View File

@@ -83,5 +83,25 @@ $ALLOWED_SITES = array(
'mindsharestudios.com'
);
require_once __DIR__ . '/TimThumb.php';
timthumb::start();
/**
* 修复无法生成生成webp动态图片的缩略图bug
*/
if (isset($_GET['img'])) {
// 获取图片后缀后4位
$ext = substr($_GET['img'], -4);
// 图片绝对路径
$src = APP_ROOT . $_GET['img'];
// 检测图片
if ($ext == 'webp' && isWebpAnimated($src)) {
// 输出动态的webp
header("Content-type: image/webp");
exit(file_get_contents($src, true));
}
// 非动态webp输出
require_once __DIR__ . '/TimThumb.php';
timthumb::start();
} else {
// 输出404
header("Content-type: image/webp");
exit(file_get_contents(APP_ROOT . '/public/images/404.png', true));
}

View File

@@ -38,7 +38,12 @@ if ($handle->uploaded) {
// 最小高度
$handle->image_min_height = $config['minHeight'];
// 转换图片为指定格式
$handle->image_convert = $config['imgConvert'];
if (isset($config['imgConvert'])) {
// 只转换非webp格式和非动态图片
if ($handle->file_src_name_ext !== 'webp' && !isAnimatedGif($handle->file_src_pathname)) {
$handle->image_convert = $config['imgConvert'];
}
}
/* 等比例缩减图片 放到前端了
if ($config['imgRatio']) {
@@ -51,13 +56,6 @@ if ($handle->uploaded) {
// 存储图片路径:images/201807/
$handle->process(APP_ROOT . config_path());
/*
// 创建缩略图 开启后会个别返回文件失败暂时没找到替代方案如果启用此项目需要将list.php中的get_online_thumbnail改成return_thumbnail_images函数
if ($config['thumbnail']) {
@creat_thumbnail_images($handle->file_dst_name);
}
*/
// 图片完整相对路径:/i/2021/05/03/k88e7p.jpg
if ($handle->processed) {
header('Content-type:text/json');
@@ -66,6 +64,9 @@ 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;
// 关闭上传后显示加密删除链接
if ($config['show_user_hash_del']) {
// 判断PHP版本启用删除
@@ -81,7 +82,7 @@ if ($handle->uploaded) {
$reJson = array(
"result" => "success",
"code" => 200,
"url" => $imageUrl,
"url" => $hide_original,
"srcName" => $handle->file_src_name_body,
"thumb" => $config['domain'] . '/application/thumb.php?img=' . $pathIMG,
"del" => $delUrl,
@@ -97,7 +98,6 @@ if ($handle->uploaded) {
);
unset($handle);
header('Content-Type:application/json; charset=utf-8');
unset($handle);
exit(json_encode($reJson, JSON_UNESCAPED_UNICODE));
}

View File

@@ -11,16 +11,16 @@ $config=Array
'imgurl'=>'http://127.0.0.1',
'user'=>'admin',
'password'=>'e6e061838856bf47e1de730719fb2609',
'mustLogin'=>1,
'apiStatus'=>1,
'mustLogin'=>0,
'apiStatus'=>0,
'path'=>'/i/',
'imgName'=>'default',
'maxSize'=>10485760,
'maxUploadFiles'=>100,
'watermark'=>0,
'waterText'=>'简单图床 - png.cm',
'waterPosition'=>0,
'textColor'=>'255,0,0,1',
'waterPosition'=>5,
'textColor'=>'rgba(0,255,0,0.5)',
'textSize'=>50,
'textFont'=>'/public/static/hkxzy.ttf',
'waterImg'=>'/public/images/watermark.png',
@@ -41,7 +41,7 @@ $config=Array
'imgRatio_preserve_headers'=>1,
'static_cdn'=>0,
'theme'=>'default',
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.4',
'static_cdn_url'=>'https://cdn.jsdelivr.net/gh/icret/EasyImages2.0@2.5.6',
'TinyPng_key'=>'',
'checkImg'=>0,
'checkImg_value'=>50,
@@ -63,9 +63,9 @@ var _hmt = _hmt || [];
<a href="https://app.cloudcone.com.cn/?ref=3521" target="_blank"><img src="/public/images/EasyImage2.0.png" /></a>
</div>',
'ad_bot'=>0,
'ad_bot_info'=>'<div class="col-md-12" style="text-align: center;margin:12px;">
<a href="../public/images/wechat.jpg" title="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini" style="color:#329d38;" data-lightbox-group="group1644998953432"><i class="icon icon-wechat"></i> 打赏作者</a>
<a href="../public/images/alipay.jpg" title="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini" style="color:#1970fc;" data-lightbox-group="group1644998953432"><i class="icon icon-zhifubao"></i> 打赏作者</a>
'ad_bot_info'=>'<div class="col-md-12" style="text-align: center;padding:12px 0 110px 0;">
<a href="../public/images/wechat.jpg" alt="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini" style="color:#329d38;" data-lightbox-group="group1644998953432"><i class="icon icon-wechat"></i> 打赏作者</a>
<a href="../public/images/alipay.jpg" alt="您的赞美是我开发的动力!" data-toggle="lightbox" class="btn btn-mini" style="color:#1970fc;" data-lightbox-group="group1644998953432"><i class="icon icon-zhifubao"></i> 打赏作者</a>
</div>',
'showSwitch'=>1,
'showSort'=>1,
@@ -97,8 +97,10 @@ var _hmt = _hmt || [];
),
'language'=>0,
'image_recycl'=>1,
'version'=>'2.5.4',
'update'=>'2022-02-27 15:00:09',
'delDir'=>'thumbnails/',
'hide'=>0,
'version'=>'2.5.6',
'update'=>'2022-03-14 17:48:22',
'terms'=>'<div class="container">
<div class="row">
<div class="col-xs-3">
@@ -151,7 +153,7 @@ var _hmt = _hmt || [];
<h4>会话 ID: </h4>
<p>“会话 ID”允许我们在多个网页请求中识别特定用户。此会话 ID 会尽可能保存在您的 cookie 文件中。如果 cookie 未启用,或者如果用户的 Internet 浏览器程序不支持 cookie,则我们将在请求的网页中放置会话 ID。这使最终用户不必为每个网页请求不断地重新输入某些信息,例如帐户名和密码。每当用户关闭其 Internet 浏览器时,此会话 ID 就会过期。</p>
<h4>网站跟踪、报告: </h4>
<p>我们的许多网页还包含特殊的电子图像(称为“单像素 gif”或“gif”),使我们能够仅收集非个人身份的流量统计数据和有关我们网站访问者的其他汇总信息。IMX.to(通过自身或第三方)使用此技术收集和积累匿名数据,帮助我们了解和分析访问我们网站的人的体验,并连同您提供的其他信息,定制您未来的访问并改进我们的网站网站。例如,我们捕获有关所用浏览器类型、操作系统软件(例如 Windows 95 与 98 或 Macintosh)、cookie 偏好(用户是否打开或关闭它们)和搜索引擎关键字(哪些关键字做了什么)的数据。访问者用于访问我们的网站)。我们还记录了访问次数,所采取的路径,以及在我们网站内的站点和页面上花费的时间。请记住,这些信息都不是个人身份信息,我们只将这些信息分发给我们的内部员工以及与我们签署了保密协议的合作伙伴。我们与合作伙伴共享的任何信息都反映了整个网站或 Internet 使用趋势,而不是个别信息。</p>
<p>我们的许多网页还包含特殊的电子图像(称为“单像素 gif”或“gif”),使我们能够仅收集非个人身份的流量统计数据和有关我们网站访问者的其他汇总信息。本站(通过自身或第三方)使用此技术收集和积累匿名数据,帮助我们了解和分析访问我们网站的人的体验,并连同您提供的其他信息,定制您未来的访问并改进我们的网站网站。例如,我们捕获有关所用浏览器类型、操作系统软件(例如 Windows 95 与 98 或 Macintosh)、cookie 偏好(用户是否打开或关闭它们)和搜索引擎关键字(哪些关键字做了什么)的数据。访问者用于访问我们的网站)。我们还记录了访问次数,所采取的路径,以及在我们网站内的站点和页面上花费的时间。请记住,这些信息都不是个人身份信息,我们只将这些信息分发给我们的内部员工以及与我们签署了保密协议的合作伙伴。我们与合作伙伴共享的任何信息都反映了整个网站或 Internet 使用趋势,而不是个别信息。</p>
<h4>IP地址: </h4>
<p>每次您访问本网站时,我们都会自动收集您的 IP 地址和您来自的网页。为了为您管理和优化站点并诊断我们站点的问题,我们使用您的 IP 地址来帮助识别您的身份并收集有关您的广泛人口统计信息。</p>
<h4>来自其他网站的信息: </h4>
@@ -182,6 +184,5 @@ var _hmt = _hmt || [];
</div>
</div>
</div>
</div>',
'delDir'=>'thumbnails/'
</div>'
);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -25,7 +25,7 @@ mustLogin();
<button type="button" class="btn btn-link uploader-btn-stop"><i class="icon icon-pause"></i>暂停上传</button>
</div>
</div>
<div class="col-md-10 col-md-offset-1 clo-xs-12">
<div class="col-md-10 col-md-offset-1 clo-xs-12" style="margin-bottom:90px;">
<ul class="nav nav-tabs">
<li <?php if ($config['upload_first_show'] == 1) echo 'class="active"'; ?>>
<a href="#" data-target="#tab2Content1" data-toggle="tab"><i class="icon icon-link"></i> 直链</a>
@@ -72,18 +72,38 @@ mustLogin();
</div>
</div>
</div>
</table>
<link href="<?php static_cdn(); ?>/public/static/marquee/marquee.css" rel="stylesheet">
<link href="<?php static_cdn(); ?>/public/static/zui/lib/uploader/zui.uploader.min.css" rel="stylesheet">
<script src="<?php static_cdn(); ?>/public/static/zui/lib/uploader/zui.uploader.min.js"></script>
<script src="<?php static_cdn(); ?>/public/static/marquee/marquee.min.js"></script>
<script src="<?php static_cdn(); ?>/public/static/EasyImage.js"></script>
<script>
// 公告
(function() {
new Marquee({
// 要滚动的元素
elem: document.getElementById("marquee2"),
// 每次滚动的步长(px)默认0
step: 30,
// 滚动效果执行时间(ms)默认400
stepInterval: 400,
// 每次滚动间隔时间(ms)默认3000
interval: 3000,
// 滚动方向up、down、left、right默认为"left" 当前只支持上下
dir: 'up',
// 是否自动滚动默认为true
autoPlay: true,
// 是否在鼠标滑过低级元素时暂停滚动默认为true
hoverPause: true
});
})();
// 上传控制
$('#upShowID').uploader({
// 自动上传
autoUpload: false,
// 文件上传提交地址
url: '/application/upload.php',
url: './application/upload.php',
// 最大支持的上传文件
max_file_size: <?php echo $config['maxSize']; ?>,
// 分片上传 0为不分片 分片容易使图片上传失败
@@ -132,25 +152,6 @@ mustLogin();
}
}
});
// 公告
(function() {
new Marquee({
// 要滚动的元素
elem: document.getElementById("marquee2"),
// 每次滚动的步长(px)默认0
step: 30,
// 滚动效果执行时间(ms)默认400
stepInterval: 400,
// 每次滚动间隔时间(ms)默认3000
interval: 3000,
// 滚动方向up、down、left、right默认为"left" 当前只支持上下
dir: 'up',
// 是否自动滚动默认为true
autoPlay: true,
// 是否在鼠标滑过低级元素时暂停滚动默认为true
hoverPause: true
});
})();
</script>
<?php
/** 环境检测 */ if ($config['checkEnv']) require_once APP_ROOT . '/application/check.php';

BIN
install/README/1305032567.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
install/README/2657944724.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
install/README/3053540273.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

BIN
install/README/674074848.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@@ -1,120 +1 @@
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="400px" height="400px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
<g transform="rotate(0 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#df1317">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9655172413793104s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(12.413793103448276 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e4934b">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9310344827586207s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(24.82758620689655 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e2bb8b">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.896551724137931s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(37.241379310344826 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e1e7e7">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8620689655172413s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(49.6551724137931 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#91bcc6">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8275862068965517s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(62.06896551724138 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#07abcc">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.7931034482758621s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(74.48275862068965 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#0a69aa">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.7586206896551724s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(86.89655172413794 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#194645">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.7241379310344828s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(99.3103448275862 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#df1317">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6896551724137931s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(111.72413793103448 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e4934b">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6551724137931034s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(124.13793103448276 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e2bb8b">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6206896551724138s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(136.55172413793105 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e1e7e7">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5862068965517241s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(148.9655172413793 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#91bcc6">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5517241379310345s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(161.3793103448276 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#07abcc">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5172413793103449s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(173.79310344827587 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#0a69aa">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4827586206896552s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(186.20689655172413 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#194645">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4482758620689655s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(198.6206896551724 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#df1317">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.41379310344827586s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(211.0344827586207 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e4934b">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3793103448275862s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(223.44827586206895 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e2bb8b">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3448275862068966s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(235.86206896551724 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e1e7e7">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3103448275862069s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(248.27586206896552 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#91bcc6">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.27586206896551724s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(260.6896551724138 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#07abcc">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.2413793103448276s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(273.1034482758621 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#0a69aa">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.20689655172413793s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(285.51724137931035 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#194645">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.1724137931034483s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(297.9310344827586 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#df1317">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.13793103448275862s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(310.3448275862069 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e4934b">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.10344827586206896s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(322.7586206896552 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e2bb8b">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.06896551724137931s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(335.17241379310343 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#e1e7e7">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.034482758620689655s" repeatCount="indefinite"></animate>
</rect>
</g><g transform="rotate(347.58620689655174 50 50)">
<rect x="48.5" y="12" rx="1.5" ry="8" width="3" height="16" fill="#91bcc6">
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animate>
</rect>
</g>
<!-- [ldio] generated by https://loading.io/ --></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin:auto;background:transparent;display:block;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle cx="50" cy="50" r="15" stroke-width="2" stroke="#499255" stroke-dasharray="23.561944901923447 23.561944901923447" fill="none" stroke-linecap="round"><animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;360 50 50"></animateTransform></circle><circle cx="50" cy="50" r="12" stroke-width="2" stroke="#00c5ff" stroke-dasharray="18.84955592153876 18.84955592153876" stroke-dashoffset="18.84955592153876" fill="none" stroke-linecap="round"><animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" keyTimes="0;1" values="0 50 50;-360 50 50"></animateTransform></circle><a xlink:href="//png.cm/" target="_blank" title="简单图床官网"><text x="48" y="50" font-size="1" fill="white" opacity="0">简单图床</text></a></svg>

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

File diff suppressed because one or more lines are too long

1
public/static/jscolor/jscolor.min.js vendored Executable file

File diff suppressed because one or more lines are too long