mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
Compare commits
2 Commits
v2.0.40-20
...
v2.0.40-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91950de997 | ||
|
|
34f3c78fe9 |
@@ -42,15 +42,6 @@ define('Debug',$global_config['Debug'] == 1);
|
||||
|
||||
if(!in_array($c,[$global_config["Register"],'ico','icon'])){
|
||||
$u = Get('u');
|
||||
if(empty($u) && $global_config['Sub_domain'] == 1 && is_subscribe('bool')){
|
||||
$cut = explode('.',$_SERVER["HTTP_HOST"]);
|
||||
if(count($cut) == 3){
|
||||
$USER_DB = get_db("global_user", "*", ["User"=>reset($cut)]);
|
||||
if(!empty($USER_DB) && check_purview('Sub_domain',1)){
|
||||
$_COOKIE['Default_User'] = $USER_DB['User'];unset($cut);
|
||||
}
|
||||
}
|
||||
}
|
||||
$u = !empty($u)?$u:(!empty($_COOKIE['Default_User'])?$_COOKIE['Default_User']:(!empty($global_config['Default_User'])?$global_config['Default_User']:'admin'));//优先级:Get>Host>Cookie>默认用户>admin
|
||||
$USER_DB = get_db("global_user", "*", ["User"=>$u]);
|
||||
//没找到账号显示404
|
||||
|
||||
@@ -750,7 +750,7 @@ function write_link(){
|
||||
if(!is_subscribe('bool')){
|
||||
msg(-1,"未检测到有效授权,无法使用该功能!");
|
||||
}
|
||||
msg(1,'请更新系统后再试');
|
||||
msg(-1,'请更新系统后再试');
|
||||
}elseif($_GET['type'] === 'msg_pull'){
|
||||
session_start();
|
||||
$key = $_POST['key'];
|
||||
@@ -844,7 +844,7 @@ function write_link(){
|
||||
if(!is_subscribe('bool')){
|
||||
msg(-1,"未检测到有效授权,无法使用该功能!");
|
||||
}
|
||||
msg(1,'请更新系统后再试');
|
||||
msg(-1,'请更新系统后再试');
|
||||
|
||||
}elseif($_GET['type'] == 'extend_list'){
|
||||
if($GLOBALS['global_config']['link_extend'] != 1 ||!check_purview('link_extend',1)){
|
||||
@@ -1351,7 +1351,7 @@ function write_theme(){
|
||||
is_root();
|
||||
if($global_config['offline']){msg(-1,"离线模式禁止下载主题!");} //离线模式
|
||||
if(!is_subscribe('bool')){msg(-1,"未检测到有效授权,无法使用该功能!");}
|
||||
msg(1,'请更新系统后再试');
|
||||
msg(-1,'请更新系统后再试');
|
||||
|
||||
//删除主题
|
||||
}elseif($_GET['type'] == 'del'){
|
||||
|
||||
@@ -98,6 +98,7 @@ function other_upsys(){
|
||||
} catch (Exception $e) {
|
||||
msg(-1,'释放更新包,请检查写入权限');//解压出问题了
|
||||
}
|
||||
clean_cache();
|
||||
usleep(1000*300);
|
||||
msg(1,'success');
|
||||
}
|
||||
@@ -310,8 +311,8 @@ function write_subscribe(){
|
||||
}
|
||||
|
||||
if(stristr($data['domain'],$data['host'])){
|
||||
//unset($data['public']); // 记得删除
|
||||
write_global_config('s_subscribe',$data,'订阅信息');
|
||||
clean_cache();
|
||||
msg(1,'保存成功');
|
||||
}else{
|
||||
msg(-1,"您的订阅不支持当前域名 >> ".$_SERVER['HTTP_HOST']);
|
||||
|
||||
@@ -782,3 +782,11 @@ function count_ip(){
|
||||
write_user_count($k,'ip_count');//访问ip数+1
|
||||
}
|
||||
}
|
||||
|
||||
//清理缓存
|
||||
function clean_cache(){
|
||||
write_global_config('notice','','官方公告(缓存)');
|
||||
foreach(['home','login','transit','register','guide','article','apply','verify','guestbook'] as $v){
|
||||
write_global_config($v.'_cache','',$v.'_模板缓存');
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
v2.0.40-20230916
|
||||
v2.0.40-20230917
|
||||
@@ -97,7 +97,7 @@ layui.use(['jquery','form'], function () {
|
||||
//查询订阅
|
||||
form.on('submit(get_subscribe)', function(data){
|
||||
layer.load(2, {shade: [0.1,'#fff']});
|
||||
$.get('http://service.twonav.cn/api.php?fn=get_subscribe',data.field,function(data,status){
|
||||
$.get('//service.twonav.cn/api.php?fn=get_subscribe',data.field,function(data,status){
|
||||
layer.closeAll('loading');
|
||||
if(data.code == 200) {
|
||||
$("#order_id").val(data.data.order_id);
|
||||
@@ -122,7 +122,7 @@ layui.use(['jquery','form'], function () {
|
||||
return false;
|
||||
}
|
||||
layer.load(2, {shade: [0.1,'#fff']});
|
||||
$.get('http://service.twonav.cn/api.php?fn=check_subscribe',data.field,function(data,status){
|
||||
$.get('//service.twonav.cn/api.php?fn=check_subscribe',data.field,function(data,status){
|
||||
layer.closeAll('loading');
|
||||
if(data.code == 200) {
|
||||
$("#end_time").val(timestampToTime(data.data.end_time));
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h4 class="layui-timeline-title">v2.0.40-20230916</h4>
|
||||
<h4 class="layui-timeline-title">v2.0.40-20230917</h4>
|
||||
<ul>
|
||||
<li>[优化] 优化资源节点,提高系统更新速度,主题下载速度,预览图加载速度! </li>
|
||||
<li>[优化] 系统响应速度,修复已知问题</li>
|
||||
|
||||
Reference in New Issue
Block a user