v2.7.2 dev
* 2023-02-04 v2.7.2 dev - 增加 [web-indexr](https://github.com/rehiy/web-indexr) 文件管理 - - web-indexr处于实验中,作为Tinyfilemanager的替代 - 修复开启登录上传后,上传者账号上传失败 [#87](https://github.com/icret/EasyImages2.0/issues/87#issue-1569794639) - 优化排版和移动端显示pull/141/head
parent
fae2b6effe
commit
e632634154
|
@ -230,10 +230,11 @@ $HTTP["url"] =~ "^/(i|public)/" {
|
|||
|
||||
<details><summary>点击查看2.0版更新日志</summary>
|
||||
|
||||
* 2023-02-03 v2.7.2 dev
|
||||
* 2023-02-04 v2.7.2 dev
|
||||
- 增加 [web-indexr](https://github.com/rehiy/web-indexr) 文件管理
|
||||
- - web-indexr处于实验中,作为Tinyfilemanager的替代
|
||||
- 优化排版
|
||||
- 修复开启登录上传后,上传者账号上传失败 [#87](https://github.com/icret/EasyImages2.0/issues/87#issue-1569794639)
|
||||
- 优化排版和移动端显示
|
||||
|
||||
* 2023-02-01 v2.7.1
|
||||
- 更新版本号
|
||||
|
|
|
@ -533,11 +533,11 @@ if (isset($_POST['del_version_file'])) {
|
|||
<div class="form-group col-md-12">
|
||||
<div class="form-group col-md-6">
|
||||
<label data-toggle="tooltip" title="请选择合适的缩略图生成方式">生成方式</label>
|
||||
<div class="input-group" data-toggle="tooltip" title="原图 | 直接输出上传链接,会导致流量增加<br/>缓存方式 (推荐) | 利用TimThumb生成 优点: 带缓存周期 | 缺点: cdn无法缓存<br/>上传生成 | 优点: 缩略图直链,缓存不失效 | 低配vps负载较大,影响前端上传速度">
|
||||
<div class="input-group" data-toggle="tooltip" title="原图 | 直接输出上传链接,会导致流量增加<br/>TimThumb (推荐) | 优点: 带缓存周期 | 缺点: cdn无法缓存<br/>上传生成 | 优点: 缩略图直链,缓存不失效 | 低配vps负载较大,影响前端上传速度">
|
||||
<span class="input-group-addon input-sm">生成模式</span>
|
||||
<select class="form-control input-sm" name="thumbnail">
|
||||
<option value="0" <?php if ($config['thumbnail'] == 0) echo 'selected'; ?>>原图</option>
|
||||
<option value="1" <?php if ($config['thumbnail'] == 1) echo 'selected'; ?>>缓存方式 | 推荐</option>
|
||||
<option value="1" <?php if ($config['thumbnail'] == 1) echo 'selected'; ?>>TimThumb | 推荐</option>
|
||||
<option value="2" <?php if ($config['thumbnail'] == 2) echo 'selected'; ?>>上传生成 | 直链</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
@ -32,7 +32,7 @@ if ($config['check_ip']) {
|
|||
}
|
||||
|
||||
// 根据IP限制游客每日上传数量
|
||||
if ($config['ip_upload_counts'] > 0 && !is_who_login(null)) {
|
||||
if ($config['ip_upload_counts'] > 0 && !is_who_login('status')) {
|
||||
$ipList = APP_ROOT . '/admin/logs/ipcounts/' . date('Ymd') . '.php';
|
||||
if (is_file($ipList)) {
|
||||
$ipList = file_get_contents($ipList);
|
||||
|
|
|
@ -65,8 +65,9 @@ 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';
|
||||
// console.log(document.location);
|
||||
if (this.pathname == document.location.pathname) {
|
||||
$(this).parent().addClass('active');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -764,9 +764,8 @@ function getDel($url, $type)
|
|||
*/
|
||||
function is_who_login($user)
|
||||
{
|
||||
if (empty($user)) {
|
||||
if ($user == 'status') {
|
||||
if (checkLogin() == 205 || checkLogin() == 204) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
$status = json_decode(_login(), true);
|
||||
|
@ -1506,7 +1505,7 @@ function rand_imgurl($text = null)
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取当前版本号
|
||||
* 获取当前版本号 | 读取字符串
|
||||
* @param String $file 文件相对路径
|
||||
* @return String 内容信息
|
||||
*/
|
||||
|
@ -1519,7 +1518,7 @@ function get_current_version($file = '/admin/version.php')
|
|||
return file_get_contents($file);
|
||||
}
|
||||
|
||||
return 'No Version File';
|
||||
return 'file does not exist';
|
||||
}
|
||||
|
||||
// 压缩图片与图片鉴黄
|
||||
|
|
|
@ -27,21 +27,33 @@
|
|||
|
||||
<body class="container">
|
||||
<div class="page-header">
|
||||
<ul class="nav nav-pills">
|
||||
<li><a href="<?php echo $config['domain']; ?>"><i class="icon icon-home"></i> 首页</a></li>
|
||||
<?php if ($config['showSwitch'] || is_who_login('admin')) : /** 非管理或未开启不显示广场 */ ?>
|
||||
<li><a href="<?php echo $config['domain']; ?>/application/list.php"><i class="icon icon-th"></i> 广场<span class="label label-badge label-primary"><?php echo get_file_by_glob(APP_ROOT . config_path(), 'number'); ?></span></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if ($config['history'] || is_who_login('admin')) : /** 非管理或未开启不显示上传历史 */ ?>
|
||||
<li><a href="<?php $config['domain']; ?>/application/history.php"><i class="icon icon-history"></i> 历史<span class="label label-badge label-primary"></span></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if (is_who_login('admin')) : /** 非管理不显示设置 */ ?>
|
||||
<li><a href="<?php echo $config['domain']; ?>/admin/admin.inc.php"><i class="icon icon-cogs"></i> 设置</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if ($config['chart_on'] && is_who_login('admin')) : /** 非管理或未开启不显示统计 */ ?>
|
||||
<li><a href="<?php echo $config['domain']; ?>/admin/chart.php"><i class="icon icon-pie-chart"></i> 统计</a></li>
|
||||
<?php endif; ?>
|
||||
|
||||
</ul>
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-EasyImage">
|
||||
<span class="icon icon-bars"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-collapse-EasyImage">
|
||||
<ul class="nav nav-pills">
|
||||
<li><a href="<?php echo $config['domain']; ?>"><i class="icon icon-home"></i> 首页</a></li>
|
||||
<?php /** 非管理或未开启不显示广场 */ if ($config['showSwitch'] || is_who_login('admin')) : ?>
|
||||
<li><a href="<?php echo $config['domain']; ?>/application/list.php"><i class="icon icon-th"></i> 广场<span class="label label-badge label-primary"><?php echo get_file_by_glob(APP_ROOT . config_path(), 'number'); ?></span></a></li>
|
||||
<?php endif; ?>
|
||||
<?php /** 非管理或未开启不显示上传历史 */ if ($config['history'] || is_who_login('admin')) : ?>
|
||||
<li><a href="<?php $config['domain']; ?>/application/history.php"><i class="icon icon-history"></i> 历史<span class="label label-badge label-primary"></span></a></li>
|
||||
<?php endif; ?>
|
||||
<?php /** 非管理不显示设置 */ if (is_who_login('admin')) : ?>
|
||||
<li><a href="<?php echo $config['domain']; ?>/admin/admin.inc.php"><i class="icon icon-cogs"></i> 设置</a></li>
|
||||
<?php endif; ?>
|
||||
<?php /** 非管理或未开启不显示统计 */ if ($config['chart_on'] && is_who_login('admin')) : ?>
|
||||
<li><a href="<?php echo $config['domain']; ?>/admin/chart.php"><i class="icon icon-pie-chart"></i> 统计</a></li>
|
||||
<?php endif; ?>
|
||||
<?php /** 账号登录 */ if (is_who_login('status')) : ?>
|
||||
<!-- 右侧的导航项目 -->
|
||||
<li class="nav navbar-nav navbar-right hidden-xs"><a href="<?php echo $config['domain']; ?>/admin/index.php?login=logout"><i class="icon icon-signout"> 退出登录</i></a></li>
|
||||
<?php else : ?>
|
||||
<li class="nav navbar-nav navbar-right hidden-xs"><a href="<?php echo $config['domain']; ?>/admin/index.php"><i class="icon icon-user"> 登录账号</i></a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 顶部导航栏END -->
|
|
@ -7,7 +7,7 @@ require __DIR__ . '/class.upload.php';
|
|||
|
||||
// 检查登录
|
||||
if ($config['mustLogin']) {
|
||||
if (is_who_login(null)) {
|
||||
if (!is_who_login('status')) {
|
||||
exit(json_encode(array(
|
||||
"result" => "failed",
|
||||
"code" => 401,
|
||||
|
@ -40,7 +40,7 @@ if ($config['check_ip']) {
|
|||
}
|
||||
|
||||
// 根据IP限制游客每日上传数量
|
||||
if ($config['ip_upload_counts'] > 0 && !is_who_login(null)) {
|
||||
if ($config['ip_upload_counts'] > 0 && !is_who_login('status')) {
|
||||
$ipList = APP_ROOT . '/admin/logs/ipcounts/' . date('Ymd') . '.php';
|
||||
if (is_file($ipList)) {
|
||||
$ipList = file_get_contents($ipList);
|
||||
|
|
|
@ -114,7 +114,7 @@ $config=Array
|
|||
'guest_path_status'=>0,
|
||||
'token_path_status'=>0,
|
||||
'admin_path'=>'u',
|
||||
'update'=>'2023-02-03 16:44:22',
|
||||
'update'=>'2023-02-04 02:25:03',
|
||||
'footer'=>'<a href="https://github.com/icret/EasyImages2.0" target="_blank" rel="nofollow" data-toggle="tooltip" title="Since 2018 - Github">© Since 2018</a>
|
||||
<a href="https://png.cm/" target="_blank" data-toggle="tooltip" title="EasyImage 简单图床">EasyImage</a>
|
||||
<a href="/admin/terms.php" target="_blank" data-toggle="tooltip" title="使用协议">DMCA</a>
|
||||
|
|
Loading…
Reference in New Issue