From d1ab533b0242f6fff97abb93b671466ee6b9ee09 Mon Sep 17 00:00:00 2001 From: LyLme Date: Sat, 21 May 2022 13:33:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=A0=E5=AF=86=E5=92=8C?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/group.php | 6 +++--- admin/js/link.js | 8 +++++++- admin/link.php | 7 ++++--- admin/table_link.php | 15 ++++++++++++--- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/admin/group.php b/admin/group.php index 703f950..a66404a 100644 --- a/admin/group.php +++ b/admin/group.php @@ -34,7 +34,7 @@ while ($pwd_list = $DB->fetch($pwd_lists)) { } echo ' -优先级:分组加密>链接加密
+注意:对链接所在的分组加密后,单独设置的链接加密将会失效
加密后只能通过输入密码访问,使用该功能先配置加密组 管理加密组
@@ -66,13 +66,13 @@ echo ' -优先级:分组加密>链接加密
+优先级:链接加密>分组加密
加密后只能通过输入密码访问,使用该功能先配置加密组 管理加密组
diff --git a/admin/js/link.js b/admin/js/link.js index bbcf1ea..4f5c0d2 100644 --- a/admin/js/link.js +++ b/admin/js/link.js @@ -362,9 +362,15 @@ function pwd_link(pwd_list) { // } // }); // } +function pwd_links(){ + $.alert({ + title: '分组已加密', + content: '当前分组已设置为加密,若想单独设置链接加密,请先删除该分组的加密', +}); +} $(document).on('click', '.tips', function(){ $.alert({ title: '提示', - content: '

拖动排序

在电脑端可以拖拽链接的名称排序,拖拽完成后点击“保存排序”即可

链接加密

加密后的链接地址在本页面显示为粉色,以便标识,加密后链接只能在输入密码后查看', + content: '

拖动排序

  • 在电脑端可以拖拽链接的名称进行排序,拖拽完成后点击“保存排序”即可生效

  • 链接加密

  • 加密后的链接地址在本页面显示为粉色,以便标识
  • 加密分组后该分组下的链接使用加密分组的密码查看,链接的原单独设置的加密将失效,删除分组的加密后即可恢复
  • 加密后链接只能使用密码登录后方可查看
  • ', }); }); \ No newline at end of file diff --git a/admin/link.php b/admin/link.php index df97f79..d40cca0 100644 --- a/admin/link.php +++ b/admin/link.php @@ -93,7 +93,7 @@ if ($set == 'add') { echo '
    -
    +
    -优先级:分组加密>链接加密
    +注意:对链接所在的分组加密后,单独设置的链接加密将会失效
    加密后只能通过输入密码访问,使用该功能先配置加密组 管理加密组
    @@ -139,7 +139,8 @@ echo ' if ($name == NULL or $url == NULL) { echo ''; } else { - $sql = "UPDATE `lylme_links` SET `name` = '" . $name . "', `url` = '" . $url . "', `icon` = '" . $icon . "', `group_id` = '" . $group_id . "', `link_pwd` = '" . $link_pwd . "' WHERE `lylme_links`.`id` = '" . $id . "';"; + $sql = "UPDATE `lylme_links` SET `name` = '" . $name . "', `url` = '" . $url . "', `icon` = '" . $icon . "', `group_id` = '" . $group_id . "', `link_pwd` = " . $link_pwd . " WHERE `lylme_links`.`id` = '" . $id . "';"; + // exit($sql); if ($DB->query($sql)) echo ''; else echo ''; } diff --git a/admin/table_link.php b/admin/table_link.php index 97f209a..7421a9d 100644 --- a/admin/table_link.php +++ b/admin/table_link.php @@ -5,6 +5,7 @@ if(isset($islogin)==1) { $page = isset($_GET['page'])? $_GET['page'] : 1; $groups = $DB->query("SELECT * FROM `lylme_groups` ORDER BY `group_order` ASC"); //获取分组 + $gpwd = $DB->fetch($DB->query("SELECT `group_id`, `group_pwd` FROM `lylme_groups` WHERE `group_id` = ".$page))["group_pwd"]; //分组加密状态 $rs = $DB->query("SELECT * FROM `lylme_links` WHERE `group_id` = ".$page." ORDER BY `lylme_links`.`id` ASC"); //获取链接 $grouprows=$DB->num_rows($rs); echo '
    系统收录: ' . $linksrows . ' 个链接 / 当前分组: '.$grouprows.'个链接 @@ -30,8 +31,16 @@ while ($group = $DB->fetch($groups)) { 删除 - + '; + if(empty($gpwd)){ + echo ''; + } + else{ + echo ''; + } + echo '
    @@ -54,7 +63,7 @@ while ($group = $DB->fetch($groups)) { ' . $res['name'] . ''; - if(empty($res['link_pwd'])){ echo $res['url'];}else{echo ''. $res['url'] .'';} + if(!empty($res['link_pwd'])||!empty($gpwd)){ echo ''. $res['url'] .'';}else{echo $res['url'];} echo ''. $DB->fetch($DB->query("SELECT * FROM `lylme_groups` WHERE `group_id` = " . $res['group_id'])) ["group_name"]. ' ';