mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
Compare commits
7 Commits
v2.0.25-20
...
v2.0.30-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3646cfba93 | ||
|
|
6a418f6c7f | ||
|
|
33386c75dc | ||
|
|
0bc6f7bea5 | ||
|
|
82e8321432 | ||
|
|
4bc10f7c25 | ||
|
|
65edb94998 |
@@ -34,8 +34,8 @@ if($db_config['type'] == 'sqlite'){
|
||||
$global_config = unserialize( get_db("global_config", "v", ["k" => "o_config"]) ); //全局配置
|
||||
$c = Get('c');
|
||||
$libs = $global_config['Libs'];
|
||||
$layui['js'] = $libs.'/Layui/v2.8.3/layui.js';
|
||||
$layui['css'] = $libs.'/Layui/v2.8.3/css/layui.css';
|
||||
$layui['js'] = $libs.'/Layui/v2.8.10/layui.js';
|
||||
$layui['css'] = $libs.'/Layui/v2.8.10/css/layui.css';
|
||||
define('libs',$global_config['Libs']);
|
||||
define('SysVer',Get_Version());
|
||||
define('Debug',$global_config['Debug'] == 1);
|
||||
|
||||
1
static/Layui/v2.8.10/css/layui.css
Normal file
1
static/Layui/v2.8.10/css/layui.css
Normal file
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 322 KiB |
1
static/Layui/v2.8.10/layui.js
Normal file
1
static/Layui/v2.8.10/layui.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -218,7 +218,7 @@ function echo_Atool(){
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ATool 工具箱</title>
|
||||
<link rel="stylesheet" href="../static/Layui/v2.8.3/css/layui.css">
|
||||
<link rel="stylesheet" href="../static/Layui/v2.8.10/css/layui.css">
|
||||
<style>
|
||||
html, body {min-width: 1200px;background-color: #fff;position: relative;}
|
||||
.page-wrapper {width: 1200px;margin: 0 auto;padding: 0 15px;}
|
||||
@@ -269,7 +269,7 @@ function echo_Atool(){
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="set_user_name">改账号</a>
|
||||
</div>
|
||||
</script>
|
||||
<script src="../static/Layui/v2.8.3/layui.js"></script>
|
||||
<script src="../static/Layui/v2.8.10/layui.js"></script>
|
||||
<script src="../static/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="../static/jquery/jquery.md5.js"></script>
|
||||
<script src="../templates/admin/js/public.js?v=<?php echo time();?>"></script>
|
||||
@@ -398,7 +398,7 @@ function echo_verify(){ ?>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ATool 工具箱</title>
|
||||
<link rel="stylesheet" href="../static/Layui/v2.8.3/css/layui.css">
|
||||
<link rel="stylesheet" href="../static/Layui/v2.8.10/css/layui.css">
|
||||
<link rel="stylesheet" href="../static/Other/login.css">
|
||||
</head>
|
||||
<body>
|
||||
@@ -423,7 +423,7 @@ function echo_verify(){ ?>
|
||||
</div>
|
||||
</div>
|
||||
<script src = "../static/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src = "../static/Layui/v2.8.3/layui.js"></script>
|
||||
<script src = "../static/Layui/v2.8.10/layui.js"></script>
|
||||
<script src = '../static/jquery/jquery.md5.js'></script>
|
||||
<script>
|
||||
layui.use(['form','jquery'], function () {
|
||||
|
||||
@@ -260,3 +260,16 @@ CREATE TABLE IF NOT EXISTS `user_share` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- 图标缓存
|
||||
CREATE TABLE IF NOT EXISTS `global_icon` (
|
||||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`url_md5` varchar(32) NOT NULL COMMENT 'url_md5',
|
||||
`url` text NOT NULL COMMENT 'url',
|
||||
`ico_url` text NOT NULL COMMENT 'url_ico',
|
||||
`add_time` int(10) UNSIGNED NOT NULL COMMENT '创建时间',
|
||||
`update_time` int(10) UNSIGNED NOT NULL COMMENT '更新时间',
|
||||
`file_name` text NOT NULL COMMENT '文件名',
|
||||
`file_mime` text NOT NULL COMMENT 'MIME类型',
|
||||
`extend` text NOT NULL COMMENT '预留扩展',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
|
||||
@@ -38,7 +38,6 @@ CREATE TABLE IF NOT EXISTS "updatadb_logs" (
|
||||
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20230417.php', '1681719049', 'TRUE', '');
|
||||
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20230420.php', '1681977368', 'TRUE', '');
|
||||
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20230522.php', '1684762253', 'TRUE', '');
|
||||
INSERT INTO "updatadb_logs" ("file_name", "update_time", "status", "extra") VALUES ('20230605.php', '1685960298', 'TRUE', '');
|
||||
|
||||
-- 创建用户表
|
||||
CREATE TABLE IF NOT EXISTS "global_user" (
|
||||
@@ -225,3 +224,18 @@ CREATE TABLE IF NOT EXISTS "user_share" (
|
||||
"data" TEXT,
|
||||
"pv" integer(1) DEFAULT "0"
|
||||
);
|
||||
|
||||
-- 图标缓存
|
||||
CREATE TABLE IF NOT EXISTS "global_icon" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"url_md5" text(32) NOT NULL DEFAULT "",
|
||||
"url" text NOT NULL DEFAULT "",
|
||||
"ico_url" text NOT NULL DEFAULT "",
|
||||
"add_time" integer(10) NOT NULL,
|
||||
"update_time" integer(10) NOT NULL,
|
||||
"file_name" text NOT NULL DEFAULT "",
|
||||
"file_mime" text NOT NULL DEFAULT "",
|
||||
"extend" text NOT NULL DEFAULT "",
|
||||
CONSTRAINT "id" UNIQUE ("id" ASC)
|
||||
);
|
||||
|
||||
|
||||
@@ -129,14 +129,22 @@ if( $page == 'theme_home' || $page == 'theme_login' || $page == 'theme_transit'
|
||||
|
||||
//没有缓存 或 禁止缓存 或 缓存过时
|
||||
if(empty($template) || $_GET['cache'] === 'no' || time() - $data["time"] > 1800 ){
|
||||
$urls = [ "https://update.lm21.top/TwoNav/{$fn}_template.json"];
|
||||
$urls = [
|
||||
"lm21" => "https://update.lm21.top/TwoNav/{$fn}_template.json",
|
||||
"gitee" => "https://gitee.com/tznb/twonav_updata/raw/master/{$fn}_template.json"
|
||||
];
|
||||
$Source = $global_config['Update_Source'] ?? '';
|
||||
if (!empty($Source) && isset($urls[$Source])) {
|
||||
$urls = [$Source => $urls[$Source]];
|
||||
}
|
||||
}else{
|
||||
$cache = true;
|
||||
}
|
||||
|
||||
//读取超时参数
|
||||
$overtime = !isset($global_config['Update_Overtime']) ? 3 : ($global_config['Update_Overtime'] < 3 || $global_config['Update_Overtime'] > 60 ? 3 : $global_config['Update_Overtime']);
|
||||
//远程获取
|
||||
foreach($urls as $url){
|
||||
$Res = ccurl($url,3);
|
||||
foreach($urls as $key => $url){
|
||||
$Res = ccurl($url,$overtime);
|
||||
$data = json_decode($Res["content"], true);
|
||||
if($data["code"] == 200 ){ //如果获取成功
|
||||
$data["time"] = time(); //记录当前时间
|
||||
@@ -213,7 +221,7 @@ if ($page == 'menu') {
|
||||
[
|
||||
['title'=>'系统设置','href'=>'root/sys_setting','icon'=>'fa fa-gears'],
|
||||
['title'=>'授权管理','href'=>'root/vip','icon'=>'fa fa-diamond'],
|
||||
['title'=>'默认设置','href'=>'root/default_setting','icon'=>'fa fa-heart-o'],
|
||||
//['title'=>'默认设置','href'=>'root/default_setting','icon'=>'fa fa-heart-o'],
|
||||
['title'=>'用户管理','href'=>'root/user_control','icon'=>'fa fa-user'],
|
||||
['title'=>'用户分组','href'=>'root/users_control','icon'=>'fa fa-users'],
|
||||
['title'=>'注册管理','href'=>'root/reg_control','icon'=>'fa fa-user-plus'],
|
||||
@@ -261,6 +269,7 @@ function load_static($type){
|
||||
}elseif($type == 'js.layui'){
|
||||
echo
|
||||
'<script src="'.$GLOBALS['layui']['js'].'" charset="utf-8"></script>
|
||||
<script src="./templates/admin/js/lay-config.js?v='.$GLOBALS['Ver'].'" charset="utf-8"></script>
|
||||
<script>layui.config({version:"'.$GLOBALS['Ver'].'"})</script>
|
||||
';
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ function write_category(){
|
||||
'fid'=>intval($_POST['fid']??'0'),
|
||||
'pid'=>intval($_POST['pwd_id']??'0'),
|
||||
'status'=>1,
|
||||
'property'=>$_POST['property']??'0',
|
||||
'property'=>intval($_POST['property']??'0'),
|
||||
'name'=>htmlspecialchars($_POST['name'],ENT_QUOTES),
|
||||
'add_time'=>time(),
|
||||
'up_time'=>time(),
|
||||
@@ -230,7 +230,7 @@ function write_category(){
|
||||
$data = [
|
||||
'fid'=>$_POST['fid'],
|
||||
'pid'=>intval($_POST['pwd_id']??'0'),
|
||||
'property'=>$_POST['property']??'0',
|
||||
'property'=>intval($_POST['property']??'0'),
|
||||
'name'=>$_POST['name'],
|
||||
'up_time'=>time(),
|
||||
'description'=>$_POST['description'],
|
||||
@@ -306,7 +306,7 @@ function read_link_list(){
|
||||
$list = unserialize($list);
|
||||
msgA(['code'=>1,'msg'=>'获取成功','count'=>count($list),'data'=>$list]);
|
||||
}
|
||||
|
||||
$field = ['lid','fid','pid(pwd_id)','status','property','title','url','url_standby','weight','description','icon','click','add_time','up_time'];
|
||||
$query = $_POST['query'];
|
||||
$fid = intval(@$_POST['fid']); //获取分类ID
|
||||
$page = empty(intval($_REQUEST['page'])) ? 1 : intval($_REQUEST['page']);
|
||||
@@ -334,14 +334,20 @@ function read_link_list(){
|
||||
|
||||
//统计条数
|
||||
$count = count_db('user_links',$where);
|
||||
//权重排序(数字小的排前面)
|
||||
|
||||
$where['ORDER']['weight'] = 'ASC';
|
||||
$where['ORDER']['lid'] = 'ASC';
|
||||
//前端指定排序方式,过滤字段名和方式
|
||||
if(!empty($_POST['order']) && !empty($_POST['field']) && in_array($_POST['field'],$field) && in_array($_POST['order'],['ASC','DESC'])){
|
||||
$where['ORDER'][$_POST['field']] = $_POST['order'];
|
||||
}else{
|
||||
//默认排序方式 权重排序(数字小的排前面)
|
||||
$where['ORDER']['weight'] = 'ASC';
|
||||
$where['ORDER']['lid'] = 'ASC';
|
||||
}
|
||||
|
||||
//分页
|
||||
$where['LIMIT'] = [$offset,$limit];
|
||||
//查询
|
||||
$datas = select_db('user_links',['lid','fid','pid(pwd_id)','status','property','title','url','url_standby','weight','description','icon','click','add_time','up_time'],$where);
|
||||
$datas = select_db('user_links',$field,$where);
|
||||
|
||||
msgA(['code'=>1,'msg'=>'获取成功','count'=>$count,'data'=>$datas]);
|
||||
}
|
||||
@@ -705,7 +711,7 @@ function write_link(){
|
||||
}
|
||||
|
||||
$api = Get_Index_URL().'?c=icon&url='.base64_encode($link['url']);
|
||||
$res = ccurl($api);
|
||||
$res = ccurl($api,30,true);
|
||||
$data = get_db('global_icon','*',['url_md5'=>md5($link['url'])]);
|
||||
if(empty($data)){
|
||||
msg(1,'fail');
|
||||
@@ -821,6 +827,10 @@ function write_apply(){
|
||||
$s['apply'] = intval($_POST['apply']); // 功能选项0.关闭 1.需要审核 2.无需审核
|
||||
$s['Notice'] = $_POST['Notice']??''; // 公告
|
||||
$s['submit_limit'] = intval($_POST['submit_limit']); //提交限制
|
||||
$s['iconurl'] = $_POST['iconurl'];
|
||||
$s['description'] = $_POST['description'];
|
||||
$s['email'] = $_POST['email'];
|
||||
|
||||
if($s['apply'] < 0 || $s['apply'] > 2 ){
|
||||
msg(-1,'参数错误!');
|
||||
}elseif(strlen($s['Notice']) > 512){
|
||||
@@ -966,8 +976,8 @@ function write_site_setting(){
|
||||
'main_link_priority'=>['int'=>true,'min'=>0,'max'=>3,'msg'=>'主链优先参数错误'],
|
||||
'link_icon'=>['int'=>true,'min'=>0,'max'=>30,'msg'=>'链接图标参数错误'],
|
||||
'site_icon'=>['empty'=>true],
|
||||
'top_link'=>['int'=>true,'min'=>0,'max'=>20,'msg'=>'热门链接参数错误'],
|
||||
'new_link'=>['int'=>true,'min'=>0,'max'=>20,'msg'=>'最新链接参数错误'],
|
||||
'top_link'=>['int'=>true,'min'=>0,'max'=>100,'msg'=>'热门链接参数错误'],
|
||||
'new_link'=>['int'=>true,'min'=>0,'max'=>100,'msg'=>'最新链接参数错误'],
|
||||
'max_link'=>['int'=>true,'min'=>0,'max'=>100,'msg'=>'输出上限参数错误'],
|
||||
'custom_header'=>['empty'=>true],
|
||||
'custom_footer'=>['empty'=>true]
|
||||
@@ -1117,7 +1127,7 @@ function other_testing_link(){
|
||||
if ( $global_config['offline'] == '1'){ msg(-1,"离线模式无法使用此功能"); }
|
||||
$code = get_http_code($_POST['url']);
|
||||
if($code != 200 && $code != 302 && $code != 301){
|
||||
$code = ccurl($_POST['url'])['code'];
|
||||
$code = ccurl($_POST['url'],30)['code'];
|
||||
}
|
||||
msgA(['code' => 0 ,'StatusCode'=> $code]);
|
||||
}
|
||||
@@ -1453,7 +1463,7 @@ function write_data_control(){
|
||||
function read_data(){
|
||||
global $USER_DB;
|
||||
//指定类型限制仅root账号可用!
|
||||
if(in_array($USER_DB['UserGroup'] != 'root' && $_GET['type'],['diagnostic_log','phpinfo'])){
|
||||
if($USER_DB['UserGroup'] != 'root' && in_array( $_GET['type'],['diagnostic_log','connectivity_test','phpinfo'])){
|
||||
msg(-1,'无权限');
|
||||
}
|
||||
|
||||
@@ -1464,7 +1474,24 @@ function read_data(){
|
||||
$index_count = get_db('user_count','v',['uid'=>UID,'k'=>date('Ym'),'t'=>'index_Ym'])??0;
|
||||
$click_count = get_db('user_count','v',['uid'=>UID,'k'=>date('Ym'),'t'=>'click_Ym'])??0;
|
||||
msgA( ['code'=>1,'data'=>[$category_count,$link_count,$index_count,$click_count] ]);
|
||||
|
||||
//连通测试
|
||||
}elseif($_GET['type'] == 'connectivity_test'){
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $_POST['url']);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$start = microtime(true);
|
||||
$response = curl_exec($ch);
|
||||
$end = microtime(true);
|
||||
$time = round(($end - $start) * 1000, 2);
|
||||
if(curl_errno($ch)) {
|
||||
$log .= "请求发生错误:".curl_error($ch);
|
||||
} else {
|
||||
$log .= "响应内容:".$response ?? 'Null' ;
|
||||
$log .= ",访问耗时:{$time} 毫秒。" ;
|
||||
}
|
||||
curl_close($ch);
|
||||
msg(1,$log);
|
||||
//一键诊断
|
||||
}elseif($_GET['type'] == 'diagnostic_log'){
|
||||
clearstatcache(); //清除缓存
|
||||
@@ -1532,7 +1559,35 @@ function read_data(){
|
||||
msg(1,$log);
|
||||
//输出phpinfo信息
|
||||
}elseif($_GET['type'] == 'phpinfo'){
|
||||
phpinfo();
|
||||
session_start();
|
||||
if($_SESSION['phpinfo_id'] != $_GET['pid']){
|
||||
exit('验证失败,请刷新页面后重试!');
|
||||
}elseif(Get_MD5_Password($_GET["p"],$GLOBALS['USER_DB']["RegTime"]) === $GLOBALS['USER_DB']["Password"]){
|
||||
$_COOKIE = [];
|
||||
$_SERVER['HTTP_COOKIE'] = 'privacy';
|
||||
phpinfo();
|
||||
}else{
|
||||
exit('密码验证失败,请重试!');
|
||||
}
|
||||
//报表统计
|
||||
}elseif($_GET['type'] == 'echarts'){
|
||||
$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 = [];
|
||||
array_push($day_data, ['name' => '访问量', 'type' => 'line', 'data' => []]);
|
||||
array_push($day_data, ['name' => '点击量', 'type' => 'line', 'data' => []]);
|
||||
foreach ($dates as $date) {
|
||||
array_push($day_data[0]['data'], get_db('user_count', 'v', ['uid' => UID, 'k' => $date, 't' => 'index_Ymd']) ?? 0);
|
||||
array_push($day_data[1]['data'], get_db('user_count', 'v', ['uid' => UID, 'k' => $date, 't' => 'click_Ymd']) ?? 0);
|
||||
}
|
||||
|
||||
$data = ['dates'=>$dates,'day_data'=>$day_data];
|
||||
msgA(['code'=>1,'data'=>$data]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,10 +48,20 @@ function other_upsys(){
|
||||
}
|
||||
//设置执行最长时间,0为无限制。单位秒!
|
||||
set_time_limit(5*60);
|
||||
$overtime = !isset($GLOBALS['global_config']['Update_Overtime']) ? 3 : ($GLOBALS['global_config']['Update_Overtime'] < 3 || $GLOBALS['global_config']['Update_Overtime'] > 60 ? 3 : $GLOBALS['global_config']['Update_Overtime']);
|
||||
|
||||
//加载远程数据
|
||||
$urls = [ "https://update.lm21.top/TwoNav/updata.json"];
|
||||
foreach($urls as $url){
|
||||
$Res = ccurl($url,3);
|
||||
$urls = [
|
||||
"lm21" => "https://update.lm21.top/TwoNav/updata.json",
|
||||
"gitee" => "https://gitee.com/tznb/twonav_updata/raw/master/updata.json"
|
||||
];
|
||||
$Source = $GLOBALS['global_config']['Update_Source'] ?? '';
|
||||
if (!empty($Source) && isset($urls[$Source])) {
|
||||
$urls = [$Source => $urls[$Source]];
|
||||
}
|
||||
|
||||
foreach($urls as $key => $url){
|
||||
$Res = ccurl($url,$overtime);
|
||||
$data = json_decode($Res["content"], true);
|
||||
if($data["code"] == 200 ){ //如果获取成功
|
||||
break; //跳出循环.
|
||||
@@ -537,6 +547,10 @@ function write_sys_settings(){
|
||||
'global_header'=>['empty'=>true],
|
||||
'global_footer'=>['empty'=>true],
|
||||
'api_extend'=>['empty'=>true],
|
||||
'c_code'=>['int'=>true,'min'=>0,'max'=>1,'msg'=>'自定义代码参数错误'],
|
||||
//更新设置
|
||||
'Update_Source'=>['empty'=>true],
|
||||
'Update_Overtime'=>['int'=>true,'min'=>3,'max'=>60,'msg'=>'资源超时参数错误'],
|
||||
//扩展功能-(全局开关)
|
||||
'apply'=>['int'=>true,'min'=>0,'max'=>1,'msg'=>'收录管理参数错误'],
|
||||
'guestbook'=>['int'=>true,'min'=>0,'max'=>1,'msg'=>'留言管理参数错误'],
|
||||
@@ -724,6 +738,25 @@ function other_root(){
|
||||
if(!is_subscribe('bool')){msg(-1,"未检测到有效授权,无法使用该功能!");}
|
||||
write_global_config('icon_config',$_POST,'图标配置');
|
||||
msg(1,'保存成功');
|
||||
}elseif($_GET['type'] == 'write_icon_del_cache'){
|
||||
//删除数据库缓存信息
|
||||
if(empty(count_db('global_icon','*'))){
|
||||
msg(-1,'无缓存记录..');
|
||||
}
|
||||
delete_db('global_icon','*');
|
||||
|
||||
//删除缓存目录下的所有文件
|
||||
$files = glob(DIR.'/data/icon' . '/*');
|
||||
if (empty($files)) {
|
||||
msg(-1,'无缓存文件..');
|
||||
}
|
||||
foreach ($files as $file) {
|
||||
if (is_file($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
}
|
||||
|
||||
msg(1,'操作成功');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,6 +128,9 @@ if($global_config['link_extend'] == 1 && check_purview('link_extend',1) && in_ar
|
||||
$extend = empty($link['extend']) ? [] : unserialize($link['extend']);
|
||||
}
|
||||
|
||||
//载入过渡页设置
|
||||
$transition_page = unserialize(get_db("user_config", "v", ["uid"=>UID,"k"=>"s_transition_page"]));
|
||||
|
||||
//如果存在备用链接,则强制载入过渡页
|
||||
if(!empty($link['url_standby'])) {
|
||||
$link['url_standby'] = unserialize($link['url_standby']);
|
||||
|
||||
@@ -44,22 +44,22 @@ foreach($_POST as $key =>$value){
|
||||
|
||||
$title = $_POST['title'];
|
||||
$url = $_POST['url'];
|
||||
$iconurl = $_POST['iconurl'];
|
||||
$description = $_POST['description'];
|
||||
$iconurl = $_POST['iconurl'] ?? '';
|
||||
$description = $_POST['description'] ?? '';
|
||||
$category_id = intval ($_POST['category_id']);
|
||||
$email = $_POST['email'];
|
||||
$email = $_POST['email'] ?? '';
|
||||
$user_ip = Get_IP();
|
||||
if( !filter_var($url, FILTER_VALIDATE_URL) ) {
|
||||
msg(-1,'URL无效!');
|
||||
}elseif( !empty($iconurl) && !filter_var($iconurl, FILTER_VALIDATE_URL) ){
|
||||
}elseif(!empty($apply['iconurl']) && !filter_var($iconurl, FILTER_VALIDATE_URL) ){
|
||||
msg(-1,'网站图标无效!');
|
||||
}elseif(!preg_match('/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/',$email)){
|
||||
}elseif(!empty($apply['email']) && !preg_match('/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/',$email)){
|
||||
msg(-1,'联系邮箱无效!');
|
||||
}elseif(!isset($_POST['category_id'])){
|
||||
msg(-1,'分类ID不能为空!');
|
||||
}elseif(!isset($_POST['title'])){
|
||||
msg(-1,'网站标题不能为空!');
|
||||
}elseif(!isset($_POST['description'])){
|
||||
}elseif(!empty($apply['description']) && empty($_POST['description'])){
|
||||
msg(-1,'网站描述不能为空!');
|
||||
}
|
||||
//获取和检查分类信息
|
||||
|
||||
@@ -10,6 +10,10 @@ if(!is_login && ($global_config['Privacy'] == 1 || !check_purview('Common_home',
|
||||
}
|
||||
//载入站点设置
|
||||
$site = unserialize(get_db('user_config','v',['uid'=>UID,'k'=>'s_site']));
|
||||
//如果没有权限则清除自定义代码
|
||||
if(!check_purview('header',1)){$site['custom_header'] = '';}
|
||||
if(!check_purview('footer',1)){$site['custom_footer'] = '';}
|
||||
|
||||
$site['Title'] = $site['title'].(empty($site['subtitle'])?'':' - '.$site['subtitle']);
|
||||
//免费用户请保留版权,谢谢!
|
||||
$copyright = empty($global_config['copyright'])?'<a target="_blank" href="https://gitee.com/tznb/TwoNav">Copyright © TwoNav</a>':$global_config['copyright'];
|
||||
|
||||
@@ -4,8 +4,8 @@ if(!defined('DIR')){header('HTTP/1.1 404 Not Found');header("status: 404 Not Fou
|
||||
//初始化
|
||||
session_name('TwoNav_initial');
|
||||
session_start();
|
||||
$layui['js'] = './static/Layui/v2.8.3/layui.js';
|
||||
$layui['css'] = './static/Layui/v2.8.3/css/layui.css';
|
||||
$layui['js'] = './static/Layui/v2.8.10/layui.js';
|
||||
$layui['css'] = './static/Layui/v2.8.10/css/layui.css';
|
||||
|
||||
//判断请求类型
|
||||
if($_SERVER['REQUEST_METHOD'] === 'POST'){
|
||||
@@ -284,7 +284,7 @@ function Write_Config(){
|
||||
//写站点配置
|
||||
$o_config['Login'] = 'login'; //登录入口
|
||||
$o_config['Register'] = 'register'; //注册入口
|
||||
$o_config['RegOption'] = '1'; //注册配置
|
||||
$o_config['RegOption'] = '0'; //注册配置
|
||||
$o_config['Libs'] = './static'; //静态库路径
|
||||
$o_config['Default_User'] = $_POST['User']; //默认用户
|
||||
$o_config['XSS_WAF'] = '1'; //防XSS脚本
|
||||
@@ -294,6 +294,7 @@ function Write_Config(){
|
||||
$o_config['Maintenance'] = '0'; //维护模式
|
||||
$o_config['Sub_domain'] = '0'; //二级域名
|
||||
$o_config['copyright'] = ''; //版权信息
|
||||
$o_config['c_code'] = '0'; //禁用默认用户使用自定义代码
|
||||
|
||||
insert_db("global_config", ["k" => "o_config","v" => $o_config,"d" => '网站配置']);
|
||||
|
||||
@@ -447,6 +448,25 @@ set_db_type(db_type);
|
||||
layui.use(['form'], function(){
|
||||
var form = layui.form;
|
||||
|
||||
//伪静态检测
|
||||
var request = new XMLHttpRequest();
|
||||
request.open('GET', './static/Other/login.css?t=' + new Date().getTime(), true);
|
||||
request.onload = function() {
|
||||
if (request.status >= 200 && request.status < 400) {
|
||||
var fileContent = request.responseText;
|
||||
if (fileContent.startsWith('<!DOCTYPE html>')) {
|
||||
layer.alert(
|
||||
"系统检测到您的站点可能配置了不属于TwoNav的伪静态规则<br />通常是因为之前使用过其他程序,例如:OneNav Extend 或 OneNav <br />您需要将它清除,否则会影响到程序的正常使用 ( 如登录页异常 )<br />并在安装完成后在站长工具>生成伪静态>重新配置到站点中"
|
||||
,{title:'环境异常提示',anim: 2,closeBtn: 0,btn: ['刷新页面']},function () {
|
||||
location.reload();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
request.send();
|
||||
|
||||
|
||||
//开始安装
|
||||
form.on('submit(register)', function(data){
|
||||
var d = data.field;
|
||||
@@ -510,12 +530,12 @@ function open_msg(u,p){
|
||||
layer.open({ //弹出结果
|
||||
type: 1
|
||||
,title: '安装成功'
|
||||
,area: ['230px', '220px']
|
||||
,area: ['230px', '260px']
|
||||
,maxmin: false
|
||||
,shadeClose: false
|
||||
,resize: false
|
||||
,closeBtn: 0
|
||||
,content: '<div style="padding: 15px;">管理员账号: '+u+'<br>管理员密码: '+p+'<br><h3><a href="?c=admin&u='+u+'" style="color: #0000FF;" class="fl"> <br> >>点我进入后台</a></h3><h3><a href="?u='+u+'" style="color: #0000FF;" class="fl"> <br> >>点我进入首页</a></h3></div>'
|
||||
,content: '<div style="padding: 15px;">管理员账号: '+u+'<br>管理员密码: '+p+'<br><h3><a href="?c=admin&u='+u+'" style="color: #0000FF;" class="fl"> <br> >>点我进入后台</a></h3><h3><a href="?u='+u+'" style="color: #0000FF;" class="fl"> <br> >>点我进入首页</a></h3> <h3><a href="https://gitee.com/tznb/TwoNav/wikis/%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/%E5%AE%89%E5%85%A8%E9%85%8D%E7%BD%AE" style="color: #0000FF;" class="fl" target="_blank"> <br> >>安全配置说明</a></h3> </div>'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -18,14 +18,19 @@ if($_SERVER['REQUEST_METHOD'] === 'GET'){
|
||||
AccessControl(); //访问控制
|
||||
$User = $_POST["User"];$Password = $_POST["Password"]; //获取请求数据
|
||||
|
||||
if(empty($User)){
|
||||
insert_db("user_log", ["uid" => '',"user"=>'',"ip"=>Get_IP(),"time"=>time(),"type" => 'login',"content"=>Get_Request_Content(),"description"=>"请求登录>账号为空"]);
|
||||
msg(-1,'账号不能为空!');
|
||||
}elseif($User != $USER_DB['User']){
|
||||
insert_db("user_log", ["uid" => '',"user"=>$User,"ip"=>Get_IP(),"time"=>time(),"type" => 'login',"content"=>Get_Request_Content(),"description"=>"请求登录>账号不存在"]);
|
||||
msg(-1,'账号不存在!');
|
||||
}
|
||||
|
||||
//记录请求日志
|
||||
insert_db("user_log", ["uid" => $USER_DB['ID'],"user"=>$USER_DB['User'],"ip"=>Get_IP(),"time"=>time(),"type" => 'login',"content"=>Get_Request_Content(),"description"=>"请求登录"]);
|
||||
$log_id = $db->id();
|
||||
//基础判断
|
||||
if(!isset($User)){
|
||||
update_db_db("user_log", ["description" => "请求登录>账号不能为空"], ["id"=>$log_id]);
|
||||
msg(-1,'账号不能为空!');
|
||||
}elseif(strlen($Password)!==32){
|
||||
if(strlen($Password)!==32){
|
||||
update_db("user_log", ["description" => "请求登录>密码错误(长度应该是32位的MD5)"], ["id"=>$log_id]);
|
||||
msg(-1,'密码错误!');
|
||||
}elseif($c != $global_config["Login"] && $c != $USER_DB['Login'] ){
|
||||
|
||||
@@ -234,7 +234,7 @@ function echo_pwds(){
|
||||
}
|
||||
//检查链接
|
||||
function check_link($fid,$title,$url,$url_standby_s=''){
|
||||
$pattern = "/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|sftp:\/\/|magnet:?|ed2k:\/\/|thunder:\/\/|tcp:\/\/|udp:\/\/|rtsp:\/\/).+/";
|
||||
$pattern = "/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|sftp:\/\/|magnet:?|ed2k:\/\/|thunder:\/\/|tcp:\/\/|udp:\/\/|rtsp:\/\/|wsa:\/\/|vmrc:\/\/).+/";
|
||||
$length_limit = unserialize(get_db("global_config","v",["k"=>"length_limit"]));
|
||||
if (empty($fid)) msg(-1,'分类id(fid)不能为空');
|
||||
if (empty($title)) msg(-1,'名称不能为空');
|
||||
@@ -338,32 +338,33 @@ function is_login(){
|
||||
global $USER_DB;
|
||||
$time = time();
|
||||
$LoginConfig = unserialize($USER_DB['LoginConfig']);
|
||||
|
||||
function delete_expired_info($time,$LoginConfig){
|
||||
global $USER_DB;
|
||||
if(empty($LoginConfig['Session'])){
|
||||
$where = [
|
||||
"uid" => $USER_DB['ID'],
|
||||
//"expire_time" => 0,
|
||||
"OR" => [
|
||||
"last_time[<]" => strtotime('-1 day'),
|
||||
"login_time[<]" => strtotime('-15 day')
|
||||
]
|
||||
];
|
||||
}else{
|
||||
$where = [
|
||||
"uid" => $USER_DB['ID'],
|
||||
"OR" => [
|
||||
"expire_time[<]" => $time,
|
||||
"last_time[<]" => strtotime("-{$LoginConfig['KeyClear']} day")
|
||||
]
|
||||
];
|
||||
if (!function_exists('delete_expired_info')) {
|
||||
function delete_expired_info($time,$LoginConfig){
|
||||
global $USER_DB;
|
||||
if(empty($LoginConfig['Session'])){
|
||||
$where = [
|
||||
"uid" => $USER_DB['ID'],
|
||||
//"expire_time" => 0,
|
||||
"OR" => [
|
||||
"last_time[<]" => strtotime('-1 day'),
|
||||
"login_time[<]" => strtotime('-15 day')
|
||||
]
|
||||
];
|
||||
}else{
|
||||
$where = [
|
||||
"uid" => $USER_DB['ID'],
|
||||
"OR" => [
|
||||
"expire_time[<]" => $time,
|
||||
"last_time[<]" => strtotime("-{$LoginConfig['KeyClear']} day")
|
||||
]
|
||||
];
|
||||
}
|
||||
//var_dump(select_db('user_login_info','*',$where),$where);exit;
|
||||
delete_db("user_login_info", $where); //清理到期Key
|
||||
update_db("global_user",["kct"=>$time],["User" => $USER_DB['User']]); //记录清理时间
|
||||
}
|
||||
//var_dump(select_db('user_login_info','*',$where),$where);exit;
|
||||
delete_db("user_login_info", $where); //清理到期Key
|
||||
update_db("global_user",["kct"=>$time],["User" => $USER_DB['User']]); //记录清理时间
|
||||
}
|
||||
|
||||
|
||||
//清理间隔30分钟(1800秒)
|
||||
if( ($USER_DB['kct'] + 1800) < $time ){
|
||||
delete_expired_info($time,$LoginConfig);
|
||||
@@ -529,7 +530,7 @@ function get_http_code($url,$TIMEOUT = 10 ,$NOBODY = true) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function ccurl($url,$overtime = 3){
|
||||
function ccurl($url,$overtime = 3,$Referer = false){
|
||||
try {
|
||||
$curl = curl_init ( $url ) ; //初始化
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, $overtime ); //超时
|
||||
@@ -538,6 +539,11 @@ function ccurl($url,$overtime = 3){
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
if($Referer === true){
|
||||
curl_setopt($curl, CURLOPT_REFERER, $_SERVER['HTTP_REFERER']);
|
||||
}elseif(!empty($Referer)){
|
||||
curl_setopt($curl, CURLOPT_REFERER, $Referer);
|
||||
}
|
||||
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36');
|
||||
$Res["content"] = curl_exec ( $curl ) ;
|
||||
$Res["code"] = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
@@ -641,6 +647,10 @@ function is_Duplicated($array, $field){
|
||||
//检查权限(有权限返回true 没有权限时根传递参数1是返回false 2是直接返回错误信息)
|
||||
function check_purview($name,$return_type){
|
||||
global $USER_DB;
|
||||
//230705新增,禁止判断默认用户是否可以使用自定义代码
|
||||
if($USER_DB['UserGroup'] == 'default' && $GLOBALS['global_config']['c_code'] != '1' && ( $name == 'header' || $name == 'footer' )){
|
||||
return false;
|
||||
}
|
||||
if($USER_DB['UserGroup'] == 'root' || $USER_DB['UserGroup'] == 'default'){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ switch ($type) {
|
||||
setcookie($USER_DB['User'].'_Password2', md5($USER_DB['Password'].$_COOKIE[U.'_key'].$_POST['Password2']), 0,'','',false,true);
|
||||
msg(1,'二级密码正确!');
|
||||
}else{
|
||||
msg(-1,'二级密码错误!'.$LoginConfig['Password2']);
|
||||
msg(-1,'二级密码错误!');
|
||||
}
|
||||
break;
|
||||
case "link_pwd":
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.0.25-20230607
|
||||
v2.0.30-20230713
|
||||
@@ -649,7 +649,17 @@
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/**菜单缩放*/
|
||||
.popup-tips .layui-layer-TipsG{
|
||||
display: none;
|
||||
}
|
||||
.popup-tips.layui-layer-tips .layui-layer-content{
|
||||
padding: 0;
|
||||
}
|
||||
.popup-tips .layui-nav-tree{
|
||||
width: 150px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
/**左侧菜单字体间距*/
|
||||
.layuimini-menu-left .layui-nav-item a span {
|
||||
letter-spacing: 1px;
|
||||
@@ -879,4 +889,4 @@
|
||||
.layui-layout-admin .layui-logo {width: 155px;}
|
||||
.layui-body {left: 155px;}
|
||||
.layuimini-tool {left: 190px;}
|
||||
.layui-nav-tree {width: 155px!important;}
|
||||
.layui-nav-tree {width: 155px!important;}
|
||||
|
||||
@@ -23,8 +23,9 @@
|
||||
<div class="layui-header header">
|
||||
<div class="layui-logo layuimini-logo"></div>
|
||||
<div class="layuimini-header-content">
|
||||
<a><div class="layuimini-tool"><i title="左侧栏展开/收缩" class="fa fa-outdent" data-side-fold="1"></i></div></a>
|
||||
<a><div class="layuimini-tool"><i title="左侧栏展开/收缩" class="fa fa-outdent" style="font-size: 1.1rem;" data-side-fold="1"></i></div></a>
|
||||
<ul class="layui-nav layui-layout-right">
|
||||
<li class="layui-nav-item" lay-unselect><a href="javascript:;" data-home="主页" title="主页"><i class="fa fa-home" style="font-size: 1.08rem;"></i></a></li>
|
||||
<li class="layui-nav-item" lay-unselect><a href="javascript:;" data-refresh="刷新" title="刷新"><i class="fa fa-refresh"></i></a></li>
|
||||
<li class="layui-nav-item mobile layui-hide-xs" lay-unselect><a href="javascript:;" title="全屏" data-check-screen="full"><i class="fa fa-arrows-alt"></i></a></li>
|
||||
<li class="layui-nav-item layuimini-setting">
|
||||
|
||||
@@ -82,6 +82,15 @@
|
||||
}
|
||||
limit = false; //取消修改限制
|
||||
layer.closeAll('loading'); //关闭加载层
|
||||
//加载加密分组数据
|
||||
$.post(get_api('read_pwd_group_list'),{'page':'1','limit':'9999'},function(data,status){
|
||||
if(data.code == 1){
|
||||
pwds = [];
|
||||
for(var i =0;i<data.count;i++){
|
||||
pwds['pid_'+data.data[i].pid] = {'pwd':data.data[i].password,'name':data.data[i].name};
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -160,11 +160,51 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme"], function
|
||||
},
|
||||
// 监听
|
||||
listen: function () {
|
||||
//主页
|
||||
$('body').on('click','[data-home]', function () {
|
||||
top.location.href='./index.php?u='+u;
|
||||
});
|
||||
//刷新
|
||||
$('body').on('click','[data-refresh]', function () {
|
||||
$(".layui-tab-item.layui-show").find("iframe")[0].contentWindow.location.reload();
|
||||
miniAdmin.success('刷新成功');
|
||||
});
|
||||
// 悬停菜单>移入
|
||||
$("body").on("mouseenter", ".layui-nav-tree .menu-li", function () {
|
||||
if (miniAdmin.checkMobile()) {
|
||||
return false;
|
||||
}
|
||||
var classInfo = $(this).attr('class'),
|
||||
tips = $(this).prop("innerHTML"),
|
||||
isShow = $('.layuimini-tool i').attr('data-side-fold');
|
||||
if (isShow == 0 && tips) {
|
||||
tips = "<ul class='layuimini-menu-left-zoom layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>"+tips+"</li></ul>" ;
|
||||
window.openTips = layer.tips(tips, $(this), {
|
||||
tips: [2, '#2f4056'],
|
||||
time: 300000,
|
||||
skin:"popup-tips",
|
||||
success:function (el) {
|
||||
var left = $(el).position().left - 10 ;
|
||||
$(el).css({ left:left });
|
||||
element.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// 悬停菜单>移出
|
||||
$("body").on("mouseleave", ".popup-tips", function () {
|
||||
if (miniAdmin.checkMobile()) {
|
||||
return false;
|
||||
}
|
||||
var isShow = $('.layuimini-tool i').attr('data-side-fold');
|
||||
if (isShow == 0) {
|
||||
try {
|
||||
layer.close(window.openTips);
|
||||
} catch (e) {
|
||||
console.log(e.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
//全屏
|
||||
$('body').on('click','[data-check-screen]', function () {
|
||||
var check = $(this).attr('data-check-screen');
|
||||
|
||||
@@ -216,7 +216,7 @@ function preview_icon(icon =''){
|
||||
}else if(icon.substr(0,4) == '<svg'){
|
||||
$('#icon_img').attr('src','data:image/svg+xml;base64,'+ btoa(icon.replace(/[\u00A0-\u2666]/g, function(c) {return '&#' + c.charCodeAt(0) + ';';})) );
|
||||
}else{
|
||||
$('#icon_img').attr('src',icon + '?t=' + Math.random() ) ;
|
||||
$('#icon_img').attr('src',icon + (icon.indexOf('?') !== -1 ? '&_t=' : '?_t=') + Math.random() ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ layui.use(['form','table','dropdown','miniTab'], function () {
|
||||
var api = get_api('read_link_list'); //列表接口
|
||||
var limit = localStorage.getItem(u + "_limit") || 50; //尝试读取本地记忆数据,没有就默认50
|
||||
var pwds = [];
|
||||
var field,order;
|
||||
miniTab.listen();
|
||||
//渲染表格
|
||||
renderTable1();
|
||||
@@ -24,11 +25,11 @@ layui.use(['form','table','dropdown','miniTab'], function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var img_src;
|
||||
var cols=[ //表头
|
||||
{type:'checkbox'} //开启复选框
|
||||
,{field: 'lid', title: 'ID', width:80, sort: true,hide:true}
|
||||
,{field: 'category_name', title: '所属分类',sort:true,width:140,event: 'edit_category',templet:function(d){
|
||||
,{field: 'fid', title: '所属分类',sort:true,width:140,event: 'edit_category',templet:function(d){
|
||||
//检查是否存在,避免特殊情况报错
|
||||
if (categorys && categorys[d.fid] && categorys[d.fid].font_icon && categorys[d.fid].name) {
|
||||
return '<i class="' + categorys[d.fid].font_icon + '"></i> ' + categorys[d.fid].name;
|
||||
@@ -36,24 +37,38 @@ layui.use(['form','table','dropdown','miniTab'], function () {
|
||||
return 'Null';
|
||||
}
|
||||
}}
|
||||
,{field: 'title', title: '链接标题', width:200, edit: 'text'}
|
||||
,{field: 'icon', title: '图标', width:60, templet:function(d){
|
||||
if(d.icon == null || d.icon == ""){
|
||||
return '<img src="./templates/admin/img/ie.svg" width="28" height="28">';
|
||||
}else{
|
||||
if(d.icon.substr(0,5) =='data:') {
|
||||
img_src = d.icon;
|
||||
}else if(d.icon.substr(0,4) == '<svg'){
|
||||
img_src = 'data:image/svg+xml;base64,'+ btoa(d.icon.replace(/[\u00A0-\u2666]/g, function(c) {return '&#' + c.charCodeAt(0) + ';';}));
|
||||
}else{
|
||||
img_src = d.icon + (d.icon.indexOf('?') !== -1 ? '&_t=' : '?_t=') + Date.now();
|
||||
}
|
||||
return '<img src="' + img_src + '" width="28" height="28">';
|
||||
}
|
||||
}}
|
||||
,{field: 'title', title: '链接标题',sort:true, width:200, edit: 'text'}
|
||||
,{ title:'操作', toolbar: '#tablebar',width:110}
|
||||
,{field:'pwd_id',title:'密码',width:70,templet: function(d){
|
||||
return d.pwd_id>0?'<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="pwd">查看</a>':'';
|
||||
}}
|
||||
return d.pwd_id>0?'<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="pwd">查看</a>':'';
|
||||
}}
|
||||
,{field: 'property', title: '私有', width: 100, sort: true,templet: function(d){
|
||||
return "<input type='checkbox' value='" + d.lid + "' lay-filter='property' lay-skin='switch' lay-text='私有|公开' " + (d.property == 1?"checked":"" )+ ">";
|
||||
}}
|
||||
,{field: 'status', title: '状态', width: 100, sort: true,templet: function(d){
|
||||
return "<input type='checkbox' value='" + d.lid + "' lay-filter='status' lay-skin='switch' lay-text='启用|禁用' " + (d.status == 1?"checked":"" )+ ">";
|
||||
}}
|
||||
,{field: 'url', title: 'URL',templet:function(d){
|
||||
return '<a color="" target = "_blank" href = "' + d.url + '" title = "' + d.url + '" referrerpolicy="same-origin" >' + d.url + '</a>';
|
||||
,{field: 'url',sort:true, title: 'URL',templet:function(d){
|
||||
return '<a color="" target = "_blank" href = "' + d.url + '" title = "' + d.url + '" referrerpolicy="same-origin" >' + d.url + '</a>';
|
||||
}}
|
||||
,{field: 'click', title: '点击数',width:90,sort:true}
|
||||
,{field: 'add_time', title: '添加时间', width:160, sort: true,templet:function(d){
|
||||
var add_time = timestampToTime(d.add_time);
|
||||
return add_time;
|
||||
var add_time = timestampToTime(d.add_time);
|
||||
return add_time;
|
||||
}}
|
||||
,{field: 'up_time', title: '修改时间', width:160,sort:true,templet:function(d){
|
||||
return d.up_time == null ?'':timestampToTime(d.up_time);
|
||||
@@ -120,8 +135,15 @@ layui.use(['form','table','dropdown','miniTab'], function () {
|
||||
key: input.name,value: input.checked
|
||||
});
|
||||
});
|
||||
$('th[data-field="icon"]').attr('title', '仅显示已上传的图标');
|
||||
}
|
||||
});
|
||||
// 监听表格排序事件
|
||||
table.on('sort(table)', function(obj) {
|
||||
field = obj.field; // 排序字段
|
||||
order = obj.type == null ? '' : obj.type.toUpperCase(); // 排序方式asc,desc转为大写,null则默认排序
|
||||
link_search();
|
||||
});
|
||||
};
|
||||
|
||||
function link_search(){
|
||||
@@ -136,7 +158,7 @@ layui.use(['form','table','dropdown','miniTab'], function () {
|
||||
pageName: 'page' //页码的参数名称
|
||||
,limitName: 'limit' //每页数据量的参数名
|
||||
}
|
||||
,where: {query:keyword,fid:fid,property:property,status:status}
|
||||
,where: {query:keyword,fid:fid,property:property,status:status,field:field,order:order}
|
||||
,page: {curr: 1}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 操作列 -->
|
||||
|
||||
@@ -84,31 +84,19 @@
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">热门网址</label>
|
||||
<label class="layui-form-label">最新网址</label>
|
||||
<div class="layui-input-inline" >
|
||||
<select name="top_link">
|
||||
<option value="0" selected>不显示</option>
|
||||
<option value="5" >显示5条</option>
|
||||
<option value="10" >显示10条</option>
|
||||
<option value="15" >显示15条</option>
|
||||
<option value="20" >显示20条</option>
|
||||
</select>
|
||||
<input type="number" name="new_link" class="layui-input" value="0" placeholder="输入范围: 0-100" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">在主页显示热门网址(点击排行)</div>
|
||||
<div class="layui-form-mid layui-word-aux">在主页显示最新的网址(创建时间)</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">最新网址</label>
|
||||
<label class="layui-form-label">热门网址</label>
|
||||
<div class="layui-input-inline" >
|
||||
<select name="new_link">
|
||||
<option value="0" selected>不显示</option>
|
||||
<option value="5" >显示5条</option>
|
||||
<option value="10" >显示10条</option>
|
||||
<option value="15" >显示15条</option>
|
||||
<option value="20" >显示20条</option>
|
||||
</select>
|
||||
<input type="number" name="top_link" class="layui-input" value="0" placeholder="输入范围: 0-100" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">在主页显示最新的网址(创建时间)</div>
|
||||
<div class="layui-form-mid layui-word-aux">在主页显示热门网址(点击排行)</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
|
||||
@@ -3,8 +3,45 @@
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<div class="layui-form layuimini-form layui-form-pane">
|
||||
<blockquote class="layui-elem-quote layui-text" style="">注意: Token(令牌),是您访问API的凭证 (不了解&不需要请勿设置) ,等同于您的账号密码,请妥善保管</blockquote>
|
||||
<div class="layui-form-item">
|
||||
|
||||
<div class="layui-collapse" lay-accordion>
|
||||
<div class="layui-colla-item" >
|
||||
<div class="layui-colla-title">注意事项</div>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<blockquote class="layui-elem-quote layui-text" style="">Token(令牌),是您访问API的凭证 (不了解&不需要请勿设置) ,等同于您的账号密码,请妥善保管</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-colla-item">
|
||||
<div class="layui-colla-title">API模式的差别</div>
|
||||
<div class="layui-colla-content">
|
||||
<p>安全模式: 仅提供TwoNav自身的API接口,访客(未登录/Token为空)无法调用!</p>
|
||||
<p>兼容模式: 兼容部分OneNav的API接口,以便于其他插件调用!不允许访客调用!</p>
|
||||
<p>兼容模式+开放: 在兼容模式的基础上允许访客调用API获取共有数据!</p>
|
||||
<p>如果你未使用相关扩展插件,则无需修改模式并将Token删除,以提高账号的安全性!</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-colla-item">
|
||||
<div class="layui-colla-title">如何使用Chrome浏览器扩展 [非官方]</div>
|
||||
<div class="layui-colla-content">
|
||||
前言: 由于浏览器扩展插件非TwoNav所开发适配,如存在Bug或无法使用属正常现象!<br />
|
||||
安装: 谷歌应用商店下载<a href="https://chrome.google.com/webstore/detail/onenav/omlkjgkogkfpjbdigianpdbjncdchdco?hl=zh-CN&authuser=0" >OneNav</a>并安装 ( 已知0.9.24可用,其他版本未知 )<br />
|
||||
设置S: 1.TwoNav后台>右上角账号>安全设置>API模式>设为<兼容模式>或<兼容模式+开放> 2.在本页面获取Token<br />
|
||||
设置C: 插件API设置>填入域名和Token并保存>完成<br />
|
||||
常见问题1: 对于单用户使用,确保系统设置中默认用户是当前用户即可!多用户使用时需开启二级域名功能并将域名替换成用户的二级域名,注意结尾不需要带/
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-colla-item">
|
||||
<div class="layui-colla-title">如何使用uTools扩展插件 [非官方]</div>
|
||||
<div class="layui-colla-content">
|
||||
<p>前言: 由于uTools扩展插件非TwoNav所开发适配,如存在Bug或无法使用属正常现象!</p>
|
||||
<p>安装: 在uTools插件应用市场>搜索OneNav>点击获取 </p>
|
||||
<p>设置S: 1.TwoNav后台>右上角账号>安全设置>API模式>设为<兼容模式>或<兼容模式+开放> 2.在本页面获取SecretKey ( 即插件设置中的API KEY )</p>
|
||||
<p>设置C: 打开uTools中的OneNav,点击右下角小齿轮>输入网站地址/用户名/API KEY</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 15px;">
|
||||
<label class="layui-form-label required">登录密码</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="password" name="Password" lay-verify="required" lay-reqtext="请输入登录密码" placeholder="请输入登录密码" class="layui-input">
|
||||
@@ -29,6 +66,7 @@
|
||||
<button class="layui-btn layui-btn-danger" lay-submit lay-filter="delete">删除</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 操作列 -->
|
||||
|
||||
@@ -20,7 +20,7 @@ $title='收录管理';$awesome=true; require dirname(__DIR__).'/header.php';
|
||||
<script type="text/html" id="link_operate">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="operation">操作 <i class="layui-icon layui-icon-down"></i></a>
|
||||
</script>
|
||||
<table id="apply_list" class="layui-table" lay-filter="apply_list" style="margin: -3px 0;"></table>
|
||||
<table id="apply_list" class="layui-table" lay-filter="apply_list" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
<!--设置-->
|
||||
@@ -50,7 +50,15 @@ $title='收录管理';$awesome=true; require dirname(__DIR__).'/header.php';
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">单位:次,指最近24小时内可以提交多少次(为了防止恶意提交,删除记录可以恢复次数)</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">必填选项</label>
|
||||
<div class="layui-input-block" style="margin-left: 32px;">
|
||||
<input type="checkbox" name="iconurl" title="图标" >
|
||||
<input type="checkbox" name="description" title="描述" >
|
||||
<input type="checkbox" name="email" title="邮箱" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">使用说明</label>
|
||||
<div class="layui-form-mid ">部分主题没有收录入口,请自行添加到链接或者底部等你认为合适的地方!前往<a style="color:#3c78d8" target="_blank" href="./index.php?c=apply&u=<?php echo $u?>" target="_blank">申请收录</a></div>
|
||||
@@ -348,7 +356,7 @@ table.on('toolbar(apply_list)', function(obj){
|
||||
var data = checkStatus.data;
|
||||
switch(obj.event){
|
||||
case 'conf':
|
||||
if(document.body.clientWidth < 768){area = ['100%' , '100%'];}else{area = ['768px' , '500px'];}
|
||||
if(document.body.clientWidth < 768){area = ['100%' , '100%'];}else{area = ['768px' , '520px'];}
|
||||
layer.open({
|
||||
type: 1,
|
||||
scrollbar: false,
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
body{background-color:rgba(0, 0, 51, 0.8);}
|
||||
.title{max-width: 400px;height: auto;margin-left: auto;margin-right: auto;margin-top:5em;}
|
||||
.title h1{color:#FFFFFF;text-align: center;}
|
||||
.required {color: red;margin-left: 5px;float: right;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -29,32 +30,21 @@
|
||||
<div class="layui-form-item" style="color: #fbfbfb;">
|
||||
<?php echo $apply['Notice'];?>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站标题</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="title" required lay-verify="required" placeholder="例如 百度一下" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站标题<span class="required">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="title" required lay-verify="required" placeholder="例如 百度一下" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站链接</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="url" name="url" required lay-verify="required|url" placeholder="例如 https://www.baidu.com" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站链接<span class="required">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="url" name="url" required lay-verify="required|url" placeholder="例如 https://www.baidu.com" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站图标</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="url" name="iconurl" required lay-verify="url" placeholder="例如 https://www.baidu.com/favicon.ico" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站描述</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="description" placeholder="例如 搜索引擎" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站分类</label>
|
||||
<label class="layui-form-label">网站分类<span class="required">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<select name="category_id" lay-verify="required" lay-search>
|
||||
<option ></option>
|
||||
@@ -62,10 +52,22 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站图标</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="url" name="iconurl" lay-verify="url" placeholder="例如 https://www.baidu.com/favicon.ico" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">网站描述</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="description" placeholder="例如 搜索引擎" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">联系邮箱</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="email" lay-verify="required" placeholder="例如 admin@qq.com" autocomplete="off" class="layui-input">
|
||||
<input type="text" name="email" placeholder="例如 admin@qq.com" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
||||
@@ -14,14 +14,27 @@ if(!empty($Notice)){
|
||||
}
|
||||
//是否下载数据
|
||||
if(!offline && $reload){
|
||||
$Res = ccurl('https://update.lm21.top/TwoNav/Notice.json',3);
|
||||
$new_data = json_decode($Res['content'], true);unset($Res);
|
||||
if($new_data["code"] == 200 ){ //下载成功,写入缓存
|
||||
$new_data['download_time'] = time();
|
||||
write_global_config('notice',json_encode($new_data),'官方公告(缓存)');
|
||||
$data = $new_data;
|
||||
$overtime = !isset($global_config['Update_Overtime']) ? 3 : ($global_config['Update_Overtime'] < 3 || $global_config['Update_Overtime'] > 60 ? 3 : $global_config['Update_Overtime']);
|
||||
$urls = [
|
||||
"lm21" => "https://update.lm21.top/TwoNav/Notice.json",
|
||||
"gitee" => "https://gitee.com/tznb/twonav_updata/raw/master/Notice.json"
|
||||
];
|
||||
$Source = $global_config['Update_Source'] ?? '';
|
||||
if (!empty($Source) && isset($urls[$Source])) {
|
||||
$urls = [$Source => $urls[$Source]];
|
||||
}
|
||||
|
||||
foreach($urls as $key => $url){
|
||||
$Res = ccurl($url,$overtime);
|
||||
$new_data = json_decode($Res['content'], true);unset($Res);
|
||||
if($new_data["code"] == 200 ){ //下载成功,写入缓存
|
||||
$new_data['download_time'] = time();
|
||||
write_global_config('notice',json_encode($new_data),'官方公告(缓存)');
|
||||
$data = $new_data;
|
||||
unset($new_data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset($new_data);
|
||||
}
|
||||
//判断是否为空
|
||||
if(empty($data['version'])){
|
||||
@@ -227,9 +240,16 @@ require 'header.php';
|
||||
</div>
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header"><i class="fa fa-line-chart icon"></i>报表统计</div>
|
||||
<div class="layui-card-header">
|
||||
<div style="display: flex; justify-content: space-between;">
|
||||
<div><i class="fa fa-line-chart icon"></i>报表统计</div>
|
||||
<div>
|
||||
<button class="layui-btn layui-btn-primary echarts" style="border: none;display:none;"><span>最近7天</span><i class="layui-icon layui-icon-down layui-font-12"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div id="echarts-records" style="width: 100%;min-height:500px"></div>
|
||||
<div id="echarts-records" style="width: 100%; min-height: 500px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -310,29 +330,61 @@ if($USER_DB['UserGroup'] == 'root'){
|
||||
var $ = layui.jquery,
|
||||
layer = layui.layer,
|
||||
miniTab = layui.miniTab,
|
||||
echarts = layui.echarts;
|
||||
echarts = layui.echarts,
|
||||
dropdown = layui.dropdown;
|
||||
miniTab.listen();
|
||||
|
||||
//报表功能
|
||||
var echartsRecords = echarts.init(document.getElementById('echarts-records'), 'walden');
|
||||
var optionRecords = {
|
||||
tooltip: {trigger: 'axis'},
|
||||
legend: {data:['访问量','点击量']},
|
||||
grid: {left: '3%',right: '4%',bottom: '3%',containLabel: true},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: <?php echo json_encode($day)?>
|
||||
},
|
||||
yAxis: {},
|
||||
series: <?php echo json_encode($day_data)?>
|
||||
};
|
||||
echartsRecords.setOption(optionRecords);
|
||||
|
||||
// echarts 窗口缩放自适应
|
||||
window.onresize = function(){
|
||||
echartsRecords.resize();
|
||||
|
||||
//报表统计下拉初始化
|
||||
var home_echarts = localStorage.getItem(u + "_home_echarts") || 7 ;
|
||||
$('.echarts').find('span').text(`最近${home_echarts}天`);
|
||||
$('.echarts').show();
|
||||
dropdown.render({
|
||||
elem: '.echarts',
|
||||
data: [{
|
||||
title: '最近7天',
|
||||
value: 7
|
||||
},{
|
||||
title: '最近14天',
|
||||
value: 14
|
||||
},{
|
||||
title: '最近30天',
|
||||
value: 30
|
||||
}],
|
||||
click: function(obj){
|
||||
this.elem.find('span').text(obj.title);
|
||||
localStorage.setItem(u + "_home_echarts",obj.value);
|
||||
home_echarts = obj.value;
|
||||
load_echarts();
|
||||
}
|
||||
});
|
||||
|
||||
//加载报表统计
|
||||
function load_echarts(){
|
||||
var echartsRecords = echarts.init(document.getElementById('echarts-records'), 'walden');
|
||||
$.post('./index.php?c=api&method=read_data&date='+home_echarts+'&type=echarts&u='+u,function(data,status){
|
||||
if(data.code == 1){
|
||||
var optionRecords = {
|
||||
tooltip: {trigger: 'axis'},
|
||||
legend: {data:['访问量','点击量']},
|
||||
grid: {left: '3%',right: '4%',bottom: '3%',containLabel: true},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: data.data.dates
|
||||
},
|
||||
yAxis: {},
|
||||
series: data.data.day_data
|
||||
};
|
||||
echartsRecords.setOption(optionRecords);
|
||||
window.onresize = function(){echartsRecords.resize();} // echarts 窗口缩放自适应
|
||||
return;
|
||||
}
|
||||
layer.alert("获取统计数据失败..",{icon:5,title:'错误',anim: 2,closeBtn: 0,btn: ['刷新页面']},function () {location.reload();});
|
||||
});
|
||||
}
|
||||
load_echarts();
|
||||
|
||||
//定时刷新
|
||||
setInterval(function() {
|
||||
if($("#layuiminiHomeTabId",parent.document).attr('class') == 'layui-this' && document.visibilityState == 'visible'){
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<span id = "testing_tip" style = "display:none;">测试中...</span>
|
||||
<span id = "subscribe" style = "display:none;"><?php echo is_subscribe('bool')?'1':'0' ?></span>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 操作列 -->
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表头工具栏 -->
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 操作列 -->
|
||||
|
||||
@@ -9,7 +9,7 @@ $LoginConfig = unserialize( get_db("global_config", "v", ["k" => "LoginConfig"])
|
||||
<div class="layuimini-main">
|
||||
<form class="layui-form" lay-filter="form">
|
||||
<div class="layui-form layuimini-form layui-form-pane">
|
||||
<blockquote class="layui-elem-quote layui-text" style="">1.本页功能<a href="https://gitee.com/tznb/OneNav/wikis/%E8%AE%A2%E9%98%85%E6%9C%8D%E5%8A%A1%E6%8C%87%E5%BC%95" target="_blank">授权用户</a>专享<br />2.用户注册后默认使用此方案<br />3.如果您不理解选项的作用请勿乱改 </blockquote>
|
||||
<blockquote class="layui-elem-quote layui-text" style="">1.本页功能<a href="https://gitee.com/tznb/OneNav/wikis/%E8%AE%A2%E9%98%85%E6%9C%8D%E5%8A%A1%E6%8C%87%E5%BC%95" target="_blank">授权用户</a>专享<br />2.用户注册后默认使用此方案<br />3.此功能不会修改现有用户的配置<br />4.如果您不理解选项的作用请勿乱改 </blockquote>
|
||||
<fieldset class="layui-elem-field layui-field-title"><legend>安全设置</legend></fieldset>
|
||||
|
||||
<div class="layui-form-item">
|
||||
|
||||
@@ -86,6 +86,7 @@ $title='系统设置';require(dirname(__DIR__).'/header.php');
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn layui-btn-danger" type="button" id="clean">清除缓存</button>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="save">确认保存</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,7 +104,24 @@ layui.use(['jquery','form'], function () {
|
||||
|
||||
//表单赋值
|
||||
form.val('form', <?php echo json_encode(unserialize( get_db("global_config", "v", ["k" => "icon_config"])));?>);
|
||||
|
||||
//清除缓存
|
||||
$('#clean').click(function() {
|
||||
layer.confirm('确定要清除全部缓存吗?',{icon: 3, title:'温馨提示'}, function(index){
|
||||
$.post(get_api('other_root','write_icon_del_cache'),function(data,status){
|
||||
if(data.code == 1) {
|
||||
if(data.msg!="操作成功"){
|
||||
layer.alert(data.msg)
|
||||
}else{
|
||||
layer.msg(data.msg, {icon: 1});
|
||||
}
|
||||
}else{
|
||||
layer.msg(data.msg, {icon: 5});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(save)', function (data) {
|
||||
$.post(get_api('other_root','write_icon_config'),data.field,function(data,status){
|
||||
|
||||
@@ -9,7 +9,7 @@ $user_groups = select_db('user_group',['id','code','name'],'');
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表头工具栏 -->
|
||||
|
||||
@@ -28,7 +28,7 @@ require(dirname(__DIR__).'/header.php');
|
||||
<div class="layui-inline layui-form" style="padding-bottom: 5px;">
|
||||
<button class="layui-btn layui-btn-normal " id="search" style="height: 36px;">搜索</button>
|
||||
</div>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,9 +2,17 @@
|
||||
if($USER_DB['UserGroup'] != 'root'){$content='您没有权限访问此页面'; require(DIR.'/templates/admin/page/404.php');exit;}
|
||||
$title='系统设置';require(dirname(__DIR__).'/header.php');
|
||||
?>
|
||||
<style>
|
||||
.layui-btn-container .layui-btn{border-width: 1px; border-style: solid; border-color: #FF5722!important; color: #FF5722!important;background: none;height: 30px; line-height: 30px; padding: 0 10px; font-size: 12px;}
|
||||
</style>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<div class="layui-btn-container">
|
||||
<button type="button" class="layui-btn" layuimini-content-href="root/default_setting" data-title="默认设置">默认设置</button>
|
||||
<button type="button" class="layui-btn" layuimini-content-href="root/mail_set" data-title="邮件配置">邮件配置</button>
|
||||
<button type="button" class="layui-btn" layuimini-content-href="root/icon_set" data-title="图标配置">图标配置</button>
|
||||
</div>
|
||||
<form class="layui-form" lay-filter="form">
|
||||
<div class="layui-form layuimini-form layui-form-pane">
|
||||
<blockquote class="layui-elem-quote layui-text" style="">1.带*号的选项属<a href="https://gitee.com/tznb/OneNav/wikis/%E8%AE%A2%E9%98%85%E6%9C%8D%E5%8A%A1%E6%8C%87%E5%BC%95" target="_blank">授权用户</a>专享<br />2.原OneNav Extend的部分配置已下放到用户组配置中<br />3.如果您不理解选项的作用请勿乱改 </blockquote>
|
||||
@@ -180,14 +188,35 @@ $title='系统设置';require(dirname(__DIR__).'/header.php');
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item" id="api_extend" style="display:none;">
|
||||
<label class="layui-form-label required">api_extend</label>
|
||||
<div class="layui-form-item layui-hide" id="api_extend">
|
||||
<label class="layui-form-label">api_extend</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="api_extend">
|
||||
<option value="0" selected="">关闭</option>
|
||||
<option value="1" >开启</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">请勿开启!请勿开启!请勿开启!</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-hide">
|
||||
<label class="layui-form-label">资源接口</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="Update_Source">
|
||||
<option value="0" selected="">自动</option>
|
||||
<option value="lm21">主线路</option>
|
||||
<option value="gitee">备用线路(gitee)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">备用资源不定期更新,非必要请勿使用!</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-hide">
|
||||
<label class="layui-form-label">资源超时</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="Update_Overtime" autocomplete="off" value="3" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">默认3秒,范围3-60</div>
|
||||
</div>
|
||||
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;"><legend>扩展功能</legend></fieldset>
|
||||
@@ -223,42 +252,52 @@ $title='系统设置';require(dirname(__DIR__).'/header.php');
|
||||
<div class="layui-form-mid layui-word-aux">自定义链接的扩展信息(需自行添加字段,目前仅用于自定义过渡页)</div>
|
||||
</div>
|
||||
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;"><legend>长度限制</legend></fieldset>
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;"><legend>相关限制</legend></fieldset>
|
||||
<blockquote class="layui-elem-quote layui-text" style="">程序采用UTF8编码,一个汉字约占用3个字节!英文字母和数组占用1个字节!值为0表示不限制!</blockquote>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">分类名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="c_name" autocomplete="off" value="0" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">单位:字节。</div>
|
||||
<div class="layui-form-mid layui-word-aux">字符长度限制,单位:字节。</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">分类描述</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="c_desc" autocomplete="off" value="0" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">单位:字节。</div>
|
||||
<div class="layui-form-mid layui-word-aux">字符长度限制,单位:字节。</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">链接名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="l_name" autocomplete="off" value="0" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">单位:字节。</div>
|
||||
<div class="layui-form-mid layui-word-aux">字符长度限制,单位:字节。</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">链接地址</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="l_url" autocomplete="off" value="0" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">单位:字节。</div>
|
||||
<div class="layui-form-mid layui-word-aux">字符长度限制,单位:字节。</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">链接描述</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="l_desc" autocomplete="off" value="0" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">单位:字节。</div>
|
||||
<div class="layui-form-mid layui-word-aux">字符长度限制,单位:字节。</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">自定义代码</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="c_code" lay-filter="c_code">
|
||||
<option value="0" selected="">禁止</option>
|
||||
<option value="1" >允许</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">是否允许默认用户组使用自定义代码!允许存在安全隐患!</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
@@ -268,19 +307,25 @@ $title='系统设置';require(dirname(__DIR__).'/header.php');
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script src = "<?php echo $libs;?>/jquery/jquery-3.6.0.min.js"></script>
|
||||
<?php load_static('js.layui');?>
|
||||
<script>
|
||||
layui.use(['jquery','form'], function () {
|
||||
layui.use(['jquery','form','miniTab'], function () {
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $ = layui.jquery;
|
||||
|
||||
var miniTab = layui.miniTab;
|
||||
miniTab.listen();
|
||||
//表单赋值
|
||||
form.val('form', <?php echo json_encode($global_config);?>);
|
||||
form.val('form', <?php echo json_encode(unserialize( get_db("global_config", "v", ["k" => "length_limit"])));?>);
|
||||
|
||||
|
||||
|
||||
|
||||
//危险提示
|
||||
form.on('select(c_code)', function(data){
|
||||
if (data.value === '1') {
|
||||
layer.alert("允许使用自定义代码存在安全隐患<br />除非您信任使用者!否则建议禁止<br />同时请避免在登录管理员账号时浏览其他用户的主页", { title: '危险提示:' })
|
||||
}
|
||||
});
|
||||
//监听提交
|
||||
form.on('submit(save)', function (data) {
|
||||
$.post('./index.php?c=api&method=write_sys_settings&u='+u,data.field,function(data,status){
|
||||
@@ -299,14 +344,13 @@ layui.use(['jquery','form'], function () {
|
||||
|
||||
//开启隐藏功能
|
||||
$('.layui-elem-field').click(function () {
|
||||
if(Number( $(this).attr('click')) >= 6){
|
||||
$("#api_extend").show();
|
||||
}else{
|
||||
let click = $(this).attr('click') ? Number($(this).attr('click')) + 1 : 0;
|
||||
$(this).attr('click',click)
|
||||
let clickCount = Number($(this).attr('click') || 0);
|
||||
if (clickCount >= 6) {
|
||||
$(".layui-hide").removeClass("layui-hide");
|
||||
} else {
|
||||
$(this).attr('click', clickCount + 1);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
if($USER_DB['UserGroup'] != 'root'){$content='您没有权限访问此页面'; require(DIR.'/templates/admin/page/404.php');exit;}
|
||||
$title='站长工具';
|
||||
session_start();
|
||||
$_SESSION['phpinfo_id'] = Get_Rand_Str(8);
|
||||
if(function_exists("opcache_reset")){
|
||||
opcache_reset(); //清理PHP缓存
|
||||
}
|
||||
@@ -18,6 +20,7 @@ require(dirname(__DIR__).'/header.php');
|
||||
<div class="layui-btn-container">
|
||||
<button type="button" class="layui-btn copy_log">复制内容</button>
|
||||
<button type="button" class="layui-btn diagnose">一键诊断</button>
|
||||
<button type="button" class="layui-btn connectivity_test">连通测试</button>
|
||||
<button type="button" class="layui-btn phpinfo">phpinfo</button>
|
||||
<?php if(preg_match('/nginx/i',$_SERVER['SERVER_SOFTWARE']) ){ ?>
|
||||
<button type="button" class="layui-btn rewrite">生成伪静态</button>
|
||||
@@ -27,8 +30,6 @@ require(dirname(__DIR__).'/header.php');
|
||||
<button type="button" class="layui-btn" layuimini-content-href="root/sys_log" data-title="系统日志">系统日志</button>
|
||||
<button type="button" class="layui-btn" layuimini-content-href="updatelog" data-title="更新日志">更新日志</button>
|
||||
<button type="button" class="layui-btn" layuimini-content-href="root/import_data" data-title="导入数据">导入数据</button>
|
||||
<button type="button" class="layui-btn" layuimini-content-href="root/mail_set" data-title="邮件配置">邮件配置</button>
|
||||
<button type="button" class="layui-btn" layuimini-content-href="root/icon_set" data-title="图标配置">图标配置</button>
|
||||
</div>
|
||||
<pre class="layui-code" id="console_log" >
|
||||
1.功能都集中在上方的按钮了,需要那个就点击那个!
|
||||
@@ -48,6 +49,7 @@ require(dirname(__DIR__).'/header.php');
|
||||
<script src = "<?php echo $libs;?>/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src = "./templates/admin/js/public.js?v=<?php echo $Ver;?>"></script>
|
||||
<script src = "<?php echo $libs?>/Other/ClipBoard.min.js"></script>
|
||||
<script src = '<?php echo $libs?>/jquery/jquery.md5.js'></script>
|
||||
<?php load_static('js');?>
|
||||
<script>
|
||||
layui.use(['layer','form','miniTab'], function () {
|
||||
@@ -75,8 +77,47 @@ layui.use(['layer','form','miniTab'], function () {
|
||||
});
|
||||
});
|
||||
|
||||
//连通测试
|
||||
$('.connectivity_test').on('click', function(){
|
||||
$("#console_log").text("");
|
||||
$("#console_log").append("浏览器UA:" + navigator.userAgent +"\n");
|
||||
$("#console_log").append("客户端时间:" + timestampToTime(Math.round(new Date() / 1000) ) +"\n");
|
||||
|
||||
var urls = [
|
||||
['主线路', 'https://update.lm21.top/connectivity_test.txt'],
|
||||
['备用线路(Gitee)', 'https://gitee.com/tznb/twonav_updata/raw/master/connectivity_test.txt']
|
||||
];
|
||||
urls.forEach(function(route) {
|
||||
var routeName = route[0];
|
||||
var url = route[1];
|
||||
$("#console_log").append("正在检测: " + routeName +"\n");
|
||||
$.ajax({
|
||||
url: get_api('read_data', 'connectivity_test'),
|
||||
type: 'POST',
|
||||
data: { url: url },
|
||||
async: false,
|
||||
success: function(data, status) {
|
||||
$("#console_log").append(data.msg + "\n");
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
$("#console_log").append(routeName + ": 请求 " + url + " 发生错误:" + errorThrown + "\n");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
//phpinfo
|
||||
$('.phpinfo').on('click', function(){
|
||||
index = layer.prompt({formType: 1,value: '',title: '输入登录密码:',shadeClose: false,"success":function(){
|
||||
$("input.layui-layer-input").on('keydown',function(e){if(e.which == 13) {echo_phpinfo();}});
|
||||
}},function(){
|
||||
echo_phpinfo()
|
||||
});
|
||||
});
|
||||
|
||||
function echo_phpinfo(){
|
||||
let p = $("input.layui-layer-input").val();
|
||||
if(p == ''){ return false;}
|
||||
layer.close(index);
|
||||
layer.open({
|
||||
title: 'phpinfo',
|
||||
type: 2,
|
||||
@@ -85,9 +126,9 @@ layui.use(['layer','form','miniTab'], function () {
|
||||
maxmin:false,
|
||||
shadeClose: true,
|
||||
area: ['100%', '100%'],
|
||||
content: get_api('read_data','phpinfo'),
|
||||
content: get_api('read_data','phpinfo')+'&p='+$.md5(p)+'&pid=<?php echo $_SESSION['phpinfo_id'] ;?>'
|
||||
});
|
||||
});
|
||||
}
|
||||
//伪静态
|
||||
$('.rewrite').on('click', function(){
|
||||
let pathname = window.location.pathname;
|
||||
|
||||
@@ -28,7 +28,7 @@ $user_groups = select_db('user_group',['id','code','name'],'');
|
||||
<div class="layui-inline layui-form" style="padding-bottom: 5px;">
|
||||
<button class="layui-btn layui-btn-normal " id="search" style="height: 36px;">搜索</button>
|
||||
</div>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ require(dirname(__DIR__).'/header.php');
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="tool">
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="layui-inline layui-form" style="padding-bottom: 5px;">
|
||||
<button class="layui-btn layui-btn-normal " id="search" style="height: 36px;">搜索</button>
|
||||
</div>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: -3px 0;"></table>
|
||||
<table id="table" class="layui-table" lay-filter="table" style="margin: 1px 0;"></table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 操作列 -->
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php $title='过渡模板';$awesome=true; require 'header.php'; ?>
|
||||
<?php $title='过渡模板';$awesome=true; require 'header.php';
|
||||
$site = unserialize(get_db('user_config','v',['uid'=>UID,'k'=>'s_site']));
|
||||
$tip = $site['link_model'] == 'Transition';
|
||||
?>
|
||||
<style type="text/css">
|
||||
.screenshot{
|
||||
width: 99%;
|
||||
@@ -15,7 +18,8 @@
|
||||
<blockquote class="layui-elem-quote layuimini-form" style="margin-top: 0px;border-left: 5px solid <?php echo $cache?"#1e9fff":($global_config['offline']?"":"#639d11") ?>;padding: 6px;">
|
||||
<span class="layui-breadcrumb" lay-separator="|">
|
||||
<a href="./index.php?c=admin&page=theme_transit&cache=no&u=<?php echo U;?>">刷新数据</a>
|
||||
<a href="javascript:;" layuimini-content-href="set_transit" data-title="设置过渡页面">设置</a>
|
||||
<a href="javascript:;" layuimini-content-href="set_transit" data-title="设置过渡页面">设置</a><?php if(!$tip){echo '
|
||||
<a href="javascript:;" layuimini-content-href="SiteSetting" data-title="站点设置">注:请将站点设置>链接模式>改为过渡页面</a>';}?>
|
||||
</span>
|
||||
</blockquote>
|
||||
<div class="layui-bg-gray" style="padding: 1px;" >
|
||||
|
||||
@@ -2,6 +2,76 @@
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main" style=" margin-left: 20px;">
|
||||
<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.30-20230713</h4>
|
||||
<ul>
|
||||
<li>[修复] 登录接口的一个错误</li>
|
||||
<li>[优化] 图标配置页面新增清除缓存按钮,优化图标拉取功能的成功率</li>
|
||||
<li>[优化] 主题设置>过渡模板,当站点设置中链接模式不为过度页面时显示提示信息</li>
|
||||
<li>[新增] 后台概要页的报表统计支持选择最近7/14/30天的统计数据 (终端记忆)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<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.29-20230705</h4>
|
||||
<ul>
|
||||
<li>[升级] Layui v2.8.3 升级到 v2.8.10</li>
|
||||
<li>[修复] 全新安装v2.0.22 - v2.0.28,未创建图标缓存表导致图标拉取失败的bug <a href="https://gitee.com/tznb/TwoNav/releases/tag/v2.0.22-20230523" target="_blank">手动修复说明</a></li>
|
||||
<li>[变更] 默认设置和站长工具中邮件配置/图标配置,移入系统设置中</li>
|
||||
<li>[新增] Token页面新增使用说明</li>
|
||||
<li>[安全] 优化安全性,站长工具>phpinfo使用时需输入密码核验,并移除Cookie相关信息!</li>
|
||||
<li>[安全] 系统设置中长度限制改为相关限制,并加入默认用户组禁止使用自定义代码的开关!默认为禁止!并在开启时提示站长存在安全隐患!</li>
|
||||
<li>[安全] 系统安装后默认禁止注册,如需开启请在系统设置>注册配置>设为开放注册</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<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.28-20230624</h4>
|
||||
<ul>
|
||||
<li>[优化] 收录管理允许用户自行设置必填项</li>
|
||||
<li>[优化] 可添加的链接类型新增wsa和vmrc</li>
|
||||
<li>[优化] 站点设置中热门网址和最新网址由下拉选项改为直接输入,范围:0-100</li>
|
||||
<li>[修复] 分类列表无法查看加密分类的bug</li>
|
||||
<li>[模板] 主页模板 WebStack-Hugo, 修复开启拖拽排序造成悬停提示失效的bug,禁止拖拽查看全部</li>
|
||||
<li>[模板] 过度模板可能无法设置的bug</li>
|
||||
<li>[新增] 链接列表添加图标显示 (仅显示自定义图标,未定义时显示ie图标)</li>
|
||||
<li>[优化] 链接列表排序由前端当前页排序改为后端全局排序</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<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.27-20230618</h4>
|
||||
<ul>
|
||||
<li>[优化] 增加在线数据冗余线路,以适应更多环境</li>
|
||||
<li>[优化] 安装时检测是否存在不属于本程序的伪静态规则,存在时提醒用户处理</li>
|
||||
<li>[优化] 安装成功提示内容添加安全配置说明</li>
|
||||
<li>[新增] 站长工具新增连通测试,用于检测是否能与资源服务器连通! </li>
|
||||
<li>[模板] 主页模板 WebStack-Hugo, 新增拖拽排序支持(默认关闭),修复使用分类个性图标时无法定位分类,优化iframe的自适应</li>
|
||||
<li>[模板] 非默认登录模板无法登录的bug</li>
|
||||
<li>[修复] 过度页停留时间设置无效的bug</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<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.26-20230611</h4>
|
||||
<ul>
|
||||
<li>[新增] 后台页面右上角新增主页图标用于返回主页</li>
|
||||
<li>[修复] 后台左侧栏收起时无法使用二级菜单</li>
|
||||
<li>[修复] 申请收录无法提交,v2.0.24更新造成</li>
|
||||
<li>[修复] 二级密码输错时提示正确密码的bug</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
|
||||
@@ -110,7 +110,7 @@ foreach ($link['url_standby'] as $key => $url_standby){
|
||||
|
||||
<?php if( empty($link['url_standby']) ) { ?>
|
||||
|
||||
<div class="spinner-border"></div> 即将打开,请稍等...
|
||||
<div class="spinner-border" style="margin-top: 16px;"></div> 即将打开,请稍等...
|
||||
<?php }else{ ?>
|
||||
<div class="alert alert-primary" style="margin-top: 16px;">
|
||||
<strong>存在备用链接,请手动点击您要打开的链接!</strong>
|
||||
|
||||
Reference in New Issue
Block a user