pull/141/head 2.5.8
icret 2022-04-08 13:33:53 +00:00
parent 919228ff1e
commit abfc5a3fa0
10 changed files with 74 additions and 60 deletions

View File

@ -19,7 +19,7 @@
## 目录
[特点](#特点)-[注意](#常见问题)-[安装](#安装)-[升级](#程序升级)-[安全](#安全配置)-[鉴黄](#鉴黄)-[更新日志](#更新日志)-[支持开发者](#支持开发者)-[界面演示](#界面演示)-[兼容](#兼容)-[鸣谢](#鸣谢)-[开源许可](#许可)
[特点](#特点)-[注意](#常见问题)-[安装](#安装)-[升级](#程序升级)-[安全](#安全配置)-[鉴黄](#鉴黄)-[更新日志](#更新日志)-[支持开发者](#支持开发者)-[界面演示](#界面演示)-[兼容](#兼容)-[鸣谢](#鸣谢)-[许可](#开源许可)
## 特点
@ -121,10 +121,11 @@ $HTTP["url"] =~ "^/(i|public)/" {
- nsfwjs [nsfwjs docker](https://hub.docker.com/r/icret/nsfw_restful_api)
1. 确定已安装`docker`和`docker-compose`
2. 拉镜像 `docker pull icret/nsfw_restful_api:latest` 或者直接 `docker run -p 3307:3307 -d icret/nsfw_restful_api`
2. 拉镜像 `docker pull icret/nsfw_restful_api:latest` 或者直接 `docker run -p 3307:3307 -d icret/nsfw_restful_api`
3. 后台API设置中填入网址 比如:`http://IP:3307/api/nsfw/classify?url=`
4. 后台图片安全图片鉴黄以nsfwjs方式
5. 如果你使用别的nsfwjs api必须返回json格式如下
5. 如果你使用别的nsfwjs api,必须返回json 并且格式如下:
```json
[{
"className": "Drawing",
@ -151,6 +152,8 @@ $HTTP["url"] =~ "^/(i|public)/" {
* 2022-04-02 v2.5.8 deving
- 修复在PHP8环境下的bugs
- 修复删除token产生的bug
- 更改顶部广告位置
- 更改广场样式
* 2022-3-30 v2.5.7
- 增加弹窗公告

View File

@ -831,25 +831,26 @@ if (isset($_GET['recycle_reimg'])) {
<h5>我的信息</h5>
<hr />
<p class="text-ellipsis">Your IP: <?php echo real_ip(); ?></p>
<p class="text-ellipsis">Browser: <?php echo $_SERVER['HTTP_USER_AGENT']; ?></p>
<p class="text-ellipsis">Browser: <?php echo $_SERVER['HTTP_USER_AGENT']; ?></p>
<h5>图床信息</h5>
<hr />
<p>
<?php if (empty($config['TinyPng_key'])) : ?>
<i class="icon icon-times" data-toggle="tooltip" title="图片压缩TinyPng未填写">TinyPng</i><br />
<span class="label label-badge label-warning" data-toggle="tooltip" title="图片压缩TinyPng未填写">TinyPng</span>
<?php else : ?>
<i class="icon icon-check" data-toggle="tooltip" title="图片压缩TinyPng已填写">TinyPng</i><br />
<span class="label label-badge label-success" data-toggle="tooltip" title="图片压缩TinyPng已填写">TinyPng</span>
<?php endif; ?>
<?php if (empty($config['moderatecontent_key'])) : ?>
<i class="icon icon-times" data-toggle="tooltip" title="图片审查moderatecontent未填写">Moderatecontent</i><br />
<span class="label label-badge label-warning" data-toggle="tooltip" title="图片审查moderatecontent未填写">Moderatecontent</span>
<?php else : ?>
<i class="icon icon-check" data-toggle="tooltip" title="图片审查moderatecontent已填写">Moderatecontent</i><br />
<span class="label label-badge label-success" data-toggle="tooltip" title="图片审查moderatecontent已填写">Moderatecontent</span>
<?php endif; ?>
<a href="https://easysoft.github.io/zui/" target="_blank"><span class="label label-badge label-primary" data-toggle="tooltip" title="前端框架">ZUI</span></a>
<span class="label label-badge label-success" data-toggle="tooltip" title="当前版本"><?php echo $config['version']; ?></span>
<?php if (getVersion() !== $config['version']) : ?>
<a href="https://github.com/icret/EasyImages2.0/releases" target="_blank"><span class="label label-badge label-warning" data-toggle="tooltip" title="Github有更新,更新后删除<p>/admin/logs/verson/</p>文件夹会自动同步最新版本号"><?php echo getVersion(); ?> New</span></a>
<?php endif; ?>
<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>
<a href="https://github.com/easysoft/zui" target="_blank"><span class="label label-badge label-info" data-toggle="tooltip" title="前端使用的框架">ZUI</span></a>
<span class="label label-badge label-info" data-toggle="tooltip" title="当前版本"><?php echo $config['version']; ?></span>
<a href="https://github.com/icret/EasyImages2.0/releases" target="_blank"><span class="label label-badge label-success" data-toggle="tooltip" title="更新后删除<p>/admin/logs/verson/</p>文件夹会自动同步版本">最新版本:<?php echo getVersion(); ?></span></a>
</p>
</div>
</div>

View File

@ -65,7 +65,7 @@ if ($config['notice_status'] == 1 && !empty($config['notice'])) : ?>
// 导航状态
$('.nav-pills').find('a').each(function() {
if (this.href == document.location.href) {
$(this).parent().addClass('active'); // this.className = 'active';
$(this).parent().addClass('active'); // this.className = 'active';
}
});

View File

@ -22,16 +22,16 @@
/*---------------基础配置开始-------------------*/
// 设置html为utf8
@header('Content-Type:text/html;charset=utf-8');
header('Content-Type:text/html;charset=utf-8');
//将时区设置为中国·上海
@ini_set('date.timezone', 'Asia/Shanghai');
@date_default_timezone_set('Asia/Shanghai');
ini_set('date.timezone', 'Asia/Shanghai');
date_default_timezone_set('Asia/Shanghai');
// 修改内存限制 根据服务器配置选择低于128M容易出现上传失败你懂得图片挺占用内存的
@ini_set('memory_limit', '512M');
ini_set('memory_limit', '512M');
// 定义根目录
@define('APP_ROOT', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')));
define('APP_ROOT', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')));
// 判断当前的系统类型是否为windows
@define('IS_WIN', strstr(PHP_OS, 'WIN') ? 1 : 0);
define('IS_WIN', strstr(PHP_OS, 'WIN') ? 1 : 0);
/*---------------基础配置结束-------------------*/

View File

@ -1,6 +1,6 @@
<?php require_once __DIR__ . '/function.php'; ?>
<!DOCTYPE html>
<html lang="zh-cn">
<?php require_once __DIR__ . '/function.php'; ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@ -16,7 +16,6 @@
<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>
<script src="<?php static_cdn(); ?>/public/static/zui/lib/clipboard/clipboard.min.js"></script>
<script src="<?php static_cdn(); ?>/public/static/zui/js/zui.min.js"></script>
<!--[if lt IE 9]>
<script src="<?php static_cdn(); ?>/public/static/zui/lib/ieonly/html5shiv.js"></script>
@ -28,7 +27,6 @@
</head>
<body class="container">
<?php if ($config['ad_top']) echo $config['ad_top_info']; ?>
<div class="page-header">
<ul class="nav nav-pills">
<li><a href="<?php echo $config['domain']; ?>"><i class="icon icon-home"></i> 首页</a></li>
@ -47,4 +45,4 @@
</ul>
</div>
<!-- 顶部导航栏END -->
<!-- 顶部导航栏END -->

View File

@ -27,6 +27,8 @@ $upTime = filemtime(APP_ROOT . $img);
// 清除缓存
clearstatcache();
// 广告
if ($config['ad_top']) echo $config['ad_top_info'];
?>
<div class="col-md-12">
<div class="col-md-6" style="text-align: center;">
@ -89,6 +91,7 @@ clearstatcache();
</div>
<script src="<?php static_cdn(); ?>/public/static/exif/exif.js"></script>
<script src="<?php static_cdn(); ?>/public/static/EasyImage.js"></script>
<script src="<?php static_cdn(); ?>/public/static/zui/lib/clipboard/clipboard.min.js"></script>
<script>
// 获取图片长宽
function getImgNaturalDimensions(oImg, callback) {

View File

@ -1,4 +1,6 @@
<?php require_once __DIR__ . '/header.php'; ?>
<?php require_once __DIR__ . '/header.php';
if ($config['ad_top']) echo $config['ad_top_info'];
?>
<div class="row" style="margin-bottom:100px">
<div class="col-md-12">
<?php
@ -34,9 +36,11 @@
<a href="<?php echo $imgUrl; ?>" target="_blank"><i class="icon icon-picture" data-toggle="tooltip" title="原图" style="margin-left:10px;"></i></a>
<a href="#" class="copy" data-clipboard-text="<?php echo $imgUrl; ?>" data-toggle="tooltip" title="复制" style="margin-left:10px;"><i class="icon icon-copy"></i></a>
<a href="/application/info.php?img=<?php echo $imgUrl; ?>" data-toggle="tooltip" title="信息" target="_blank" style="margin-left:10px;"><i class="icon icon-info-sign"></i></a>
<a href="<?php echo $config['domain']; ?>/application/del.php?recycle_url=<?php echo $imgUrl; ?>" target="_blank" data-toggle="tooltip" title="回收" style="margin-left:10px;"><i class="icon icon-undo"></i></a>
<a href="<?php echo $config['domain']; ?>/application/del.php?url=<?php echo $imgUrl; ?>" target="_blank" data-toggle="tooltip" title="删除" style="margin-left:10px;"><i class="icon icon-trash"></i></a>
<label style="margin-left:10px;" class="text-primary"><input type="checkbox" style="margin: left 200px;" id="url" name="checkbox" value="<?php echo $imgUrl; ?>"> 选择</label>
<?php if (is_who_login('admin')) : ?>
<a href="/application/del.php?recycle_url=<?php echo $imgUrl; ?>" target="_blank" data-toggle="tooltip" title="回收" style="margin-left:10px;"><i class="icon icon-undo"></i></a>
<a href="/application/del.php?url=<?php echo $imgUrl; ?>" target="_blank" data-toggle="tooltip" title="删除" style="margin-left:10px;"><i class="icon icon-trash"></i></a>
<label class="text-primary"><input type="checkbox" id="url" name="checkbox" value="<?php echo $imgUrl; ?>"> 选择</label>
<?php endif; ?>
</div>
</div>
</div>
@ -60,40 +64,42 @@
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>
<?php if (is_who_login('admin')) : ?>
<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>
<?php endif; ?>
</div>
</div>
<!-- 按格式 -->
<div class="row">
<!--
<div class="col-md-2 col-xs-6">
<form action="list.php" method="get">
<div class="input-group">
<select name="search" class="form-control input-sm">
<option value="jpg">jpg</option>
<option value="png">png</option>
<option value="gif">gif</option>
</select>
<span class="input-group-btn">
<input type="submit" value="按格式" class="btn btn-primary input-sm" />
</span>
</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>
<form action="list.php" method="get">
<div class="input-group">
<select name="&search" class="form-control input-sm">
<option value="jpg">JPG</option>
<option value="png">PNG</option>
<option value="gif">Gif</option>
<option value="gif">WEBP</option>
</select>
<span class="input-group-btn">
<input type="submit" value="按格式" class="btn btn-primary input-sm" />
</span>
</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>
</div> -->
<!-- 按日期-->
<div class="col-md-2 col-xs-6">
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="get">
@ -119,6 +125,7 @@
<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/clipboard/clipboard.min.js"></script>
<script src="<?php static_cdn(); ?>/public/static/zui/lib/datetimepicker/datetimepicker.min.js"></script>
<script>
// tips提示

View File

@ -103,8 +103,8 @@ var _hmt = _hmt || [];
'tinyfilemanager'=>1,
'delDir'=>'thumbnails/',
'hide'=>0,
'version'=>'2.5.7',
'update'=>'2022-04-02 18:00:58',
'version'=>'2.5.8',
'update'=>'2022-04-08 21:14:14',
'terms'=>'<div class="container">
<div class="row">
<div class="col-xs-3">

View File

@ -1,5 +1,7 @@
<?php
require_once 'application/header.php';
// 广告
if ($config['ad_top']) echo $config['ad_top_info'];
// 检查登录
mustLogin();
?>
@ -12,7 +14,7 @@ mustLogin();
</div>
</div>
</div>
<div id='upShowID' class="uploader col-md-10 col-md-offset-1 clo-xs-12" data-ride="uploader" data-url="/application/upload.php">
<div id='upShowID' class="uploader col-md-12 clo-xs-12" data-ride="uploader" data-url="/application/upload.php">
<div class="uploader-message text-center">
<div class="content"></div>
<button type="button" class="close">x</button>
@ -25,7 +27,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" style="margin-bottom:90px;">
<div class="col-md-12 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>

View File

@ -87,6 +87,6 @@
.bottom-bar {
width: 100%;
position: absolute;
bottom: -4px;
bottom: 0.1px;
background-color: rgba(0, 0, 0, 0.2);
}