mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
v2.1.12-20240308
This commit is contained in:
@@ -25,11 +25,12 @@ TwoNav 是一款开源的书签(导航)管理程序,界面简洁,安装
|
|||||||
- [https://github.com/tznb1/TwoNav](https://github.com/tznb1/TwoNav)
|
- [https://github.com/tznb1/TwoNav](https://github.com/tznb1/TwoNav)
|
||||||
|
|
||||||
### 技术支持
|
### 技术支持
|
||||||
- QQ: 271152681
|
- 技术支持QQ: 271152681
|
||||||
- QQ群: 695720839
|
- 授权版QQ群: 695720839
|
||||||
|
- 免费版QQ群: 621815595
|
||||||
|
|
||||||
### 运行环境
|
### 运行环境
|
||||||
* PHP: 7.3 - 8.2
|
* PHP: 7.3 - 8.2
|
||||||
* 数据库: SQLite3 或 MySQL > 5.6.0
|
* 数据库: SQLite3 或 MySQL > 5.6.0
|
||||||
|
|
||||||
### 功能特色
|
### 功能特色
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ if($db_config['type'] == 'sqlite'){
|
|||||||
$global_config = unserialize( get_db("global_config", "v", ["k" => "o_config"]) ); //全局配置
|
$global_config = unserialize( get_db("global_config", "v", ["k" => "o_config"]) ); //全局配置
|
||||||
$c = Get('c');
|
$c = Get('c');
|
||||||
$libs = $global_config['Libs'];
|
$libs = $global_config['Libs'];
|
||||||
$layui['js'] = $libs.'/Layui/v2.9.2/layui.js';
|
$layui['js'] = $libs.'/Layui/v2.9.7/layui.js';
|
||||||
$layui['css'] = $libs.'/Layui/v2.9.2/css/layui.css';
|
$layui['css'] = $libs.'/Layui/v2.9.7/css/layui.css';
|
||||||
$global_config['static_link'] = isset($global_config['static_link']) ? $global_config['static_link'] : 0;
|
$global_config['static_link'] = isset($global_config['static_link']) ? $global_config['static_link'] : 0;
|
||||||
define('libs',$global_config['Libs']);
|
define('libs',$global_config['Libs']);
|
||||||
define('SysVer',Get_Version());
|
define('SysVer',Get_Version());
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
static/Layui/v2.9.7/css/layui.css
Normal file
1
static/Layui/v2.9.7/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.9.7/layui.js
Normal file
1
static/Layui/v2.9.7/layui.js
Normal file
File diff suppressed because one or more lines are too long
@@ -228,7 +228,7 @@ function echo_Atool(){
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>ATool 工具箱</title>
|
<title>ATool 工具箱</title>
|
||||||
<link rel="stylesheet" href="../static/Layui/v2.9.2/css/layui.css">
|
<link rel="stylesheet" href="../static/Layui/v2.9.7/css/layui.css">
|
||||||
<style>
|
<style>
|
||||||
html, body {min-width: 1200px;background-color: #fff;position: relative;}
|
html, body {min-width: 1200px;background-color: #fff;position: relative;}
|
||||||
.page-wrapper {width: 1200px;margin: 0 auto;padding: 0 15px;}
|
.page-wrapper {width: 1200px;margin: 0 auto;padding: 0 15px;}
|
||||||
@@ -280,7 +280,7 @@ function echo_Atool(){
|
|||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="del_otp" title="移除OTP登录验证">删OTP</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="del_otp" title="移除OTP登录验证">删OTP</a>
|
||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
<script src="../static/Layui/v2.9.2/layui.js"></script>
|
<script src="../static/Layui/v2.9.7/layui.js"></script>
|
||||||
<script src="../static/jquery/jquery-3.6.0.min.js"></script>
|
<script src="../static/jquery/jquery-3.6.0.min.js"></script>
|
||||||
<script src="../static/jquery/jquery.md5.js"></script>
|
<script src="../static/jquery/jquery.md5.js"></script>
|
||||||
<script src="../templates/admin/js/public.js?v=<?php echo time();?>"></script>
|
<script src="../templates/admin/js/public.js?v=<?php echo time();?>"></script>
|
||||||
@@ -417,7 +417,7 @@ function echo_verify(){ ?>
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>ATool 工具箱</title>
|
<title>ATool 工具箱</title>
|
||||||
<link rel="stylesheet" href="../static/Layui/v2.9.2/css/layui.css">
|
<link rel="stylesheet" href="../static/Layui/v2.9.7/css/layui.css">
|
||||||
<link rel="stylesheet" href="../static/Other/login.css">
|
<link rel="stylesheet" href="../static/Other/login.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -442,7 +442,7 @@ function echo_verify(){ ?>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src = "../static/jquery/jquery-3.6.0.min.js"></script>
|
<script src = "../static/jquery/jquery-3.6.0.min.js"></script>
|
||||||
<script src = "../static/Layui/v2.9.2/layui.js"></script>
|
<script src = "../static/Layui/v2.9.7/layui.js"></script>
|
||||||
<script src = '../static/jquery/jquery.md5.js'></script>
|
<script src = '../static/jquery/jquery.md5.js'></script>
|
||||||
<script>
|
<script>
|
||||||
layui.use(['form','jquery'], function () {
|
layui.use(['form','jquery'], function () {
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ function write_link(){
|
|||||||
//检测链接是否合法
|
//检测链接是否合法
|
||||||
check_link($fid,$title,$url,$_POST['url_standby']);
|
check_link($fid,$title,$url,$_POST['url_standby']);
|
||||||
//检查链接是否已存在
|
//检查链接是否已存在
|
||||||
if(get_db('user_links','lid',['uid'=>UID ,"url" => $url])){
|
if(empty(get_db('user_config','v',['uid'=>UID ,'t'=>'config','k'=>'repeat_url'])) && has_db('user_links',['uid'=>UID ,"url" => $url])){
|
||||||
msg(-1,'链接已存在!');
|
msg(-1,'链接已存在!');
|
||||||
}
|
}
|
||||||
//描述长度检测
|
//描述长度检测
|
||||||
@@ -581,7 +581,9 @@ function write_link(){
|
|||||||
msg(-1,'关键字长度不能大于'.$length_limit['l_key'].'个字节');
|
msg(-1,'关键字长度不能大于'.$length_limit['l_key'].'个字节');
|
||||||
}
|
}
|
||||||
//检查链接是否已存在
|
//检查链接是否已存在
|
||||||
if(has_db('user_links',['uid'=>UID ,'lid[!]'=>$lid, "url" => $url])){msg(-1,'链接已存在!');}
|
if(empty(get_db('user_config','v',['uid'=>UID ,'t'=>'config','k'=>'repeat_url'])) && has_db('user_links',['uid'=>UID ,'lid[!]'=>$lid, "url" => $url])){
|
||||||
|
msg(-1,'链接已存在!');
|
||||||
|
}
|
||||||
//检查链接ID是否存在
|
//检查链接ID是否存在
|
||||||
if(!has_db('user_links',['uid'=>UID ,'lid'=>$lid])){msg(-1,'链接ID不存在!');}
|
if(!has_db('user_links',['uid'=>UID ,'lid'=>$lid])){msg(-1,'链接ID不存在!');}
|
||||||
|
|
||||||
@@ -812,6 +814,7 @@ function write_site_setting(){
|
|||||||
'link_model'=>['v'=>['direct','Privacy','Privacy_js','Privacy_meta','301','302','Transition'],'msg'=>'链接模式参数错误'],
|
'link_model'=>['v'=>['direct','Privacy','Privacy_js','Privacy_meta','301','302','Transition'],'msg'=>'链接模式参数错误'],
|
||||||
'main_link_priority'=>['int'=>true,'min'=>0,'max'=>3,'msg'=>'主链优先参数错误'],
|
'main_link_priority'=>['int'=>true,'min'=>0,'max'=>3,'msg'=>'主链优先参数错误'],
|
||||||
'link_icon'=>['int'=>true,'min'=>0,'max'=>30,'msg'=>'链接图标参数错误'],
|
'link_icon'=>['int'=>true,'min'=>0,'max'=>30,'msg'=>'链接图标参数错误'],
|
||||||
|
'repeat_url'=>['int'=>true,'min'=>0,'max'=>1,'msg'=>'重复链接参数错误'],
|
||||||
'site_icon'=>['empty'=>true],
|
'site_icon'=>['empty'=>true],
|
||||||
'top_link'=>['int'=>true,'min'=>0,'max'=>100,'msg'=>'热门链接参数错误'],
|
'top_link'=>['int'=>true,'min'=>0,'max'=>100,'msg'=>'热门链接参数错误'],
|
||||||
'new_link'=>['int'=>true,'min'=>0,'max'=>100,'msg'=>'最新链接参数错误'],
|
'new_link'=>['int'=>true,'min'=>0,'max'=>100,'msg'=>'最新链接参数错误'],
|
||||||
@@ -837,6 +840,7 @@ function write_site_setting(){
|
|||||||
@unlink($site['site_icon_file']);
|
@unlink($site['site_icon_file']);
|
||||||
$s_site['site_icon_file'] = '';
|
$s_site['site_icon_file'] = '';
|
||||||
}
|
}
|
||||||
|
write_user_config('repeat_url',$_POST['repeat_url'],'config','重复链接');
|
||||||
update_db("user_config",["v"=>$s_site],["k"=>'s_site',"uid"=>UID],[1,'保存成功']);
|
update_db("user_config",["v"=>$s_site],["k"=>'s_site',"uid"=>UID],[1,'保存成功']);
|
||||||
}
|
}
|
||||||
//写过渡页配置
|
//写过渡页配置
|
||||||
@@ -1507,6 +1511,7 @@ function read_data(){
|
|||||||
$log .= in_array("hash",$ext) ? "" : "hash:不支持 (书签分享/生成注册码)\n";
|
$log .= in_array("hash",$ext) ? "" : "hash:不支持 (书签分享/生成注册码)\n";
|
||||||
$log .= in_array("session",$ext) ? "" : "session:不支持 (影响较大)\n";
|
$log .= in_array("session",$ext) ? "" : "session:不支持 (影响较大)\n";
|
||||||
$log .= in_array("intl",$ext) ? "" : "intl:不支持 (使用中文域名时可能会导致异常)\n";
|
$log .= in_array("intl",$ext) ? "" : "intl:不支持 (使用中文域名时可能会导致异常)\n";
|
||||||
|
$log .= $GLOBALS['global_config']['offline'] == '1' ? "离线模式:已开启,会导致无法更新系统/下载主题模板等\n" : "";
|
||||||
$log .= "可用模块:".implode(" ",$ext)."\n";
|
$log .= "可用模块:".implode(" ",$ext)."\n";
|
||||||
$updatadb_logs = select_db('updatadb_logs','file_name',['file_name[!]'=>'install.sql']);
|
$updatadb_logs = select_db('updatadb_logs','file_name',['file_name[!]'=>'install.sql']);
|
||||||
$log .= "数据库更新记录:".(empty($updatadb_logs)?'无':"\n".implode("\n",$updatadb_logs))."\n";
|
$log .= "数据库更新记录:".(empty($updatadb_logs)?'无':"\n".implode("\n",$updatadb_logs))."\n";
|
||||||
|
|||||||
@@ -520,6 +520,9 @@ function other_services(){
|
|||||||
}else{
|
}else{
|
||||||
$reload = true; //需要刷新
|
$reload = true; //需要刷新
|
||||||
}
|
}
|
||||||
|
if($GLOBALS['global_config']['offline'] == '1'){
|
||||||
|
msgA(['code'=>200,'message'=>"已开启离线模式,无法获取最新动态/官方公告/下载模板/更新系统等。"]);
|
||||||
|
}
|
||||||
// 判断是否刷新数据
|
// 判断是否刷新数据
|
||||||
if(!$global_config['offline'] && $reload){
|
if(!$global_config['offline'] && $reload){
|
||||||
if(is_subscribe('bool')){
|
if(is_subscribe('bool')){
|
||||||
@@ -536,6 +539,12 @@ function other_services(){
|
|||||||
$data = $new_data;
|
$data = $new_data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//时间检测
|
||||||
|
if(isset($_GET['t']) && !empty($_GET['t'])){
|
||||||
|
if (abs( time() - $_GET['t'] ) > 300) {
|
||||||
|
$data['message'] .= "<br /><span style=\"color: #ff5722;\" >检测到客户端时间与服务器时间存在较大差异<br />这会导致部分功能无法正常使用<br />请及时校对服务器或客户端时间</span>";
|
||||||
|
}
|
||||||
|
}
|
||||||
msgA($data);
|
msgA($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ if(!defined('DIR')){header('HTTP/1.1 404 Not Found');header("status: 404 Not Fou
|
|||||||
//初始化
|
//初始化
|
||||||
session_name('TwoNav_initial');
|
session_name('TwoNav_initial');
|
||||||
session_start();
|
session_start();
|
||||||
$layui['js'] = './static/Layui/v2.9.2/layui.js';
|
$layui['js'] = './static/Layui/v2.9.7/layui.js';
|
||||||
$layui['css'] = './static/Layui/v2.9.2/css/layui.css';
|
$layui['css'] = './static/Layui/v2.9.7/css/layui.css';
|
||||||
|
|
||||||
//判断请求类型
|
//判断请求类型
|
||||||
if($_SERVER['REQUEST_METHOD'] === 'POST'){
|
if($_SERVER['REQUEST_METHOD'] === 'POST'){
|
||||||
@@ -312,10 +312,10 @@ function Write_Config(){
|
|||||||
$o_config['global_header'] = '';
|
$o_config['global_header'] = '';
|
||||||
$o_config['global_footer'] = '';
|
$o_config['global_footer'] = '';
|
||||||
$o_config['api_extend'] = 0;
|
$o_config['api_extend'] = 0;
|
||||||
$o_config['apply'] = 0;
|
$o_config['apply'] = 1;
|
||||||
$o_config['guestbook'] = 0;
|
$o_config['guestbook'] = 1;
|
||||||
$o_config['link_extend'] = 0;
|
$o_config['link_extend'] = 0;
|
||||||
$o_config['article'] = 0;
|
$o_config['article'] = 1;
|
||||||
$o_config['c_name'] = 0;
|
$o_config['c_name'] = 0;
|
||||||
$o_config['c_desc'] = 0;
|
$o_config['c_desc'] = 0;
|
||||||
$o_config['l_name'] = 0;
|
$o_config['l_name'] = 0;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v2.1.11-20240119
|
v2.1.12-20240308
|
||||||
@@ -8,7 +8,7 @@ layui.use(['layer','miniTab'], function(){
|
|||||||
|
|
||||||
|
|
||||||
// 获取最新信息
|
// 获取最新信息
|
||||||
$.post(get_api('other_services','get_notice'),function(data,status){
|
$.post(get_api('other_services','get_notice') + '&t=' + Math.round(new Date() / 1000),function(data,status){
|
||||||
if(data.code == 200) {
|
if(data.code == 200) {
|
||||||
$("#new_ver a").text(data.version);
|
$("#new_ver a").text(data.version);
|
||||||
$('#notice_link').text('');
|
$('#notice_link').text('');
|
||||||
|
|||||||
@@ -73,17 +73,21 @@
|
|||||||
<option value="20" >本地服务</option>
|
<option value="20" >本地服务</option>
|
||||||
<option value="21" >本地服务(伪静态)</option>
|
<option value="21" >本地服务(伪静态)</option>
|
||||||
<option value="2" >favicon.png.pub (小图标)</option>
|
<option value="2" >favicon.png.pub (小图标)</option>
|
||||||
<!--<option value="4" >api.15777.cn</option>-->
|
|
||||||
<!--<option value="5" >favicon.cccyun.cc</option>-->
|
|
||||||
<option value="6" >api.iowen.cn</option>
|
<option value="6" >api.iowen.cn</option>
|
||||||
<!--<option value="7" >toolb.cn</option>-->
|
|
||||||
<!--<option value="8" >apis.jxcxin.cn</option>-->
|
|
||||||
<!--<option value="9" >ico.kucat.cn</option>-->
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-mid layui-word-aux">所有API接口均由其他大佬提供!若有异常请尝试更换接口!</div>
|
<div class="layui-form-mid layui-word-aux">所有API接口均由其他大佬提供!若有异常请尝试更换接口!</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">重复链接</label>
|
||||||
|
<div class="layui-input-inline" >
|
||||||
|
<select name="repeat_url" >
|
||||||
|
<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">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">最新网址</label>
|
<label class="layui-form-label">最新网址</label>
|
||||||
<div class="layui-input-inline" >
|
<div class="layui-input-inline" >
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ require 'header.php';
|
|||||||
<?php }?>
|
<?php }?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>用户交流</td>
|
<td>用户交流</td>
|
||||||
<td><a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=LaIzFK2hfTYBZGR0cKvW3xZL6aNgcSXH&jump_from=webapi&authKey=LHh1NtAiGdK0wNyoZiHWrzAZTWWq26YgAwX0Ak7rBWchh6Y5ocUX/0cCXLMXvq/k" title="TwoNav - 技术交流">QQ群:695720839</a>
|
<td><a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=dMXOVXaYcnKMVmPsqBqpeSxcszy-z4vT&jump_from=webapi&authKey=SQArXAovtNKkH4VGv2Uy6p9wITMQxtjx8W2xLxCKkw3IOwXqQ9H34k4K9o1p4DVQ" title="TwoNav - 技术交流2">QQ群:621815595</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -2,6 +2,18 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="layuimini-container">
|
<div class="layuimini-container">
|
||||||
<div class="layuimini-main" style=" margin-left: 20px;">
|
<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.1.12-20240308</h4>
|
||||||
|
<ul>
|
||||||
|
<li>[优化] 后台概要页支持时间差异较大提示,避免因时间错误导致的各种问题</li>
|
||||||
|
<li>[新增] 站点设置新增重复链接选项,解决部分用户需要添加相同链接的问题</li>
|
||||||
|
<li>[升级] Layui组件由2.9.2升级到2.9.7</li>
|
||||||
|
<li>[变更] 默认配置调整,概要页QQ群改为免费用户群(授权用户可凭授权加入会员群)</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
<li class="layui-timeline-item">
|
<li class="layui-timeline-item">
|
||||||
<i class="layui-icon layui-timeline-axis"></i>
|
<i class="layui-icon layui-timeline-axis"></i>
|
||||||
<div class="layui-timeline-content layui-text">
|
<div class="layui-timeline-content layui-text">
|
||||||
|
|||||||
Reference in New Issue
Block a user