parent
9a3780a0ee
commit
55a7c2e51a
|
@ -6,7 +6,7 @@ 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'));
|
||||
if (!$config['chart_on'] || !is_who_login('admin')) exit(header('Location: ' . $config['domain'] . '?hart#closed'));
|
||||
|
||||
// 删除统计文件
|
||||
if (isset($_POST['del_total'])) {
|
||||
|
|
|
@ -6,7 +6,7 @@ require_once '../app/header.php';
|
|||
require_once APP_ROOT . '/app/chart.php';
|
||||
|
||||
// 检测是否开启统计
|
||||
if (!$config['chart_on']) exit(header('Location: ' . $config['domain'] . '?chart#closed'));
|
||||
if (!$config['chart_on'] || !is_who_login('admin')) exit(header('Location: ' . $config['domain'] . '?hart#closed'));
|
||||
|
||||
// 检测登录
|
||||
if (!is_who_login('admin')) {
|
||||
|
|
|
@ -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>');
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<?php
|
||||
|
||||
/** 禁止直接访问 */
|
||||
defined('APP_ROOT') ?: exit;
|
||||
|
||||
/*
|
||||
// 检查当前PHP版本是否大于7.0
|
||||
if (PHP_VERSION < 7) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
/** 禁止直接访问 */
|
||||
defined('APP_ROOT') ?: exit;
|
||||
|
||||
/** 弹窗公告 */
|
||||
if ($config['notice_status'] > 0) : ?>
|
||||
<div class="modal fade" id="notice">
|
||||
|
|
|
@ -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');
|
||||
|
||||
/*---------------基础配置结束-------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
|
||||
/** 禁止直接访问 */
|
||||
defined('APP_ROOT') ?: exit;
|
||||
|
||||
/**
|
||||
* 统计文件
|
||||
*
|
||||
|
|
|
@ -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,
|
||||
"systime" => time(),
|
||||
"message" => "上传签名错误,请刷新重试",
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
* 2023-04-12 v2.8.1
|
||||
- 修改上传签名生成方式
|
||||
- 修复一处绕过代码
|
||||
- 修复部分会曝露网站路径的代码
|
||||
- 增加检测cookie|Local storage
|
||||
|
||||
* 2023-04-05 v2.8.0
|
||||
- 修复定时删除最小值不能为0
|
||||
- 修复上传完毕后多次点击复制失效
|
||||
|
|
|
@ -130,7 +130,7 @@ mustLogin();
|
|||
flash_swf_url: '<?php static_cdn(); ?>/public/static/zui/lib/uploader/Moxie.xap',
|
||||
// sign
|
||||
multipart_params: {
|
||||
'sign': new Date().format("YYYYMMddhh"),
|
||||
'sign': Date.now() / 1000,
|
||||
},
|
||||
// 预览图尺寸
|
||||
previewImageSize: {
|
||||
|
|
|
@ -229,7 +229,7 @@ $('#btnLinks, #btnBbscode, #btnMarkDown, #btnHtml, #btnThumb, #btnDel').on('clic
|
|||
|
||||
var formData = new FormData();
|
||||
formData.append('file', file);
|
||||
formData.append('sign', new Date().format("YYYYMMddhh"));
|
||||
formData.append('sign', Date.now());
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState == 1) {
|
||||
|
@ -299,6 +299,30 @@ $('#btnLinks, #btnBbscode, #btnMarkDown, #btnHtml, #btnThumb, #btnDel').on('clic
|
|||
});
|
||||
})();
|
||||
|
||||
// 检测浏览器是否支持cookie
|
||||
if (navigator.cookieEnabled === false) {
|
||||
new $.zui.Messager('浏览器不支持cookie, 无法保存登录信息', {
|
||||
type: 'black',
|
||||
icon: 'bell',
|
||||
time: 4500,
|
||||
placement: 'top'
|
||||
}).show();
|
||||
|
||||
console.log('浏览器不支持cookie');
|
||||
}
|
||||
|
||||
// 检测浏览器是否支持本地存储
|
||||
if ($.zui.store.enable === false) {
|
||||
new $.zui.Messager('浏览器不支持本地存储, 无法保存上传历史记录', {
|
||||
icon: 'bell',
|
||||
time: 4000,
|
||||
type: 'primary',
|
||||
placement: 'top'
|
||||
}).show();
|
||||
|
||||
console.log('浏览器不支持本地存储');
|
||||
}
|
||||
|
||||
/**
|
||||
* javascript parseUrl函数解析url获取网址url参数
|
||||
* https://www.cnblogs.com/lazb/p/10144471.html
|
||||
|
|
Loading…
Reference in New Issue