This commit is contained in:
icret
2023-04-12 15:30:49 +08:00
parent 9a3780a0ee
commit 55a7c2e51a
11 changed files with 51 additions and 8 deletions

View File

@@ -1,4 +1,8 @@
<?php
/** 禁止直接访问 */
defined('APP_ROOT') ?: exit;
// 跳转安装
if (!is_file(APP_ROOT . '/config/install.lock') and is_file(APP_ROOT . '/install/install.php')) {
exit('<script type="text/javascript">window.location.href="' . get_whole_url('/') . '/install/index.php"</script>');

View File

@@ -1,4 +1,8 @@
<?php
/** 禁止直接访问 */
defined('APP_ROOT') ?: exit;
/*
// 检查当前PHP版本是否大于7.0
if (PHP_VERSION < 7) {

View File

@@ -2,6 +2,7 @@
/** 禁止直接访问 */
defined('APP_ROOT') ?: exit;
/** 弹窗公告 */
if ($config['notice_status'] > 0) : ?>
<div class="modal fade" id="notice">

View File

@@ -32,7 +32,7 @@ define('APP_ROOT', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')))
// 判断当前的系统类型是否为windows
define('IS_WIN', strstr(PHP_OS, 'WIN') ? 1 : 0);
// 定义当前版本
define('APP_VERSION', '2.8.0');
define('APP_VERSION', '2.8.1');
/*---------------基础配置结束-------------------*/

View File

@@ -1,5 +1,8 @@
<?php
/** 禁止直接访问 */
defined('APP_ROOT') ?: exit;
/**
* 统计文件
*

View File

@@ -27,11 +27,12 @@ if (empty($_FILES['file'])) {
));
}
// sign
if (empty($_POST['sign']) || $_POST['sign'] !== date('YmdH')) {
// sign : 前端生成的时间戳 time() - $_POST['sign'] = 从选择文件到上传完毕的耗费时间
if (empty($_POST['sign']) || time() - $_POST['sign'] > 12306) {
exit(json_encode(array(
"result" => "failed",
"code" => 403,
"code" => 403,
"systime" => time(),
"message" => "上传签名错误,请刷新重试",
)));
}