pull/141/head
icret 2022-05-25 18:23:17 +08:00
parent f95eb0dd87
commit 67ed4ff05f
11 changed files with 271 additions and 116 deletions

View File

@ -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)/" {
<details><summary>点击查看2.0版更新日志</summary>
* 2022-05-22 v2.6.3 Deving 此版本正在开发中, 更新到此版本需要删除上传日志
* 2022-05-24 v2.6.3 Deving 此版本正在开发中, 更新到此版本需要删除上传日志
- 增加图片下载
- 增加简单暗黑模式
- 增加读取上传日志
- 增加广场浏览往日限制
- 有助于防爬虫抓取
- 增加登陆验证码开关(默认关闭)
- 删除图片详情页Exif信息
- 文件管理中图片使用缩略图显示
- 更改广场->信息中图片长宽获取方式

View File

@ -476,6 +476,16 @@ if (isset($_GET['recycle_reimg'])) {
</form>
</div>
<div class="tab-pane fade" id="Content6">
<h5 class="header-dividing">上传日志 <small>需要开启上传日志</small></h5>
<form class="form-inline" action="../application/read_log.php" method="post" target="_blank">
<div class="form-group">
<label for="logDate" class="text-primary">选择月份: </label>
<input type="text" class="form-control logDate input-sm" id="logDate" name="logDate" value="<?php echo date('Y-m'); ?>" required="required" readonly>
<input type="hidden" class="form-control" name="pass" value="<?php echo md5($config['password'] . date('YMDH')); ?>" placeholder="隐藏的保存">
</div>
<button type="submit" class="btn btn-sm btn-primary">查看</button>
</form>
<hr />
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<div class="form-group">
<label>缩略图生成方式</label>
@ -618,6 +628,11 @@ if (isset($_GET['recycle_reimg'])) {
</div>
</div>
<div class="col-md-12">
<div class="switch switch-inline" data-toggle="tooltip" title="建议开启,有效防止因撞库导致账户密码被破解!">
<input type="hidden" name="captcha" value="0">
<input type="checkbox" name="captcha" value="1" <?php if ($config['captcha']) echo 'checked'; ?>>
<label style="font-weight: bold">验证码</label>
</div>
<div class="switch switch-inline" data-toggle="tooltip" title="通过指定参数查询图床的开放数据 | 与缓存周期同步 | 使用方法见使用手册->公共查询">
<input type="hidden" name="public" value="0">
<input type="checkbox" name="public" value="1" <?php if ($config['public']) echo 'checked'; ?>>
@ -672,7 +687,7 @@ if (isset($_GET['recycle_reimg'])) {
<p>获得key后打开->API 设置->Moderate Key->填入key</p>
<p>为了访问速度,仅显示最近20张图片;鉴黄需要在图床安全->图片鉴黄中开启</p>
<div class="table-responsive table-condensed">
<table class="table table-hover table-bordered table-striped">
<table class="table table-hover table-striped table-bordered">
<thead>
<tr>
<th>序号</th>
@ -799,6 +814,11 @@ if (isset($_GET['recycle_reimg'])) {
</div>
<label data-toggle="tooltip" title="选择网站对外展示的一些功能和页面">页面展示开关</label>
<div class="form-group">
<div class="switch switch-inline" data-toggle="tooltip" title="暗黑模式切换">
<input type="hidden" name="dark-mode" value="0">
<input type="checkbox" name="dark-mode" value="1" <?php if ($config['dark-mode']) echo 'checked="checked"'; ?>>
<label style="font-weight: bold">暗黑</label>
</div>
<div class="switch switch-inline" data-toggle="tooltip" title="上传后显示删除链接<br/>删除链接是经过加密的">
<input type="hidden" name="show_user_hash_del" value="0">
<input type="checkbox" name="show_user_hash_del" value="1" <?php if ($config['show_user_hash_del']) echo 'checked="checked"'; ?>>
@ -814,10 +834,10 @@ if (isset($_GET['recycle_reimg'])) {
<input type="checkbox" name="showSort" value="1" <?php if ($config['showSort']) echo 'checked="checked"'; ?>>
<label style="font-weight: bold">排序</label>
</div>
<div class="switch switch-inline" data-toggle="tooltip" title="广场图片信息按钮">
<div class="switch switch-inline" data-toggle="tooltip" title="广场图片详细信息按钮">
<input type="hidden" name="show_exif_info" value="0">
<input type="checkbox" name="show_exif_info" value="1" <?php if ($config['show_exif_info']) echo 'checked="checked"'; ?>>
<label style="font-weight: bold">Exif</label>
<label style="font-weight: bold">详息</label>
</div>
<div class="switch switch-inline" data-toggle="tooltip" title="图片过多时可能会影响统计时间">
<input type="hidden" name="chart_on" value="0">
@ -957,7 +977,7 @@ if (isset($_GET['recycle_reimg'])) {
<h5 class="header-dividing">图片回收<small> 用户自行删除的会显示在这个页面</small></h5>
<p>为了访问速度,仅显示最近20张图片; 图片回收需要在图床安全->图片回收中开启</p>
<div class="table-responsive table-condensed">
<table class="table table-hover table-bordered table-striped">
<table class="table table-hover table-striped table-bordered">
<thead>
<tr>
<th>序号</th>
@ -1056,7 +1076,6 @@ if (isset($_GET['recycle_reimg'])) {
<div class="tab-pane fade" id="Content13">
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<h5 class="header-dividing">前端裁剪/压缩 <small>优点:服务器无压力 缺点:PC配置低的会导致浏览器卡顿,偶现丢失方向信息,仅支持JPG</small></h5>
<!-- <h4 class="with-padding bg-success" style="text-align: center;">前端裁剪压缩 - 优点:服务器无压力 缺点:PC配置低的会导致浏览器卡顿,偶现丢失方向信息,仅支持JPG</h4> -->
<div class="form-group">
<div class="switch switch-inline" data-toggle="tooltip" title="控制以下五项 不开启不生效">
<input type="hidden" name="imgRatio" value="0">
@ -1109,22 +1128,12 @@ if (isset($_GET['recycle_reimg'])) {
</form>
</div>
<div class="tab-pane fade" id="Content14">
<h5 class="header-dividing">文件管理 <small>由作者定制,非必要请勿替换</small></h5>
<a class="btn btn-mini btn-primary" href="/admin/manager.php?p=<?php echo date('Y/m/d'); ?> " target="_blank" data-toggle="tooltip" title="使用Tinyfilemanager管理文件"><i class="icon icon-folder-open"> 文件管理</i></a>
<h5 class="header-dividing">清理缓存 <small>已缓存: <?php echo getFileNumber(APP_ROOT . $config['path'] . 'thumbnails/') . '文件 | 占用' . getDistUsed(getDirectorySize(APP_ROOT . $config['path'] . 'thumbnails/')); ?></small></h5>
<form action="<?php echo $_SERVER['SCRIPT_NAME']; ?>" method="post">
<button type="submit" class="btn btn-mini btn-success" name="delDir" value="thumbnails/" onClick="return confirm('确认要清理缓存?\n* 删除文件夹后将无法恢复! ');"><i class="icon icon-trash"> 清理缓存</i></button>
</form>
<h5 class="header-dividing">文件管理 <small>由作者定制,非必要请勿替换</small></h5>
<a class="btn btn-mini btn-primary" href="/admin/manager.php?p=<?php echo date('Y/m/d'); ?> " target="_blank" data-toggle="tooltip" title="使用Tinyfilemanager管理文件"><i class="icon icon-folder-open"> 文件管理</i></a>
<h5 class="header-dividing">上传日志 <small>需要在图床安全->开启上传日志</small></h5>
<form class="form-inline" action="../application/read_log.php" method="post" target="_blank">
<div class="form-group">
<label for="logDate" class="text-primary">选择月份: </label>
<input type="text" class="form-control logDate input-sm" id="logDate" name="logDate" value="<?php echo date('Y-m'); ?>" required="required" readonly>
<input type="hidden" class="form-control" name="pass" value="<?php echo md5($config['password'] . date('YMDH')); ?>" placeholder="隐藏的保存">
</div>
<button type="submit" class="btn btn-sm btn-primary">查看</button>
</form>
<h5 class="header-dividing">删除文件 <small>* 删除后不可恢复</small></h5>
<form class="form-inline" method="get" action="../application/del.php" id="form" name="delForm" target="_blank" style="margin-bottom: 5px;">
<p id="delimgurl"></p>
@ -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: {

View File

@ -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 '
<script>
new $.zui.Messager("登录成功", {type: "primary" // 定义颜色主题
}).show();
</script>';
header("refresh:2;url=" . $config['domain'] . "");
} else {
echo '
<script>
new $.zui.Messager("密码错误", {type: "danger" // 定义颜色主题
}).show();
</script>';
header("refresh:2;");
}
} else {
echo '
<script>
new $.zui.Messager("账号不存在", {type: "danger" // 定义颜色主题
}).show();
</script>';
header("refresh:2;");
}
}
} else {
echo '
<script>
new $.zui.Messager("验证码错误!", {type: "danger" // 定义颜色主题
}).show();
</script>';
}
}
// 退出
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 '
<script>
new $.zui.Messager("验证码错误!", {type: "danger" // 定义颜色主题
}).show();
// 延时2s跳转
window.setTimeout("window.location=\'./index.php\'",2000);
</script>';
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 '
<script>
new $.zui.Messager("登录成功", {type: "primary" // 定义颜色主题
}).show();
</script>';
header("refresh:2;url=" . $config['domain'] . "");
} else {
echo '
<script>
new $.zui.Messager("密码错误", {type: "danger" // 定义颜色主题
}).show();
</script>';
header("refresh:2;");
}
} else {
echo '
<script>
new $.zui.Messager("账号不存在", {type: "danger" // 定义颜色主题
}).show();
</script>';
header("refresh:2;");
}
}
?>
<link href="<?php static_cdn(); ?>/public/static/login.css" rel="stylesheet">
@ -123,12 +132,14 @@ if (isset($_GET['login'])) {
<input type="text" name="user" id="account" class="form-control" value="" placeholder="输入登录账号" autocomplete="off" required="required">
<input type="password" name="password" id="password" class="form-control" value="" placeholder="输入登录密码" autocomplete="off" required="required">
<input type="hidden" name="password" id="md5_password">
<input class="form-control" type="text" name="code" value="" placeholder="输入下方4位数验证码" autocomplete="off" required="required" />
<div class="form-group">
<div class="col">
<label><img src="../application/captcha.php" onClick="this.src='../application/captcha.php?nocache='+Math.random()" title="点击换一张" /></label>
<?php if ($config['captcha']) : ?>
<input class="form-control" type="text" name="code" value="" placeholder="输入下方4位数验证码" autocomplete="off" required="required" />
<div class="form-group">
<div class="col">
<label><img src="../application/captcha.php" onClick="this.src='../application/captcha.php?nocache='+Math.random()" title="点击换一张" /></label>
</div>
</div>
</div>
<?php endif; ?>
<button type="submit" class="btn btn-block btn-primary"> </button>
<p class="signup">忘记账号或密码请查看<a href="#fogot" data-moveable="inside" data-remember-pos="false" data-toggle="modal" data-target="#fogot" data-position="center">帮助信息</a></p>
</form>

21
application/down.php Normal file
View File

@ -0,0 +1,21 @@
<?php
/**
* 下载文件
* https://www.php.cn/php-weizijiaocheng-394566.html
*/
//获取要下载的文件名
if (empty($_GET['dw'])) {
exit('No File');
}
$dw = '../' . $_GET['dw'];
//设置头信息
header('Content-Disposition:attachment;filename=' . basename($dw));
header('Content-Length:' . filesize($dw));
//读取文件并写入到输出缓冲
readfile($dw);
exit;

View File

@ -46,13 +46,15 @@ if ($config['notice_status'] == 1 && !empty($config['notice'])) : ?>
<a href="https://blog.png.cm" target="_blank">Icret</a>
<a href="/admin/terms.php" target="_blank"> DMCA</a>
<!-- 二维码按钮 -->
<a data-toggle="modal" href="#qr" title="使用手机扫描二维码访问"><i class="icon icon-qrcode hidden-xs inline-block"></i></a>
<?php
<a data-toggle="modal" href="#qr"><i class="icon icon-qrcode hidden-xs inline-block" data-toggle="tooltip" title="扫描二维码"></i></a>
<?php /** 暗黑模式 */ if ($config['dark-mode']) : ?>
<a id="dark" data-toggle="tooltip" title="暗黑模式"><i class="icon icon-lightbulb" id="dark_ico"></i></a>
<?php endif;
// 登录与退出
if (is_who_login('admin') || is_who_login('guest')) : ?>
<a href="<?php echo $config['domain']; ?>/admin/index.php?login=logout" title="退出账号"><i class="icon icon-signout"></i></a>
<a href="<?php echo $config['domain']; ?>/admin/index.php?login=logout" data-toggle="tooltip" title="退出账号"><i class="icon icon-signout"></i></a>
<? else : ?>
<a href="<?php echo $config['domain']; ?>/admin/index.php" title="账号登录"><i class="icon icon-user"></i></a>
<a href="<?php echo $config['domain']; ?>/admin/index.php" data-toggle="tooltip" title="账号登录"><i class="icon icon-user"></i></a>
<?php endif; ?>
</p>
</footer>
@ -104,16 +106,94 @@ if ($config['notice_status'] == 1 && !empty($config['notice'])) : ?>
console.log('网站公告已显示完毕')
})
}
<?php endif; ?>
<?php /** 简繁转换 */ if ($config['language'] == 1) : ?>
<?php endif;
/** 简繁转换 */ if ($config['language'] == 1) : ?>
$.getScript("<?php static_cdn(); ?>/public/static/i18n/jquery.s2t.js", function() { //加载成功后,并执行回调函数
$('*').s2t();
});
<?php endif;
/** 暗黑模式 */ if ($config['dark-mode']) : ?>
// 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);
}
<?php endif; ?>
// 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;', '');
</script>
</body>

View File

@ -23,7 +23,6 @@
<script src="<?php static_cdn(); ?>/public/static/zui/lib/ieonly/excanvas.js"></script>
<![endif]-->
<?php /** 自定义代码 */ if ($config['customize']) echo $config['customize']; ?>
</head>
<body class="container">
@ -45,4 +44,4 @@
</ul>
</div>
<!-- 顶部导航栏END -->
<!-- 顶部导航栏END -->

View File

@ -40,22 +40,61 @@ if ($config['ad_top']) echo $config['ad_top_info'];
?>
<div class="col-md-12">
<div class="col-md-6" style="text-align: center;">
<img data-toggle="lightbox" src="<?php echo $img_url; ?>" data-image="<?php echo $img_url; ?>" id="img1" class="img-rounded" height="200px" data-caption="<?php echo pathinfo($img_url, PATHINFO_FILENAME); ?>的详细信息" alt="<?php echo $img_url; ?>" />
<img data-toggle="lightbox" src="<?php echo $img_url; ?>" data-image="<?php echo $img_url; ?>" id="img1" class="img-rounded" height="234px" data-caption="<?php echo pathinfo($img_url, PATHINFO_FILENAME); ?>的详细信息" alt="<?php echo $img_url; ?>" />
</div>
<div class="col-md-6">
<h4>图片名称: <?php echo pathinfo($getIMG, PATHINFO_FILENAME); ?></h4>
<h4>图片大小: <?php echo getDistUsed($imgSize); ?></h4>
<h4>图片类型: image/<?php echo pathinfo($getIMG, PATHINFO_EXTENSION); ?></h4>
<div class="col-md-6 table-responsive table-condensed">
<table class="table table-hover table-striped table-bordered">
<tbody>
<tr>
<td>图片名称</td>
<td> <?php echo pathinfo($getIMG, PATHINFO_FILENAME); ?></td>
</tr>
<tr>
<td>图片大小</td>
<td><?php echo getDistUsed($imgSize); ?></td>
</tr>
<tr>
<td>图片类型</td>
<td>image/<?php echo pathinfo($getIMG, PATHINFO_EXTENSION); ?></td>
</tr>
<tr>
<td>图片宽高</td>
<td><span id="wh"></span>px</td>
</tr>
<tr>
<td>上传时间</td>
<td><?php echo date("Y-m-d H:i:s", $upTime); ?></td>
</tr>
<tr>
<td>文件操作</td>
<td>
<a class="btn btn-mini btn-primary" href="<?php echo $img_url; ?>" target="_blank"><i class="icon icon-picture"> 查看</i></a>
<a class="btn btn-mini btn-primary" href="/application/down.php?dw=<?php echo $getIMG; ?>" target="_blank"><i class="icon icon-cloud-download"> 下载</i></a>
<?php if (is_who_login('admin')) : ?>
<a class="btn btn-mini btn-warning" href="/application/del.php?recycle_url=<?php echo $getIMG; ?>" target="_blank"><i class="icon icon-undo"> 回收</i></a>
<a class="btn btn-mini btn-danger" href="/application/del.php?url=<?php echo $del_url; ?>" target="_blank"><i class="icon icon-trash"> 删除</i></a>
<?php endif; ?>
</td>
</tr>
</tbody>
</table>
<h4 class="with-padding hl-gray"><i class="icon icon-info-sign"> 此图片来自网友上传, 不代表<a href="/admin/terms.php" target="_blank">本站立场</a>, 若有侵权, 请联系管理员删除!</i></h4>
<!--
<h4>图片名称: < ?php echo pathinfo($getIMG, PATHINFO_FILENAME); ?></h4>
<h4>图片大小: < ?php echo getDistUsed($imgSize); ?></h4>
<h4>图片类型: image/< ?php echo pathinfo($getIMG, PATHINFO_EXTENSION); ?></h4>
<h4>图片宽高: <span id="wh"></span>px</h4>
<h4>上传时间: <?php echo date("Y-m-d H:i:s", $upTime); ?></h4>
<h4>上传时间: < ?php echo date("Y-m-d H:i:s", $upTime); ?></h4>
<h4>文件操作:
<a class="btn btn-mini btn-primary" href="<?php echo $img_url; ?>" target="_blank"><i class="icon icon-picture"> 查看</i></a>
<?php if (is_who_login('admin')) : ?>
<a class="btn btn-mini btn-primary" href="/application/del.php?recycle_url=<?php echo $getIMG; ?>" target="_blank"><i class="icon icon-undo"> 回收</i></a>
<a class="btn btn-mini btn-primary" href="/application/del.php?url=<?php echo $del_url; ?>" target="_blank"><i class="icon icon-trash"> 删除</i></a>
<?php endif; ?>
<a class="btn btn-mini btn-primary" href="< ?php echo $img_url; ?>" target="_blank"><i class="icon icon-picture"> 查看</i></a>
< ?php if (is_who_login('admin')) : ?>
<a class="btn btn-mini btn-primary" href="/application/del.php?recycle_url=< ?php echo $getIMG; ?>" target="_blank"><i class="icon icon-undo"> 回收</i></a>
<a class="btn btn-mini btn-primary" href="/application/del.php?url=< ?php echo $del_url; ?>" target="_blank"><i class="icon icon-trash"> 删除</i></a>
< ?php endif; ?>
</h4>
<h4 class="with-padding hl-gray"><i class="icon icon-info-sign"> 此图片来自网友上传, 不代表<a href="/admin/terms.php" target="_blank">本站立场</a>, 若有侵权, 请联系管理员删除!</i></h4>
-->
<!-- 读取Exif信息
<h4>使用设备: <span id="makeAndModel"></span></h4>
<div class="col-md-12">

View File

@ -67,6 +67,7 @@ if ($config['ad_top']) echo $config['ad_top_info'];
<a href="<?php echo $linkUrl; ?>" 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 $linkUrl; ?>" data-toggle="tooltip" title="复制" style="margin-left:10px;"><i class="icon icon-copy"></i></a>
<a href="/application/info.php?img=<?php echo $relative_path; ?>" data-toggle="tooltip" title="信息" target="_blank" style="margin-left:10px;"><i class="icon icon-info-sign"></i></a>
<a href="/application/down.php?dw=<?php echo $relative_path; ?>" data-toggle="tooltip" title="下载" target="_blank" style="margin-left:10px;"><i class="icon icon-cloud-download"></i></a>
<?php if (is_who_login('admin')) : ?>
<a href="/application/del.php?recycle_url=<?php echo $relative_path; ?>" 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 $relative_path; ?>" target="_blank" data-toggle="tooltip" title="删除" style="margin-left:10px;"><i class="icon icon-trash"></i></a>
@ -182,12 +183,6 @@ if ($config['ad_top']) echo $config['ad_top_info'];
<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提示
$('[data-toggle="tooltip"]').tooltip({
placement: 'top',
tipClass: 'tooltip-primary'
});
// viewjs
new Viewer(document.getElementById('viewjs'), {
url: 'data-original',

View File

@ -23,7 +23,6 @@ if (isset($_POST['logDate'])) {
}
try {
if (is_file($logFile)) {
require_once $logFile;
} else {

View File

@ -11,9 +11,10 @@ $config=Array
'notice'=>'<p>简单图床是一款开源图床, 支持多文件上传无数据库;</p>
<p>如果你喜欢这种图床风格就<a href="https://github.com/icret/EasyImages2.0" target="_black">下载</a> (๑•̀ㅂ•́)و✧</p>',
'domain'=>'http://127.0.0.1',
'imgurl'=>'http://127.0.0.1,http://192.168.2.100',
'imgurl'=>'http://127.0.0.1,http://192.168.1.7',
'user'=>'admin',
'password'=>'e6e061838856bf47e1de730719fb2609',
'captcha'=>0,
'mustLogin'=>0,
'apiStatus'=>0,
'path'=>'/i/',
@ -60,6 +61,7 @@ $config=Array
'upload_logs'=>1,
'cache_freq'=>2,
'upload_first_show'=>1,
'dark-mode'=>1,
'show_user_hash_del'=>1,
'show_exif_info'=>1,
'chart_on'=>1,
@ -93,7 +95,7 @@ $config=Array
'token_path_status'=>0,
'admin_path'=>'u',
'version'=>'2.6.2',
'update'=>'2022-05-22 14:39:20',
'update'=>'2022-05-25 18:11:42',
'footer'=>'<a href="/admin/terms.php" target="_blank">请勿上传违反中国政策的图片</a>
<script>
var _hmt = _hmt || [];

View File

@ -227,4 +227,12 @@ var _hmt = _hmt || [];
hm.src = "https://hm.baidu.com/hm.js?c790ac2bdc2f385757ecd0183206108d";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
})();
// 导航状态
$('.nav-pills').find('a').each(function() {
if (this.href == document.location.href) {
$(this).parent().addClass('active'); // this.className = 'active';
}
});