mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
v2.0.36-20230823
This commit is contained in:
@@ -208,7 +208,7 @@ if ($page == 'menu') {
|
||||
if($global_config['guestbook'] == 1 && check_purview('guestbook',1)){
|
||||
array_push($extend,['title'=>'留言管理','href'=>'expand/guestbook-admin','icon'=>'fa fa-commenting-o']);
|
||||
}
|
||||
if($global_config['article'] == 1 && check_purview('article',1)){
|
||||
if($global_config['article'] > 0 && check_purview('article',1)){
|
||||
array_push($extend,['title'=>'文章管理','href'=>'expand/article-list','icon'=>'fa fa-file-text-o']);
|
||||
}
|
||||
if(!empty($extend)){
|
||||
|
||||
@@ -1820,6 +1820,22 @@ function read_data(){
|
||||
|
||||
$data = ['dates'=>$dates,'day_data'=>$day_data];
|
||||
msgA(['code'=>1,'data'=>$data]);
|
||||
}elseif($_GET['type'] == 'tongji_ip_list'){
|
||||
$days = isset($_GET['date']) && !empty($_GET['date']) ? $_GET['date'] : 7;
|
||||
$dates = [];
|
||||
for ($i = 0; $i < $days; $i++) {
|
||||
$date = date('Ymd', strtotime("-$i days"));
|
||||
$dates[] = $date;
|
||||
}
|
||||
|
||||
$dates = array_reverse($dates);
|
||||
$day_data = [];
|
||||
foreach ($dates as $date) {
|
||||
$list = get_db('user_count', 'e', ['uid' => UID, 'k' => $date, 't' => 'ip_list']);
|
||||
$list = unserialize($list);
|
||||
$day_data[$date] = empty($list) ? [] : $list ;
|
||||
}
|
||||
msgA(['code'=>1,'data'=>$day_data]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
$type = htmlspecialchars(trim($_GET['type']),ENT_QUOTES);
|
||||
|
||||
if (function_exists($type) ) {
|
||||
if($GLOBALS['global_config']['article'] != 1 || !check_purview('article',1)){
|
||||
if($GLOBALS['global_config']['article'] < 1 || !check_purview('article',1)){
|
||||
msg(-1,'无权限');
|
||||
}
|
||||
$type();
|
||||
|
||||
@@ -574,7 +574,7 @@ function write_sys_settings(){
|
||||
'apply'=>['int'=>true,'min'=>0,'max'=>1,'msg'=>'收录管理参数错误'],
|
||||
'guestbook'=>['int'=>true,'min'=>0,'max'=>1,'msg'=>'留言管理参数错误'],
|
||||
'link_extend'=>['int'=>true,'min'=>0,'max'=>1,'msg'=>'链接扩展参数错误'],
|
||||
'article'=>['int'=>true,'min'=>0,'max'=>1,'msg'=>'文章管理参数错误']
|
||||
'article'=>['int'=>true,'min'=>0,'max'=>2,'msg'=>'文章管理参数错误']
|
||||
];
|
||||
$o_config = [];
|
||||
foreach ($datas as $key => $data){
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php if(!defined('DIR')){Not_Found();}AccessControl();
|
||||
if($global_config['article'] == 0 | !check_purview('article',1)){
|
||||
if($global_config['article'] < 1 | !check_purview('article',1)){
|
||||
Not_Found();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ if(empty($c) || in_array($c,['index','click','article'])){
|
||||
function is_apply(){
|
||||
global $global_config;
|
||||
$apply_user = unserialize( get_db("user_config", "v", ["k" => "apply","uid"=>UID]));
|
||||
return ($global_config['apply'] == 1 && $apply_user['apply'] == 1);
|
||||
return ($global_config['apply'] == 1 && $apply_user['apply'] > 0);
|
||||
}
|
||||
//是否启用留言
|
||||
function is_guestbook(){
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.0.35-20230816
|
||||
v2.0.36-20230823
|
||||
Reference in New Issue
Block a user