pull/141/head
icret 2023-03-09 02:42:50 +08:00
parent ba4905122f
commit 74bc2f401d
57 changed files with 4735 additions and 4739 deletions

View File

@ -3,7 +3,7 @@
* 简单图床设置页面
* 2022-1-24 05:57:35
*/
require_once __DIR__ . '/../application/header.php';
require_once __DIR__ . '/../app/header.php';
require_once APP_ROOT . '/config/api_key.php';
require_once APP_ROOT . '/config/config.guest.php';
@ -15,7 +15,7 @@ if (!is_who_login('admin')) {
icon: "exclamation-sign" // 定义消息图标
}).show();</script>';
header("refresh:2;url=" . $config['domain'] . "/admin/index.php");
require_once APP_ROOT . '/application/footer.php';
require_once APP_ROOT . '/app/footer.php';
exit;
}
@ -499,7 +499,7 @@ auto_delete(); //定时删除
</form>
</div>
<div class="tab-pane fade " id="Content4">
<form action="../application/compressing.php" method="post" target="_blank">
<form action="../app/compressing.php" method="post" target="_blank">
<h5 class="header-dividing">压缩文件夹</h5>
<div class="col-md-12">
<div class="form-group col-md-4">
@ -568,7 +568,7 @@ auto_delete(); //定时删除
<div class="col-md-12">
<div class="col-md-4">
<h5 class="header-dividing">上传日志 <small>需要开启上传日志</small></h5>
<form class="form-inline" action="../application/viewlog.php" method="post" target="_blank">
<form class="form-inline" action="../app/viewlog.php" method="post" target="_blank">
<div class="form-group">
<label for="logDate" class="text-primary">月份: </label>
<input type="text" class="form-control logDate" id="logDate" name="logDate" value="<?php echo date('Y-m'); ?>" required="required" readonly>
@ -579,7 +579,7 @@ auto_delete(); //定时删除
</div>
<div class="col-md-2">
<h5 class="header-dividing">登录日志 <small>仅显示当月</small></h5>
<button type="button" class="btn btn-primary" data-toggle="modal" data-title="登录日志 - 仅显示当月" data-icon="book" data-moveable="true" data-width="60%" data-type="ajax" data-url="../application/viewlog.php?login_log&sign=<?php echo md5($config['password'] . date('ymdh')); ?>">查看</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-title="登录日志 - 仅显示当月" data-icon="book" data-moveable="true" data-width="60%" data-type="ajax" data-url="../app/viewlog.php?login_log&sign=<?php echo md5($config['password'] . date('ymdh')); ?>">查看</button>
</div>
<div class="col-md-3">
<h5 class="header-dividing" data-toggle="tooltip" title="仅限存储分类路径为 Y/m/d/ 格式<br/>且每天需要访问一次后台才执行<br/>先重命名要删除文件夹作为备份<br/>超过定时日期的2倍后再彻底删除重命名的文件夹<br/>超过定时日期前和开启分离的文件夹不删除">定时删除 <small>数值为<code>0</code>时关闭</small></h5>
@ -890,7 +890,7 @@ auto_delete(); //定时删除
$file_size = getDistUsed(filesize($file_cache_path)); // 大小
$filen_name = $cache_file[$i]; // 名称
$url = $config['domain'] . $file_path; // 网络连接
$unlink_img = $config['domain'] . '/application/del.php?url=' . $file_path; // 删除连接
$unlink_img = $config['domain'] . '/app/del.php?url=' . $file_path; // 删除连接
?>
<tr>
<td><?php echo $i; ?></td>
@ -899,7 +899,7 @@ auto_delete(); //定时删除
<td><?php echo $file_size; ?></td>
<td>
<a class="btn btn-mini" href="<?php echo $url; ?>" target="_blank">查看</a>
<a class="btn btn-mini" href="/application/info.php?img=<?php echo $file_path; ?>" target="_blank">信息</a>
<a class="btn btn-mini" href="/app/info.php?img=<?php echo $file_path; ?>" target="_blank">信息</a>
<a class="btn btn-mini btn-success" href="?suspic_reimg=<?php echo $filen_name; ?>">恢复</a>
<a class="btn btn-mini btn-danger" href="<?php echo $unlink_img; ?>" target="_blank">删除</a>
</td>
@ -984,7 +984,7 @@ auto_delete(); //定时删除
Ip2region (2.0 - xdb) 是一个离线 IP 数据管理框架和定位库,支持亿级别的数据段,10微秒级别的查询性能,提供了许多主流编程语言的 xdb 数据管理引擎的实现。
每个 ip 数据段的 region 信息都固定了格式:国家|区域|省份|城市|ISP, 只有中国的数据绝大部分精确到了城市, 其他国家部分数据只能定位到国家, 后前的选项全部是0。
</p>
<h6>* 下载 <a href="https://raw.githubusercontent.com/lionsoul2014/ip2region/master/data/ip2region.xdb" target="_blank">ip2region.xdb</a> IP数据库上传到 <small style="color: black;">/application/ip2region/</small> 文件夹, 如遇到下载失败可访问开源地址下载: [ <a href="https://github.com/lionsoul2014/ip2region" target="_blank"><small style="color: black;">Github</small></a> | <a href="https://gitee.com/lionsoul/ip2region" target="_blank"><small style="color: black;">Gitee</small></a> ] 更新方法与此相同。</h6>
<h6>* 下载 <a href="https://raw.githubusercontent.com/lionsoul2014/ip2region/master/data/ip2region.xdb" target="_blank">ip2region.xdb</a> IP数据库上传到 <small style="color: black;">/app/ip2region/</small> 文件夹, 如遇到下载失败可访问开源地址下载: [ <a href="https://github.com/lionsoul2014/ip2region" target="_blank"><small style="color: black;">Github</small></a> | <a href="https://gitee.com/lionsoul/ip2region" target="_blank"><small style="color: black;">Gitee</small></a> ] 更新方法与此相同。</h6>
</div>
</div>
<?php if (getVersion() !== get_current_version()) : ?>
@ -1135,7 +1135,7 @@ auto_delete(); //定时删除
<li>直接输入账号和密码即可完成修改</li>
<li>更改后会立即生效并重新登录,请务必牢记账号和密码! </li>
<li>如果忘记账号可以打开-><code>/config/config.php</code>文件->找到<code data-toggle="tooltip" title="'user'=><strong>admin</strong>'">user</code>对应的键值->填入</li>
<li>如果忘记密码请将密码->转换成SHA256-><a href="<?php echo $config['domain'] . '/application/reset_password.php'; ?>" target="_blank" class="text-purple">转换网址</a>->打开<code>/config/config.php</code>文件->找到<code data-toggle="tooltip" title="'password'=>'<strong>e6e0612609</strong>'">password</code>对应的键值->填入</li>
<li>如果忘记密码请将密码->转换成SHA256-><a href="<?php echo $config['domain'] . '/app/reset_password.php'; ?>" target="_blank" class="text-purple">转换网址</a>->打开<code>/config/config.php</code>文件->找到<code data-toggle="tooltip" title="'password'=>'<strong>e6e0612609</strong>'">password</code>对应的键值->填入</li>
</ul>
</div>
</div>
@ -1232,7 +1232,7 @@ auto_delete(); //定时删除
$file_size = getDistUsed(filesize($file_cache_path)); // 大小
$filen_name = $cache_file[$i]; // 名称
$url = $config['domain'] . $file_path; // 网络连接
$unlink_img = $config['domain'] . '/application/del.php?url=' . $file_path; // 删除连接
$unlink_img = $config['domain'] . '/app/del.php?url=' . $file_path; // 删除连接
?>
<tr>
<td><?php echo $i; ?></td>
@ -1241,7 +1241,7 @@ auto_delete(); //定时删除
<td><?php echo $file_size; ?></td>
<td>
<a class="btn btn-mini" href="<?php echo $url; ?>" target="_blank">查看</a>
<a class="btn btn-mini" href="/application/info.php?img=<?php echo $file_path; ?>" target="_blank">信息</a>
<a class="btn btn-mini" href="/app/info.php?img=<?php echo $file_path; ?>" target="_blank">信息</a>
<a class="btn btn-mini btn-success" href="?recycle_reimg=<?php echo $filen_name; ?>">恢复</a>
<a class="btn btn-mini btn-danger" href="<?php echo $unlink_img; ?>" target="_blank">删除</a>
</td>
@ -1365,7 +1365,7 @@ auto_delete(); //定时删除
<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>
<a class="btn btn-mini btn-primary" href="/i/manag.php?path=<?php echo date('Y/m/d'); ?> " target="_blank" data-toggle="tooltip" title="使用web-indexr管理文件"><i class="icon icon-folder-close"> 文件管理</i></a>
<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;">
<form class="form-inline" method="get" action="../app/del.php" id="form" name="delForm" target="_blank" style="margin-bottom: 5px;">
<p id="delimgurl"></p>
<div class="form-group">
<label for="del" class="text-warning">删除单张图片文件: </label>
@ -1641,11 +1641,11 @@ auto_delete(); //定时删除
guestMyDataGrid.sortBy('add_time', 'desc');
/** 引入设置页面检测文件 */
<?php if ($config['checkEnv']) require_once APP_ROOT . '/application/check_admin.inc.php'; ?>
<?php if ($config['checkEnv']) require_once APP_ROOT . '/app/check_admin.inc.php'; ?>
// 更改网页标题
document.title = "图床设置 - <?php echo $config['title']; ?>"
</script>
<?php
/** 引入底部 */
require_once APP_ROOT . '/application/footer.php';
require_once APP_ROOT . '/app/footer.php';

View File

@ -2,8 +2,8 @@
/*
* 统计中心
*/
require_once '../application/header.php';
require_once APP_ROOT . '/application/chart.php';
require_once '../app/header.php';
require_once APP_ROOT . '/app/chart.php';
// 检测登录和是否开启统计
if (!$config['chart_on'] && !is_who_login('admin')) exit(header('Location: ' . $config['domain'] . '?hart#closed'));
@ -320,4 +320,4 @@ if (is_array($char_data)) {
document.title = "图床统计信息 - <?php echo $config['title']; ?>"
</script>
<?php require_once APP_ROOT . '/application/footer.php';
<?php require_once APP_ROOT . '/app/footer.php';

View File

@ -2,8 +2,8 @@
/*
* 登录页面
*/
require_once __DIR__ . '/../application/function.php';
require_once APP_ROOT . '/application/header.php';
require_once __DIR__ . '/../app/function.php';
require_once APP_ROOT . '/app/header.php';
require_once APP_ROOT . '/config/config.guest.php';
// 退出
@ -36,7 +36,7 @@ if (isset($_GET['login'])) {
';
}
}
exit(require_once APP_ROOT . '/application/footer.php');
exit(require_once APP_ROOT . '/app/footer.php');
}
// 提交登录
@ -52,7 +52,7 @@ if (isset($_POST['password']) and isset($_POST['user'])) {
// 延时2s跳转
window.setTimeout("window.location=\'./index.php\'",2000);
</script>';
exit(require_once APP_ROOT . '/application/footer.php');
exit(require_once APP_ROOT . '/app/footer.php');
} else {
session_start();
if (strtolower($_REQUEST['code']) !== $_SESSION['code']) {
@ -63,7 +63,7 @@ if (isset($_POST['password']) and isset($_POST['user'])) {
// 延时2s跳转
window.setTimeout("window.location=\'./index.php\'",2000);
</script>';
exit(require_once APP_ROOT . '/application/footer.php');
exit(require_once APP_ROOT . '/app/footer.php');
}
}
}
@ -108,7 +108,7 @@ if (isset($_POST['password']) and isset($_POST['user'])) {
</div>
<div class="modal-body">
<p class="text-primary">忘记账号可以打开<code>/config/config.php</code>文件找到<code data-toggle="tooltip" title="'user'=><strong>admin</strong>'">user</code>对应的键值->填入</p>
<p class="text-success">忘记密码请将密码转换成SHA256(<a href="<?php echo $config['domain'] . '/application/reset_password.php'; ?>" target="_blank" class="text-purple">转换网址</a>)->打开<code>/config/config.php</code>文件->找到<code data-toggle="tooltip" title="'password'=>'<strong>e6e0612609</strong>'">password</code>对应的键值->填入</p>
<p class="text-success">忘记密码请将密码转换成SHA256(<a href="<?php echo $config['domain'] . '/app/reset_password.php'; ?>" target="_blank" class="text-purple">转换网址</a>)->打开<code>/config/config.php</code>文件->找到<code data-toggle="tooltip" title="'password'=>'<strong>e6e0612609</strong>'">password</code>对应的键值->填入</p>
<h4 class="text-danger">更改后会立即生效并重新登录,请务必牢记账号和密码! </h4>
</div>
<div class="modal-footer">
@ -134,7 +134,7 @@ if (isset($_POST['password']) and isset($_POST['user'])) {
<input class="form-control" type="text" name="code" value="" placeholder="请输入验证码" autocomplete="off" required="required" />
<div class="form-group">
<div class="col">
<label><img src="../application/captcha.php" width="185px" onClick="this.src='../application/captcha.php?nocache='+Math.random()" title="点击换一张" /></label>
<label><img src="../app/captcha.php" width="185px" onClick="this.src='../app/captcha.php?nocache='+Math.random()" title="点击换一张" /></label>
</div>
</div>
<?php endif; ?>
@ -176,4 +176,4 @@ if (isset($_POST['password']) and isset($_POST['user'])) {
container.classList.toggle('active');
}
</script>
<?php require_once APP_ROOT . '/application/footer.php';
<?php require_once APP_ROOT . '/app/footer.php';

View File

@ -2,23 +2,23 @@
//Default Configuration
$CONFIG = '{"lang":"zh-CN","error_reporting":false,"show_hidden":true,"hide_Cols":false,"calc_folder":true,"theme":"light"}';
require_once __DIR__ . '/../application/function.php';
require_once __DIR__ . '/../app/function.php';
// 是否管理员登录
if(!is_who_login('admin')){
require_once APP_ROOT.'/application/header.php';
require_once APP_ROOT.'/app/header.php';
echo '<div class="alert alert-danger">还没有登陆哦~~</div>';
header("refresh:3;url=" . $config['domain'] . "/admin/index.php");
require_once APP_ROOT.'/application/footer.php';
require_once APP_ROOT.'/app/footer.php';
exit;
}
// 开启tinyfilemanager图片管理
if (!$config['file_manage']) {
require_once APP_ROOT.'/application/header.php';
require_once APP_ROOT.'/app/header.php';
echo '<div class="alert alert-danger">图片管理已关闭~~</div>';
header("refresh:3;url=" . $_SERVER["HTTP_REFERER"] . '?manager-closed');
require_once APP_ROOT.'/application/footer.php';
require_once APP_ROOT.'/app/footer.php';
exit;
}
@ -2108,7 +2108,7 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
if (in_array(strtolower(pathinfo($f, PATHINFO_EXTENSION)), array('gif', 'jpg', 'jpeg', 'png', 'bmp', 'ico', 'svg', 'webp', 'avif'))): ?>
<?php $imagePreview = fm_enc(FM_ROOT_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f); ?>
<!-- 分组图片浏览 -->
<a href="<?php echo $imagePreview;?>" data-toggle="lightbox" data-group="manager-group"><img src="/application/thumb.php?img=<?php echo parse_url($imagePreview)['path'];?>" class="img-rounded" width="100px" height="100px" alt="<?php echo fm_enc($f);?>"></a>
<a href="<?php echo $imagePreview;?>" data-toggle="lightbox" data-group="manager-group"><img src="/app/thumb.php?img=<?php echo parse_url($imagePreview)['path'];?>" class="img-rounded" width="100px" height="100px" alt="<?php echo fm_enc($f);?>"></a>
<?php else: ?>
<a href="<?php echo $filelink ?>" title="<?php echo $f ?>">
<?php endif; ?>

View File

@ -2,7 +2,7 @@
/*
* 使用条款页面
*/
require_once __DIR__ . '/../application/header.php';
require_once __DIR__ . '/../app/header.php';
/** 顶部广告 */
if ($config['ad_top']) echo $config['ad_top_info'];
@ -25,4 +25,4 @@ if ($config['ad_bot']) echo $config['ad_bot_info'];
</script>
<?php
require_once __DIR__ . '/../application/footer.php';
require_once __DIR__ . '/../app/footer.php';

View File

@ -2,8 +2,8 @@
/*
* 统计中心
*/
require_once '../application/header.php';
require_once APP_ROOT . '/application/chart.php';
require_once '../app/header.php';
require_once APP_ROOT . '/app/chart.php';
// 检测是否开启统计
if (!$config['chart_on']) exit(header('Location: ' . $config['domain'] . '?chart#closed'));
@ -11,7 +11,7 @@ if (!$config['chart_on']) exit(header('Location: ' . $config['domain'] . '?chart
// 检测登录
if (!is_who_login('admin')) {
checkLogin();
exit(require_once APP_ROOT . '/application/footer.php');
exit(require_once APP_ROOT . '/app/footer.php');
}
// 删除统计文件
if (isset($_POST['del_total'])) {
@ -238,4 +238,4 @@ if (is_array($char_data)) {
document.title = "图床统计信息 - <?php echo $config['title']; ?>";
</script>
<?php require_once APP_ROOT . '/application/footer.php';
<?php require_once APP_ROOT . '/app/footer.php';

View File

@ -2,8 +2,8 @@
namespace Verot\Upload;
require_once __DIR__ . '/../application/function.php';
require_once APP_ROOT . '/application/class.upload.php';
require_once __DIR__ . '/../app/function.php';
require_once APP_ROOT . '/app/class.upload.php';
require_once APP_ROOT . '/config/api_key.php';
// 允许跨域 https://stackoverflow.com/questions/8719276/cross-origin-request-headerscors-with-php-headers
@ -141,18 +141,18 @@ if ($handle->uploaded) {
// 源图保护 key值是由crc32加密的hide_key
if ($config['hide'] == 1) {
$imageUrl = $config['domain'] . '/application/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['hide_key']));
$imageUrl = $config['domain'] . '/app/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['hide_key']));
}
// 删除文件链接
if ($config['show_user_hash_del']) {
$delUrl = $config['domain'] . '/application/del.php?hash=' . urlHash($pathIMG, 0);
$delUrl = $config['domain'] . '/app/del.php?hash=' . urlHash($pathIMG, 0);
} else {
$delUrl = "Admin closed user delete";
}
// 当设置访问生成缩略图时自动生成 2022-12-30 修正 2023-01-30
$handleThumb = $config['domain'] . '/application/thumb.php?img=' . $pathIMG;
$handleThumb = $config['domain'] . '/app/thumb.php?img=' . $pathIMG;
if ($config['thumbnail'] == 2) {
// 自定义缩略图长宽
$handle->image_resize = true;

View File

@ -5,8 +5,8 @@
* 2022年2月22日11:41:38
* @author Icret
*/
require_once '../application/function.php';
require_once '../application/chart.php';
require_once '../app/function.php';
require_once '../app/chart.php';
// 检查是否开启查询
if ($config['public'] == 0) die('开放数据接口已关闭!');

0
application/TimThumb.php → app/TimThumb.php Executable file → Normal file
View File

0
application/WaterMask.php → app/WaterMask.php Executable file → Normal file
View File

View File

@ -5,12 +5,12 @@
* 作者mengkun (mkblog.cn)
* 日期2016/12/23
* 修改Icret
* 修改日期2023-01-30
* 修改日期2023-03-09
*/
include_once __DIR__ . '/function.php';
include_once APP_ROOT . '/config/config.php';
include_once '../config/config.php';
$path = '..' . $config['path'] . $config['delDir']; // 设置图片缓存文件夹
$path = APP_ROOT . $config['path'] . $config['delDir']; // 设置图片缓存文件夹
$filename = date("Ymd") . '.jpg'; // 用年月日来命名新的文件名
if (file_exists($path . $filename)) // 如果文件不存在,则说明今天还没有进行缓存
{

0
application/captcha.php → app/captcha.php Executable file → Normal file
View File

0
application/chart.php → app/chart.php Executable file → Normal file
View File

2
application/check.php → app/check.php Executable file → Normal file
View File

@ -41,7 +41,7 @@ file_put_contents(APP_ROOT . '/config/EasyIamge.lock', '安装环境检测锁定
}
}
// 文件权限检测
$quanxian = substr(base_convert(fileperms(APP_ROOT . "/application/upload.php"), 10, 8), 3);
$quanxian = substr(base_convert(fileperms(APP_ROOT . "/app/upload.php"), 10, 8), 3);
if (IS_WIN) {
echo '
<p class="text-green">upload.php 文件可执行</p>

View File

View File

0
application/class.thumb.php → app/class.thumb.php Executable file → Normal file
View File

0
application/class.upload.php → app/class.upload.php Executable file → Normal file
View File

View File

View File

@ -4,8 +4,8 @@
* 压缩文件函数调用位置
*/
require_once __DIR__ . '/../function.php';
require_once APP_ROOT . '/application/compress/Imagick/class.Imgcompress.php';
require_once APP_ROOT . '/application/compress/TinyImg/TinyImg.php';
require_once APP_ROOT . '/app/compress/Imagick/class.Imgcompress.php';
require_once APP_ROOT . '/app/compress/TinyImg/TinyImg.php';
require_once APP_ROOT . '/config/api_key.php';
/**

6
application/compressing.php → app/compressing.php Executable file → Normal file
View File

@ -4,13 +4,13 @@
* 压缩状态页面
*/
require_once 'header.php';
require_once APP_ROOT . '/application/compress/function.compress.php';
require_once APP_ROOT . '/app/compress/function.compress.php';
// 检测登录
if (!is_who_login('admin')) {
checkLogin();
echo '<div class="alert alert-info">未登陆~~</div>';
exit(require_once APP_ROOT . '/application/footer.php');
exit(require_once APP_ROOT . '/app/footer.php');
}
// 文件夹压缩
if (isset($_POST['folder'])) {
@ -66,4 +66,4 @@ $sizeAfter = getDirectorySize($folder);
/** 底部广告 */
if ($config['ad_bot']) echo $config['ad_bot_info'];
/** 引入底部 */
include APP_ROOT . '/application/footer.php';
include APP_ROOT . '/app/footer.php';

20
application/del.php → app/del.php Executable file → Normal file
View File

@ -3,7 +3,7 @@
/**
* 删除文件页面
*/
require_once './header.php';
require_once __DIR__ . '/header.php';
if (empty($_REQUEST)) {
echo '
@ -23,7 +23,7 @@ if (isset($_GET['url'])) {
// 解密删除
if (isset($_GET['hash'])) {
$delHash = strip_tags($_GET['hash']);
$delHash = $_GET['hash'];
$delHash = urlHash($delHash, 1);
if ($config['image_recycl']) {
@ -51,8 +51,6 @@ if (isset($_GET['hash'])) {
// 否则直接删除
getDel($delHash, 'url');
}
// FTP
// any_upload($delHash, null, 'delete');
}
// 检查登录后再处理url删除请求
@ -60,24 +58,20 @@ if (is_who_login('admin')) {
// 广场页面删除
if (isset($_GET['url'])) {
getDel(strip_tags($_GET['url']), 'url');
// FTP
// any_upload(parse_url($_GET['url'])['path'], null, 'delete');
getDel($img, 'url');
}
// 从管理页面删除
if (isset($_GET['url_admin_inc'])) {
$del_url = strip_tags($_GET['url_admin_inc']);
$del_url = $_GET['url_admin_inc'];
if ($config['hide_path']) {
$del_url = $config['domain'] . $config['path'] . parse_url($del_url)['path'];
}
getDel($del_url, 'url');
// FTP
// any_upload(parse_url($del_url)['path'], null, 'delete');
}
// 回收
if (isset($_GET['recycle_url'])) {
$recycle_url = strip_tags($_GET['recycle_url']);
$recycle_url = $_GET['recycle_url'];
$recycle_url = parse_url($recycle_url)['path'];
if (file_exists(APP_ROOT . $recycle_url)) {
checkImg($recycle_url, 3);
@ -101,6 +95,7 @@ if (is_who_login('admin')) {
}
}
} else {
if (isset($_GET['url'])) {
echo '
<script>
new $.zui.Messager("请使用管理员账号登录再删除!", {
@ -111,6 +106,7 @@ if (is_who_login('admin')) {
window.setTimeout("window.location=\'/../admin/index.php \'",3000);
</script>
';
}
}
?>
<div class="col-md-4 col-md-offset-4">
@ -139,4 +135,4 @@ if (is_who_login('admin')) {
oTi.innerHTML = '<img src="' + oBtn.value + '" width="200" class="img-rounded" /><br />';
}
</script>
<?php require_once APP_ROOT . '/application/footer.php';
<?php require_once __DIR__ . '/footer.php';

0
application/down.php → app/down.php Executable file → Normal file
View File

0
application/footer.php → app/footer.php Executable file → Normal file
View File

7
application/function.php → app/function.php Executable file → Normal file
View File

@ -760,7 +760,7 @@ function getVersion($name = 'tag_name')
global $config;
if ($config['checkEnv']) {
require_once APP_ROOT . '/application/class.version.php';
require_once APP_ROOT . '/app/class.version.php';
$url = "https://api.github.com/repositories/188228357/releases/latest"; // 获取版本地址
$getVersion = new getVersion($url);
try {
@ -1036,7 +1036,7 @@ function get_online_thumbnail($imgUrl)
global $config;
if ($config['thumbnail']) {
$imgUrl = str_replace($config['domain'], '', $imgUrl);
return $config['domain'] . '/application/thumb.php?img=' . $imgUrl;
return $config['domain'] . '/app/thumb.php?img=' . $imgUrl;
}
return $imgUrl;
@ -1583,7 +1583,7 @@ function ip2region(String $IP)
$db = __DIR__ . '/ip2region/ip2region.xdb';
if (!is_file($db)) {
return '<a href="https://raw.githubusercontent.com/lionsoul2014/ip2region/master/data/ip2region.xdb" target="_blank"><span class="label label-primary" data-toggle="tooltip" title="点击下载 IP数据库 并上传到<br/><code>/application/ip2region/</code>">IP数据库不存在</span></a>';
return '<a href="https://raw.githubusercontent.com/lionsoul2014/ip2region/master/data/ip2region.xdb" target="_blank"><span class="label label-primary" data-toggle="tooltip" title="点击下载 IP数据库 并上传到<br/><code>/app/ip2region/</code>">IP数据库不存在</span></a>';
}
try {
@ -1724,7 +1724,6 @@ function write_login_log($user, $pass, $msg)
* @param String $remoteFile 远程地址
* @param String $localFile 本地地址
* @param String $way 使用方式 upload 上传 | delete 删除
*
*/
function any_upload($remoteFile = null, $localFile = null, $way = 'upload')

4
application/header.php → app/header.php Executable file → Normal file
View File

@ -36,10 +36,10 @@
<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>
<li><a href="<?php echo $config['domain']; ?>/app/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>
<li><a href="<?php $config['domain']; ?>/app/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>

0
application/hide.php → app/hide.php Executable file → Normal file
View File

View File

@ -93,4 +93,4 @@ include_once __DIR__ . "/header.php";
</script>
<?php
/** 引入底部 */
require_once APP_ROOT . '/application/footer.php';
require_once __DIR__ . '/footer.php';

10
application/info.php → app/info.php Executable file → Normal file
View File

@ -43,7 +43,7 @@ $logsName = basename($img_url);
if (is_file(APP_ROOT . '/admin/logs/upload/' . $logs . '.php')) {
include APP_ROOT . '/admin/logs/upload/' . $logs . '.php';
} else {
$logs = array($logsName => array('source' => '日志文件不存在, 请在图床安全中开启上传日志!', 'date' => '日志文件不存在, 请在图床安全中开启上传日志!', 'ip' => '0.0.0.0', 'port' => '0', 'user_agent' => '日志文件不存在, 请在图床安全中开启上传日志!', 'path' => '日志文件不存在, 请在图床安全中开启上传日志!', 'size' => '日志文件不存在, 请在图床安全中开启上传日志!', 'md5' => '日志文件不存在, 请在图床安全中开启上传日志!', 'checkImg' => '日志文件不存在, 请在图床安全中开启上传日志!', 'from' => '日志文件不存在, 请在图床安全中开启上传日志!'));
$logs = array($logsName => array('source' => '请在图床安全中开启上传日志!', 'date' => '请在图床安全中开启上传日志!', 'ip' => '0.0.0.0', 'port' => '0', 'user_agent' => '请在图床安全中开启上传日志!', 'path' => '请在图床安全中开启上传日志!', 'size' => '请在图床安全中开启上传日志!', 'md5' => '请在图床安全中开启上传日志!', 'checkImg' => '请在图床安全中开启上传日志!', 'from' => '请在图床安全中开启上传日志!'));
}
if (empty($logs[$logsName])) {
$logs = array($logsName => array('source' => '日志不存在', 'date' => '日志不存在', 'ip' => '0.0.0.0', 'port' => '0', 'user_agent' => '日志不存在', 'path' => '日志不存在', 'size' => '日志不存在', 'md5' => '日志不存在', 'checkImg' => '日志不存在', 'from' => '日志不存在'));
@ -129,13 +129,13 @@ if ($config['ad_top']) echo $config['ad_top_info'];
<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="" onclick="window.location.replace;"><i class="icon icon-spin icon-refresh"></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>
<a class="btn btn-mini btn-primary" href="/app/down.php?dw=<?php echo $getIMG; ?>" target="_blank"><i class="icon icon-cloud-download"> 下载</i></a>
<?php if (!empty($config['report']) && !is_who_login('admin')) : ?>
<a class="btn btn-mini btn-warning" href="<?php echo $config['report'] . '?Website1=' . $img_url; ?>" target="_blank"><i class="icon icon-question-sign"> 举报</i></a>
<?php endif; ?>
<?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-warning" href="/application/del.php?url=<?php echo $del_url; ?>" target="_blank"><i class="icon icon-trash"> 删除</i></a>
<a class="btn btn-mini btn-warning" href="/app/del.php?recycle_url=<?php echo $getIMG; ?>" target="_blank"><i class="icon icon-undo"> 回收</i></a>
<a class="btn btn-mini btn-warning" href="/app/del.php?url=<?php echo $del_url; ?>" target="_blank"><i class="icon icon-trash"> 删除</i></a>
<?php endif; ?>
</td>
</tr>
@ -322,4 +322,4 @@ if ($config['ad_top']) echo $config['ad_top_info'];
</script>
<?php
/** 引入底部 */
require_once APP_ROOT . '/application/footer.php';
require_once APP_ROOT . '/app/footer.php';

10
application/list.php → app/list.php Executable file → Normal file
View File

@ -67,15 +67,15 @@ 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>
<?php if ($config['show_exif_info'] || is_who_login('admin')) : ?>
<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="/app/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>
<?php endif; ?>
<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>
<a href="/app/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 (!empty($config['report'])) : ?>
<a href="<?php echo $config['report'] . '?Website1=' . $linkUrl; ?>" target="_blank"><i class="icon icon-question-sign" data-toggle="tooltip" title="举报文件" style="margin-left:10px;"></i></a>
<?php endif; ?>
<?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>
<a href="/app/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="/app/del.php?url=<?php echo $relative_path; ?>" 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 $relative_path; ?>"> 选择</label>
<?php endif; ?>
</div>
@ -377,4 +377,4 @@ if ($config['ad_top']) echo $config['ad_top_info'];
</script>
<?php
/** 引入底部 */
require_once APP_ROOT . '/application/footer.php';
require_once __DIR__ . '/footer.php';

0
application/post_del.php → app/post_del.php Executable file → Normal file
View File

View File

@ -10,7 +10,7 @@ if (isset($_POST['md5'])) {
<div class="row">
<div class="col-md-12">
<p class="text-primary">忘记账号可以打开<code>/config/config.php</code>文件找到<code data-toggle="tooltip" title="'user'=><strong>admin</strong>'">user</code>对应的键值->填入</p>
<p class="text-success">忘记密码请将密码转换成SHA256(<a href="<?php echo $config['domain'] . '/application/reset_password.php'; ?>" target="_blank" class="text-purple">转换网址</a>)->打开<code>/config/config.php</code>文件->找到<code data-toggle="tooltip" title="'password'=>'<strong>e6e0612609</strong>'">password</code>对应的键值->填入</p>
<p class="text-success">忘记密码请将密码转换成SHA256(<a href="<?php echo $config['domain'] . '/app/reset_password.php'; ?>" target="_blank" class="text-purple">转换网址</a>)->打开<code>/config/config.php</code>文件->找到<code data-toggle="tooltip" title="'password'=>'<strong>e6e0612609</strong>'">password</code>对应的键值->填入</p>
<h4 class="text-danger">更改后会立即生效并重新登录,请务必牢记账号和密码! </h4>
</div>
<div class="col-md-12">

0
application/thumb.php → app/thumb.php Executable file → Normal file
View File

0
application/total_files.php → app/total_files.php Executable file → Normal file
View File

8
application/upload.php → app/upload.php Executable file → Normal file
View File

@ -163,20 +163,20 @@ if ($handle->uploaded) {
}
// 源图保护 key值是由crc32加密的hide_key
// $hide_original = $config['hide'] == 1 ? $config['domain'] . '/application/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['hide_key'])) : $imageUrl;
// $hide_original = $config['hide'] == 1 ? $config['domain'] . '/app/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['hide_key'])) : $imageUrl;
if ($config['hide'] == 1) {
$imageUrl = $config['domain'] . '/application/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['hide_key']));
$imageUrl = $config['domain'] . '/app/hide.php?key=' . urlHash($pathIMG, 0, crc32($config['hide_key']));
}
// 删除文件链接
if ($config['show_user_hash_del']) {
$delUrl = $config['domain'] . '/application/del.php?hash=' . urlHash($pathIMG, 0);
$delUrl = $config['domain'] . '/app/del.php?hash=' . urlHash($pathIMG, 0);
} else {
$delUrl = "Admin closed user delete";
}
// 当设置访问生成缩略图时自动生成 2022-12-30 修正 2023-01-30
$handleThumb = $config['domain'] . '/application/thumb.php?img=' . $pathIMG;
$handleThumb = $config['domain'] . '/app/thumb.php?img=' . $pathIMG;
if ($config['thumbnail'] == 2) {
// 自定义缩略图长宽
$handle->image_resize = true;

View File

@ -24,7 +24,7 @@ if (isset($_GET['login_log'])) {
}
// 上传日志
require_once APP_ROOT . '/application/header.php';
require_once APP_ROOT . '/app/header.php';
if (isset($_POST['logDate'])) {
$logFile = APP_ROOT . '/admin/logs/upload/' . $_POST['logDate'] . '.php';
@ -43,7 +43,7 @@ try {
}
} catch (Exception $e) {
echo $e->getMessage();
require_once APP_ROOT . '/application/footer.php';
require_once APP_ROOT . '/app/footer.php';
exit;
}
?>
@ -155,7 +155,7 @@ try {
size: '<?php echo $v['size']; ?>',
checkImg: '<?php echo strstr('OFF', $v['checkImg']) ? '' : ''; ?>',
from: '<?php echo is_string($v['from']) ? "网页" : 'API: ' . $v['from']; ?>',
manage: "<div class='btn-group'><a href='<?php echo $config['domain'] . $v['path']; ?>' target='_blank' class='btn btn-mini btn-success'>查看</a> <a href='/application/info.php?img=<?php echo $v['path']; ?>' target='_blank' class='btn btn-mini'>信息</a> <a href='/application/del.php?recycle_url=<?php echo $v['path']; ?>' target='_blank' class='btn btn-mini btn-info'>回收</a> <a href='/application/del.php?url=<?php echo $v['path']; ?>' target='_blank' class='btn btn-mini btn-danger'>删除</a></div>",
manage: "<div class='btn-group'><a href='<?php echo $config['domain'] . $v['path']; ?>' target='_blank' class='btn btn-mini btn-success'>查看</a> <a href='/app/info.php?img=<?php echo $v['path']; ?>' target='_blank' class='btn btn-mini'>信息</a> <a href='/app/del.php?recycle_url=<?php echo $v['path']; ?>' target='_blank' class='btn btn-mini btn-info'>回收</a> <a href='/app/del.php?url=<?php echo $v['path']; ?>' target='_blank' class='btn btn-mini btn-danger'>删除</a></div>",
},
<?php endforeach; ?>
]
@ -191,4 +191,4 @@ try {
document.title = "<?php echo pathinfo($logFile, PATHINFO_FILENAME); ?>月上传日志 - <?php echo $config['title']; ?>"
</script>
<?php
require_once APP_ROOT . '/application/footer.php';
require_once APP_ROOT . '/app/footer.php';

View File

@ -99,7 +99,7 @@ $config=Array
9=>'month'
),
'language'=>0,
'login_bg'=>'../application/bing.php',
'login_bg'=>'../app/bing.php',
'report'=>'',
'image_recycl'=>1,
'tinyfilemanager'=>1,

View File

@ -1,6 +1,7 @@
* 2023-03-06 v2.7.8
- 增加WEB端上传签名
- 修复一处漏洞
- 修改目录命名 `applicaton->app`
- 修复两处漏洞
* 2023-03-05 v2.7.7
- 增加登录日志

View File

@ -7,15 +7,15 @@
session_start();
/**开始 - 自定义修改 */
require_once __DIR__ . '/../application/function.php';
require_once __DIR__ . '/../app/function.php';
require_once APP_ROOT . '/config/config.php';
// 开启tinyfilemanager文件管理
if (!$config['file_manage']) {
require_once APP_ROOT . '/application/header.php';
require_once APP_ROOT . '/app/header.php';
echo '<h4 class="alert alert-danger">文件管理已关闭~~</h4>';
header("refresh:3;url=" . $config['domain'] . '?manag-closed');
require_once APP_ROOT . '/application/footer.php';
require_once APP_ROOT . '/app/footer.php';
exit;
}
@ -215,7 +215,7 @@ class RExplorer
if (RexHelper::file_catetory($srpath) == 'image') {
echo '
<td>
<img data-toggle="lightbox" src="/../application/thumb.php?img=', $srpath, '" data-image="' . $srpath . '" data-caption="查看原图" class="img-thumbnail" alt="查看原图" width="80">
<img data-toggle="lightbox" src="/../app/thumb.php?img=', $srpath, '" data-image="' . $srpath . '" data-caption="查看原图" class="img-thumbnail" alt="查看原图" width="80">
</td>';
} else {
echo '
@ -328,7 +328,7 @@ class RExplorer
return;
case 'image':
echo '
<img data-toggle="lightbox" src="/../application/thumb.php?img=', $path, '" data-image="' . $path . '" data-caption="小图看大图" class="img-thumbnail" alt="" width="200">
<img data-toggle="lightbox" src="/../app/thumb.php?img=', $path, '" data-image="' . $path . '" data-caption="小图看大图" class="img-thumbnail" alt="" width="200">
<div class="card-body">
<a href="', $path, '" target="_blank">查看原图</a>
</div>
@ -1080,8 +1080,8 @@ class ZipHelper
}
/** 环境检测 */
if ($config['checkEnv']) require_once APP_ROOT . '/application/check.php';
if ($config['checkEnv']) require_once APP_ROOT . '/app/check.php';
/** 底部广告 */
if ($config['ad_bot']) echo $config['ad_bot_info'];
/** 引入底部 */
require_once APP_ROOT . '/application/footer.php';
require_once APP_ROOT . '/app/footer.php';

View File

@ -1,5 +1,5 @@
<?php
require_once 'application/header.php';
require_once __DIR__ . '/app/header.php';
/** 顶部广告 */
if ($config['ad_top']) echo $config['ad_top_info'];
/** 检查登陆 */
@ -16,7 +16,7 @@ mustLogin();
</div>
</div>
<?php endif; ?>
<div id='upShowID' class="uploader col-md-12 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="/app/upload.php">
<div class="uploader-message text-center">
<div class="content"></div>
<button type="button" class="close">x</button>
@ -117,7 +117,7 @@ mustLogin();
// 自动上传
autoUpload: false,
// 文件上传提交地址
url: './application/upload.php',
url: './app/upload.php',
// 最大支持的上传文件
max_file_size: <?php echo $config['maxSize']; ?>,
// 分片上传 0为不分片 分片容易使图片上传失败
@ -187,8 +187,8 @@ mustLogin();
</script>
<?php
/** 环境检测 */
if ($config['checkEnv']) require_once APP_ROOT . '/application/check.php';
if ($config['checkEnv']) require_once APP_ROOT . '/app/check.php';
/** 底部广告 */
if ($config['ad_bot']) echo $config['ad_bot_info'];
/** 引入底部 */
require_once APP_ROOT . '/application/footer.php';
require_once __DIR__ . '/app/footer.php';

View File

@ -1,5 +1,5 @@
<?php
require_once __DIR__ . '/../application/function.php';
require_once __DIR__ . '/../app/function.php';
if (file_exists(APP_ROOT . '/config/install.lock')) {
exit(header("Location:/../index.php"));

View File

@ -1,5 +1,5 @@
<?php
require_once __DIR__ . '/../application/function.php';
require_once __DIR__ . '/../app/function.php';
clearstatcache();
// 存在程序锁则跳转主页
if (file_exists(APP_ROOT . '/config/install.lock')) {
@ -10,7 +10,7 @@ $fileinfo = extension_loaded('fileinfo') ? true : false;
$gd = extension_loaded('gd') ? true : false;
$openssl = extension_loaded('openssl') ? true : false;
$file = substr(base_convert(fileperms(APP_ROOT . "/application/upload.php"), 10, 8), 3);
$file = substr(base_convert(fileperms(APP_ROOT . "/app/upload.php"), 10, 8), 3);
if (IS_WIN) {
$file_php = true;
$i_wjj = true;

View File

@ -1,5 +1,5 @@
<?php
require_once __DIR__ . '/../application/function.php';
require_once __DIR__ . '/../app/function.php';
// 存在程序锁则跳转主页
if (file_exists(APP_ROOT . '/config/install.lock')) {
exit(header("Location:/../index.php"));