mirror of
https://github.com/LyLme/lylme_spage.git
synced 2024-11-17 22:38:03 +08:00
增加 链接加密
This commit is contained in:
parent
d4942c624d
commit
788d02fe74
@ -269,7 +269,7 @@ function edit_group(mv_group) {
|
||||
action: function () {
|
||||
var group_id = this.$content.find('.group_id').val();
|
||||
if(!group_id){
|
||||
$.alert('未选择');
|
||||
$.alert('请选择要移动到的分组');
|
||||
return false;
|
||||
}
|
||||
lightyear.loading('show');
|
||||
@ -297,6 +297,51 @@ function edit_group(mv_group) {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//链接加密
|
||||
function pwd_link(pwd_list) {
|
||||
if(get_check().length == 0){
|
||||
$.alert("未选择链接");
|
||||
return false;
|
||||
}
|
||||
$.confirm({
|
||||
title: '加密链接',
|
||||
content: pwd_list,
|
||||
buttons: {
|
||||
formSubmit: {
|
||||
text: '加密',
|
||||
btnClass: 'btn-blue',
|
||||
action: function () {
|
||||
var pwd_id = this.$content.find('.pwd_id').val();
|
||||
if(!pwd_id){
|
||||
$.alert('请选择添加到的加密组');
|
||||
return false;
|
||||
}
|
||||
lightyear.loading('show');
|
||||
$.ajax({
|
||||
url:"ajax_link.php?submit=pwd_link",
|
||||
method:"POST",
|
||||
data:{links:get_check(),pwd_id:pwd_id},
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
lightyear.loading('hide');
|
||||
lightyear.notify('操作成功!', 'success', 1000);
|
||||
listTable();
|
||||
return true;
|
||||
},
|
||||
error:function(data){
|
||||
layer.msg('服务器错误');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel: {
|
||||
text: '取消'
|
||||
},
|
||||
}
|
||||
});
|
||||
};
|
||||
//点击排序(弃用)
|
||||
// function sort(id,mod,gid){
|
||||
// lightyear.loading('show');
|
||||
@ -320,6 +365,6 @@ function edit_group(mv_group) {
|
||||
$(document).on('click', '.tips', function(){
|
||||
$.alert({
|
||||
title: '提示',
|
||||
content: '在电脑端可以拖拽链接的<b>名称</b>排序,拖拽完成后点击“保存排序”即可',
|
||||
content: '<hr><h4>拖动排序</h4>在电脑端可以拖拽链接的<b>名称</b>排序,拖拽完成后点击“保存排序”即可<hr><h4>链接加密</h4>加密后的链接地址在本页面显示为<font color="#f96197">粉色</font>,以便标识,加密后链接只能在输入密码后查看',
|
||||
});
|
||||
});
|
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
$title = '网站链接管理';
|
||||
$title = '链接管理';
|
||||
include './head.php';
|
||||
$grouplists = $DB->query("SELECT * FROM `lylme_groups`");
|
||||
$pwd_lists = $DB->query("SELECT * FROM `lylme_pwd`");
|
||||
?>
|
||||
<main class="lyear-layout-content">
|
||||
|
||||
@ -133,14 +134,11 @@ if ($set == 'add') {
|
||||
// else echo '<script>alert("删除失败!");history.go(-1);</script>';
|
||||
} else {
|
||||
echo '<div id="listTable"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
';
|
||||
|
||||
@ -156,7 +154,10 @@ include './footer.php';
|
||||
<script type="text/javascript" src="js/lightyear.js"></script>
|
||||
<script type="text/javascript" src="js/link.js"></script>
|
||||
<script type="text/javascript">
|
||||
var mv_group ='<form action="" class="formName">' + '<select class="form-control group_id" required>'+'<?php while ($grouplist = $DB->fetch($grouplists)) {
|
||||
if ($grouplist["group_id"] == $row['group_id']) { $select = 'selected="selected"';} else {$select = '';}
|
||||
//分组移动
|
||||
var mv_group ='<form action="" class="formName">' + '<select class="form-control group_id" required><option value="">请选择分组...</option>'+'<?php while ($grouplist = $DB->fetch($grouplists)) {
|
||||
echo '<option value="' . $grouplist["group_id"] . '">' . $grouplist["group_id"] . ' - ' . $grouplist["group_name"] . '</option>';}?>'+ '</select>';
|
||||
//链接加密
|
||||
var pwd_list = '<form action="" class="formName">' + '<select class="form-control pwd_id" required>'+'<?php while ($pwd_list = $DB->fetch($pwd_lists)) {
|
||||
echo '<option value="' . $pwd_list["pwd_id"] . '">' . $pwd_list["pwd_id"] . ' - ' . $pwd_list["pwd_name"] . '</option>';}?>'+ '<option value="0">0 - 取消加密</option></select><br><a href="./pwd.php" target="_blank">管理加密组</a>';
|
||||
</script>
|
@ -30,6 +30,8 @@ while ($group = $DB->fetch($groups)) {
|
||||
<label><i class="mdi mdi-window-close" aria-hidden="true"></i></label>删除</button>
|
||||
<button id="edit_group" type="button" class="btn btn-info btn-label" onclick="edit_group(mv_group)">
|
||||
<label><i class="mdi mdi-account-edit" aria-hidden="true"></i></label>移动</button>
|
||||
<button id="btn_delete" type="button" class="btn btn btn-pink btn-label" onclick="pwd_link(pwd_list)">
|
||||
<label><i class="mdi mdi-key-variant" aria-hidden="true"></i></label>加密</button>
|
||||
<button class="btn btn-label btn btn-purple" id="save_order" style="display:none" onclick="save_order()">
|
||||
<label><i class="mdi mdi-checkbox-marked-circle-outline"></i></label> 保存排序</button>
|
||||
</div>
|
||||
@ -51,9 +53,10 @@ while ($group = $DB->fetch($groups)) {
|
||||
<a class="btn btn-primary btn-xs sort-up" data-toggle="tooltip" data-placement="top" title="移到上一行"><i class="mdi mdi-arrow-up"></i></a>
|
||||
<a class="btn btn-cyan btn-xs sort-down" data-toggle="tooltip" data-placement="top" title="移到下一行"><i class="mdi mdi-arrow-down"></i></a></td>
|
||||
<!-- 链接排序 E -->
|
||||
<td class="lylme">' . $res['name'] . '</td><td>' . $res['url'] . '</td><td>';
|
||||
echo $DB->fetch($DB->query("SELECT * FROM `lylme_groups` WHERE `group_id` = " . $res['group_id'])) ["group_name"];
|
||||
echo '</td>
|
||||
<td class="lylme">' . $res['name'] . '</td><td>';
|
||||
if(empty($res['link_pwd'])){ echo $res['url'];}else{echo '<font color="#f96197">'. $res['url'] .'</font>';}
|
||||
echo
|
||||
'</td><td>'. $DB->fetch($DB->query("SELECT * FROM `lylme_groups` WHERE `group_id` = " . $res['group_id'])) ["group_name"]. '</td>
|
||||
<td>';
|
||||
if($res['link_status']=="0"){ echo '<font color="red">禁用</font>';}else{echo '<font color="green">启用</font>';}
|
||||
$de_llink = "del_link('".$res['id']."')";
|
||||
|
Loading…
Reference in New Issue
Block a user