mirror of
https://github.com/tznb1/TwoNav.git
synced 2025-08-10 08:51:49 +00:00
Compare commits
2 Commits
v2.0.08-20
...
v2.0.10-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1f4530ded | ||
|
|
c65ca9225c |
@@ -846,6 +846,9 @@ function write_site_setting(){
|
||||
'link_model'=>['v'=>['direct','Privacy','Privacy_js','Privacy_meta','301','302','Transition'],'msg'=>'链接模式参数错误'],
|
||||
'link_icon'=>['int'=>true,'min'=>0,'max'=>6,'msg'=>'链接图标参数错误'],
|
||||
'site_icon'=>['empty'=>true],
|
||||
'top_link'=>['int'=>true,'min'=>0,'max'=>20,'msg'=>'热门链接参数错误'],
|
||||
'new_link'=>['int'=>true,'min'=>0,'max'=>20,'msg'=>'最新链接参数错误'],
|
||||
'max_link'=>['int'=>true,'min'=>0,'max'=>100,'msg'=>'输出上限参数错误'],
|
||||
'custom_header'=>['empty'=>true],
|
||||
'custom_footer'=>['empty'=>true]
|
||||
];
|
||||
@@ -865,6 +868,7 @@ function write_site_setting(){
|
||||
//留空时尝试删除图标
|
||||
if(empty($s_site['site_icon']) && !empty($site['site_icon_file']) && is_file($site['site_icon_file'])){
|
||||
@unlink($site['site_icon_file']);
|
||||
$s_site['site_icon_file'] = '';
|
||||
}
|
||||
update_db("user_config",["v"=>$s_site],["k"=>'s_site',"uid"=>UID],[1,'保存成功']);
|
||||
}
|
||||
|
||||
@@ -25,13 +25,15 @@ function other_upsys(){
|
||||
if(!preg_match('/^v.+-(\d{8})$/i',SysVer,$matches)){
|
||||
msg(-1,"获取程序版本异常");
|
||||
}
|
||||
if (!is_dir('./data/temp')) mkdir('./data/temp',0755,true) or msg(-1,'下载失败,创建临时[/data/temp]目录失败');
|
||||
//检查指定文件夹是否可写
|
||||
$paths = ["./","./data","./static","./system","./templates"];
|
||||
$paths = ["./","./data","./data/temp","./static","./system","./templates"];
|
||||
foreach($paths as $path){
|
||||
if(!is_writable($path)){
|
||||
msg(-1,"文件夹不可写 >> $path");
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['upsys']['sysver'] = intval($matches[1]);
|
||||
usleep(1000*300); //延迟300毫秒
|
||||
msg(1,'success');
|
||||
@@ -420,6 +422,9 @@ function write_regcode(){
|
||||
}elseif($_GET['type'] == 'set'){
|
||||
write_global_config('reg_tips',$_POST['content'],'注册提示');
|
||||
msg(1,'保存成功');
|
||||
}elseif($_GET['type'] == 'del'){
|
||||
delete_db("regcode_list",[ "id" => json_decode($_POST['id'])]);
|
||||
msg(1,'删除成功');
|
||||
}
|
||||
|
||||
msg(-1,'无效的请求类型');
|
||||
|
||||
@@ -50,7 +50,7 @@ $theme_config_db = unserialize($theme_config_db);
|
||||
$theme_config = empty($theme_config_db) ? $theme_config : array_merge ($theme_config,$theme_config_db);
|
||||
//主题版本(调试时追加时间戳)
|
||||
$theme_ver = !Debug?$theme_info['version']:$theme_info['version'].'.'.time();
|
||||
|
||||
$site['ex_theme'] = in_array($theme,['snail-nav','heimdall']); //例外主题,不支持热门网址/最新网址/输出上限
|
||||
//分类查找条件
|
||||
$categorys = []; //声明一个空数组
|
||||
$content = ['cid(id)','name','property','font_icon','icon','description'];//需要的内容
|
||||
@@ -92,7 +92,7 @@ function get_category_sub($id) {
|
||||
|
||||
//根据分类id查找链接
|
||||
function get_links($fid) {
|
||||
global $site,$fid_s,$share,$data;
|
||||
global $site,$fid_s,$share,$data,$u;
|
||||
$where = [];
|
||||
$where = ["uid"=> UID];
|
||||
$where['fid'] = intval($fid);
|
||||
@@ -111,8 +111,24 @@ function get_links($fid) {
|
||||
$where['lid'] = $data;
|
||||
unset($where['fid']);
|
||||
}
|
||||
|
||||
if($fid == 'top_link'){
|
||||
unset($where['fid']);
|
||||
unset($where['ORDER']);
|
||||
$where['ORDER']['click'] = 'DESC';
|
||||
$where['ORDER']['lid'] = 'DESC';
|
||||
$where['LIMIT'] = $site['top_link'];
|
||||
}elseif($fid == 'new_link'){
|
||||
unset($where['fid']);
|
||||
unset($where['ORDER']);
|
||||
$where['ORDER']['add_time'] = 'DESC';
|
||||
$where['ORDER']['lid'] = 'DESC';
|
||||
$where['LIMIT'] = $site['new_link'];
|
||||
}elseif($site['max_link'] > 0 && empty(Get('oc')) && !$site['ex_theme']){
|
||||
$count = count_db('user_links',$where);
|
||||
$where['LIMIT'] = $site['max_link'];
|
||||
}
|
||||
$links = select_db('user_links',['lid(id)','fid','property','title','url(real_url)','url_standby','description','icon','click','pid'],$where);
|
||||
//var_dump($fid_s);exit;
|
||||
foreach ($links as $key => $link) {
|
||||
$click = false; $lock = false;
|
||||
|
||||
@@ -147,6 +163,11 @@ function get_links($fid) {
|
||||
//获取图标链接
|
||||
$links[$key]['ico'] = $lock ? $GLOBALS['libs'].'/Other/lock.svg' : geticourl($site['link_icon'],$link);
|
||||
}
|
||||
if($site['max_link'] > 0 && $count > $site['max_link'] && empty(Get('oc')) && !$site['ex_theme']){
|
||||
$oc_url = "./index.php?u={$u}&oc={$fid}" . (empty($_GET['theme']) ? '':"&theme={$_GET['theme']}");
|
||||
array_push($links,['id'=>0,'title'=>'查看全部','url'=>$oc_url,'real_url'=>$oc_url,'description'=>'该分类共有'.$count.'条数据','ico'=>'./favicon.ico']);
|
||||
}
|
||||
|
||||
return $links;
|
||||
}
|
||||
|
||||
@@ -204,6 +225,27 @@ if($category_parent == []){
|
||||
$categorys = array_merge ($categorys,$category_subitem);
|
||||
}
|
||||
}
|
||||
|
||||
if(empty(Get('oc'))){
|
||||
//热门链接
|
||||
if($site['top_link'] > 0 && !$site['ex_theme']){
|
||||
$top_link = ['name' => "热门网址","font_icon" =>"fa fa-bookmark-o" , "id" => 'top_link' ,"description" => ""];
|
||||
array_unshift($category_parent,$top_link);
|
||||
array_unshift($categorys,$top_link);
|
||||
}
|
||||
//最新链接
|
||||
if($site['new_link'] > 0 && !$site['ex_theme']){
|
||||
$new_link = ['name' => "最新网址","font_icon" =>"fa fa-bookmark-o" , "id" => 'new_link' ,"description" => ""];
|
||||
array_unshift($category_parent,$new_link);
|
||||
array_unshift($categorys,$new_link);
|
||||
}
|
||||
}elseif(!$site['ex_theme']){
|
||||
unset($where['fid']);
|
||||
$where['cid'] = Get('oc');
|
||||
$categorys = select_db('user_categorys',$content,$where);
|
||||
$category_parent = $categorys;
|
||||
}
|
||||
|
||||
//访问统计
|
||||
write_user_count(date('Ym'),'index_Ym');
|
||||
write_user_count(date('Ymd'),'index_Ymd');
|
||||
|
||||
@@ -230,8 +230,8 @@ function echo_category($property = false){
|
||||
function echo_pwds(){
|
||||
$where["uid"] = UID;
|
||||
$where['ORDER']['pid'] = 'ASC';
|
||||
foreach (select_db('user_pwd_group',['pid','name'],$where) as $data) {
|
||||
echo "<option value=\"{$data['pid']}\">{$data['name']}</option>";
|
||||
foreach (select_db('user_pwd_group',['pid','name','password'],$where) as $data) {
|
||||
echo "<option value=\"{$data['pid']}\">{$data['name']} | 密码 [{$data['password']}]</option>";
|
||||
}
|
||||
}
|
||||
//检查链接
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.0.08-20230406
|
||||
v2.0.10-20230413
|
||||
@@ -10,23 +10,6 @@ body {
|
||||
width: 190px;
|
||||
}
|
||||
|
||||
/*手机端适配*/
|
||||
@media screen and (max-width: 768px) {
|
||||
.layui-form-mid {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item .layui-input-inline {
|
||||
margin-right: 0px;
|
||||
width: calc(100% - 110px);
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 450px){
|
||||
.layui-form-item .layui-input-inline+.layui-form-mid {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.layuimini-container {
|
||||
border: 1px solid #f2f2f2;
|
||||
border-radius: 5px;
|
||||
@@ -91,4 +74,40 @@ body {
|
||||
|
||||
.layui-table-tool-temp{
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
|
||||
/*手机端适配*/
|
||||
@media screen and (max-width: 768px) {
|
||||
.layui-form-mid {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item .layui-input-inline {
|
||||
margin-right: 0px;
|
||||
width: calc(100% - 110px);
|
||||
}
|
||||
/*手机端表单调整230410*/
|
||||
.layui-form-label{
|
||||
width: 60px;
|
||||
padding: 9px 9px;
|
||||
}
|
||||
.layui-input-block{
|
||||
margin-left: 85px;
|
||||
}
|
||||
/*隐藏描述*/
|
||||
.layui-form-mid{
|
||||
display:none
|
||||
}
|
||||
/*边距*/
|
||||
.layuimini-main {
|
||||
margin: 10px 5px 10px 0px;
|
||||
}
|
||||
.layui-form-item{
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 450px){
|
||||
.layui-form-item .layui-input-inline+.layui-form-mid {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
@@ -80,20 +80,6 @@
|
||||
$("#fid").append("<option value=\""+res.data[i].cid+"\">"+res.data[i].name+"</option>");
|
||||
}
|
||||
}
|
||||
//加载加密分组数据
|
||||
$.post(get_api('read_pwd_group_list'),{'page':'1','limit':'9999'},function(data,status){
|
||||
if(data.code == 1){
|
||||
pwds = [];
|
||||
$("#pwd_id").empty();
|
||||
$("#pwd_id").append("<option value=\"0\">无</option>");
|
||||
for(var i =0;i<data.count;i++){
|
||||
pwds['pid_'+data.data[i].pid] = {'pwd':data.data[i].password,'name':data.data[i].name};
|
||||
$("#pwd_id").append("<option value=\""+data.data[i].pid+"\">"+data.data[i].name+" | 密码 [" + data.data[i].password +"]</option>");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
layui.form.render("select");//重新渲染下拉框
|
||||
limit = false; //取消修改限制
|
||||
layer.closeAll('loading'); //关闭加载层
|
||||
}
|
||||
|
||||
@@ -248,18 +248,6 @@ layui.use(['form','table','dropdown','miniTab'], function () {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
}else if(event === 'generate'){ //生成大量链接
|
||||
if($('#fid').val() == 0 ){
|
||||
layer.msg("请选择一个分类",{icon:3});
|
||||
return;
|
||||
}
|
||||
var fid = $('#fid').val();
|
||||
for (i = 0; i < 1000; i++) {
|
||||
$.post(get_api('write_link','add'),{title:'百度翻译'+i,fid:fid,url:'https://fanyi.baidu.com/#zh/en/'+i+'_'+randomString(5)},function(data,status){
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -67,6 +67,42 @@
|
||||
<div class="layui-form-mid layui-word-aux">所有API接口均由其他大佬提供!若有异常请尝试更换接口!</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<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>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">在主页显示热门网址(点击排行)</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<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>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">在主页显示最新的网址(创建时间)</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">输出上限</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="number" name="max_link" class="layui-input" value="0" placeholder="输入范围: 0-100" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">限制每个分类下显示多少链接,0表示不限制</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">站点图标</label>
|
||||
<div class="layui-input-block">
|
||||
@@ -97,14 +133,18 @@
|
||||
<?php } ?>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn layui-btn-primary layui-border-black" id="help" sort_id="7968924">帮助</button>
|
||||
<?php if($global_config['Default_User'] != U ){ ?>
|
||||
<button class="layui-btn layui-btn-primary layui-border-black" id="sdhp" data=>设为默认主页</button>
|
||||
<?php } ?>
|
||||
<button class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<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;?>/jquery/jquery-3.6.0.min.js"></script>
|
||||
<script src="<?php echo $libs;?>/jquery/jQueryCookie.js"></script>
|
||||
<script src="./templates/admin/js/public.js?v=<?php echo $Ver;?>"></script>
|
||||
<?php load_static('js.layui');?>
|
||||
<script>
|
||||
layui.use(['jquery','form','upload'], function () {
|
||||
@@ -136,6 +176,18 @@ layui.use(['jquery','form','upload'], function () {
|
||||
layer.msg("权限不足", {icon: 2});
|
||||
});
|
||||
|
||||
$("#sdhp").text( getCookie("Default_User") == u ? '取消默认主页' : '设为默认主页')
|
||||
$('#sdhp').click(function () {
|
||||
if(getCookie("Default_User") == u){
|
||||
$.removeCookie("Default_User");
|
||||
$("#sdhp").text('设为默认主页')
|
||||
}else{
|
||||
$.cookie("Default_User",u);
|
||||
$("#sdhp").text('取消默认主页')
|
||||
}
|
||||
layer.msg("设置成功", {icon: 1});
|
||||
return false;
|
||||
});
|
||||
//监听提交
|
||||
form.on('submit(save)', function (data) {
|
||||
$.post('./index.php?c=api&method=write_site_setting&u='+u,data.field,function(data,status){
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<label class="layui-form-label required">所属分类</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="fid" id="fid" lay-verify="required">
|
||||
<option value=""></option><?php echo_category(true); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<div class="layui-input-block">
|
||||
<select name="pwd_id" id="pwd_id">
|
||||
<option value="0">无</option>
|
||||
<?php echo_pwds(); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
$title='概况';
|
||||
$awesome=true;
|
||||
$HOST = getindexurl();
|
||||
|
||||
|
||||
//读取缓存数据
|
||||
$Notice = get_db('global_config','v',['k'=>'notice']);
|
||||
@@ -252,20 +250,21 @@ require 'header.php';
|
||||
<?php }?>
|
||||
<tr>
|
||||
<td>用户交流</td>
|
||||
<td>QQ群:695720839</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>技术支持</td>
|
||||
<td>QQ:271152681</td>
|
||||
<td><a target="_blank" href="tencent://message/?uin=271152681">QQ:271152681</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>专属地址</td>
|
||||
<td>
|
||||
<a href="<?php echo $HOST.'?u='.U;?>" target="_blank">我的主页</a>
|
||||
<a href="<?php echo './?u='.U;?>" target="_blank">我的主页</a>
|
||||
|
||||
<a href="<?php echo $HOST.'?c='.$USER_DB['Login'].'&u='.U;?>" target="_blank">TwoNav - 登录</a>
|
||||
<a href="<?php echo './?c='.$USER_DB['Login'].'&u='.U;?>" target="_blank">TwoNav - 登录</a>
|
||||
|
||||
<i class="fa fa-arrow-left layui-hide-xs" style="color: #ff5722;"> <span style="color: #ff5722;" title="收藏专属入口可避免出现无法登录后台的情况">建议收藏</span></i>
|
||||
<i class="fa fa-arrow-left layui-hide-xs" style="color: #ff5722;"> <span style="color: #ff5722;" title="收藏专属入口可避免无法登录后台的情况">建议收藏</span></i>
|
||||
</td>
|
||||
<tr>
|
||||
</tbody>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:11px;font-weight:700;color:#fff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#777;border-radius:10px}
|
||||
</style>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main" style=" margin-left: 0px; ">
|
||||
<div class="layuimini-main">
|
||||
<form class="layui-form layuimini-form" lay-filter="form">
|
||||
|
||||
<div class="layui-form-item">
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal layui-hide-xs" lay-event="batch_disable" id="batch_disable">设为禁用</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal layui-btn-danger layui-hide-xs" lay-event="testing" id="testing" <?php echo $global_config['offline']?'style="display:none;"':''?> >检测</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal layui-btn-danger" layuimini-content-href="link_sort" data-title="链接排序">排序模式</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal layui-btn-danger layui-hide-xs" lay-event="generate" id="generate">生成</button>
|
||||
</div>
|
||||
</script>
|
||||
<script src = "<?php echo $libs;?>/jquery/jquery-3.6.0.min.js"></script>
|
||||
|
||||
@@ -16,6 +16,7 @@ $user_groups = select_db('user_group',['id','code','name'],'');
|
||||
<script type="text/html" id="toolbar">
|
||||
<div class="layui-btn-group" >
|
||||
<button class="layui-btn layui-btn-sm" lay-event="generate">生成注册码</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del">删除</button>
|
||||
<button class="layui-btn layui-btn-sm" lay-event="refresh">刷新</button>
|
||||
<button class="layui-btn layui-btn-sm" lay-event="set">设置</button>
|
||||
</div>
|
||||
@@ -71,7 +72,7 @@ $user_groups = select_db('user_group',['id','code','name'],'');
|
||||
<script src = "./templates/admin/js/public.js?v=<?php echo $Ver;?>"></script>
|
||||
<?php load_static('js');?>
|
||||
<script>
|
||||
var host = '<?php echo getindexurl().'?c='.$global_config['Register']."&key=";?>';
|
||||
var host = Get_baseUrl() + '<?php echo 'index.php?c='.$global_config['Register']."&key=";?>';
|
||||
|
||||
layui.use(['table','layer','form'], function(){
|
||||
var table = layui.table;
|
||||
@@ -81,7 +82,8 @@ layui.use(['table','layer','form'], function(){
|
||||
|
||||
|
||||
var cols=[[ //表头
|
||||
{field:'id',title:'id',width:80,sort:true}
|
||||
{type:'checkbox'}
|
||||
,{field:'id',title:'id',width:80,sort:true}
|
||||
,{field:'regcode',title:'注册码',width:120,sort:true}
|
||||
,{field:'UserGroupName',title:'用户组',width:120,sort:true}
|
||||
,{field:'url',title:'注册链接',minWidth:400,sort:true,templet:function(d){
|
||||
@@ -152,6 +154,25 @@ layui.use(['table','layer','form'], function(){
|
||||
content: $('.Set')
|
||||
});
|
||||
break;
|
||||
case 'del':
|
||||
if( checkStatus.data.length == 0 && ['LAYTABLE_COLS','LAYTABLE_EXPORT','LAYTABLE_PRINT'].indexOf(obj.event) == -1 ) {
|
||||
layer.msg('未选中任何数据!');
|
||||
return;
|
||||
}
|
||||
layer.confirm('确认删除?',{icon: 3, title:'温馨提示'}, function(index){
|
||||
tableIds = checkStatus.data.map(function (value) {return value.id;});
|
||||
tableIds = JSON.stringify(tableIds);
|
||||
$.post(get_api('write_regcode','del') ,{"id":tableIds},function(data,status){
|
||||
if(data.code == 1){
|
||||
table.reload('table');
|
||||
layer.msg(data.msg, {icon: 1});
|
||||
}else{
|
||||
layer.msg(data.msg, {icon: 5});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
//自定义表单验证
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<?php
|
||||
if($USER_DB['UserGroup'] != 'root'){$content='您没有权限访问此页面'; require(DIR.'/templates/admin/page/404.php');exit;}
|
||||
$title='授权管理';require(dirname(__DIR__).'/header.php');
|
||||
$subscribe = unserialize(get_db('global_config','v',["k" => "s_subscribe"])); ?>
|
||||
$subscribe = unserialize(get_db('global_config','v',["k" => "s_subscribe"]));
|
||||
$HTTP_HOST = preg_replace('/:\d+$/','',$_SERVER['HTTP_HOST']); //去除端口号
|
||||
?>
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
@@ -12,8 +14,7 @@ $subscribe = unserialize(get_db('global_config','v',["k" => "s_subscribe"])); ?>
|
||||
<li>3. 授权未绑定邮箱时邮箱留空,已绑定时请输入正确邮箱</li>
|
||||
<li>4. 如有其他疑问联系技术支持</li>
|
||||
</blockquote>
|
||||
|
||||
<h3 style = "margin-bottom:1em;">当前域名:<font color="red"><?php echo $_SERVER['HTTP_HOST']; ?></font> (订阅时填写)</h3>
|
||||
<h3 style = "margin-bottom:1em;">当前域名:<font color="red"><?php echo $HTTP_HOST; ?></font> (订阅时填写)</h3>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
@@ -32,7 +33,7 @@ $subscribe = unserialize(get_db('global_config','v',["k" => "s_subscribe"])); ?>
|
||||
<div class="layui-form-item" style = "display:none;">
|
||||
<label class="layui-form-label">域名</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" name="domain" id ="domain" value="<?php echo $_SERVER['HTTP_HOST']; ?>" autocomplete="off" placeholder="网站域名" class="layui-input">
|
||||
<input type="text" name="domain" id ="domain" value="<?php echo $HTTP_HOST; ?>" autocomplete="off" placeholder="网站域名" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,6 +2,32 @@
|
||||
<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.10-20230413</h4>
|
||||
<ul>
|
||||
<li>支持删除注册管理生成的注册码</li>
|
||||
<li>站点设置增加设为默认用户按钮(储存在浏览器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.09-20230410</h4>
|
||||
<ul>
|
||||
<li>优化兼容性/细节调整</li>
|
||||
<li>放宽授权验证规则</li>
|
||||
<li>修复前端调用添加链接页面没有分类的bug</li>
|
||||
<li>修复默认主题删除链接提示ID不存在的bug</li>
|
||||
<li>修复下载更新时temp目录不存在时未自动创建导致下载失败的bug</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">
|
||||
|
||||
@@ -46,7 +46,7 @@ var menu = {
|
||||
link_id = link_id.replace('id_','');
|
||||
mdui.confirm('确认删除?'
|
||||
,function(){
|
||||
$.post(get_api('write_link','del'),{id:link_id},function(data,status){
|
||||
$.post(get_api('write_link','del'),{lid:link_id},function(data,status){
|
||||
if(data.code == 1) {
|
||||
$("#id_" + link_id).remove();
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user