新增分组


方式1:填写图标的URL地址,如/img/logo.pnghttp://www.xxx.com/img/logo.png
方式2:粘贴图标的SVG代码,查看教程
方式3:留空使用默认图标

注意:对链接所在的分组加密后,单独设置的链接加密将会失效
加密后只能通过输入密码访问,使用该功能先配置加密组 管理加密组

<<返回分组列表
'; } elseif ($set == 'edit') { $id = $_GET['id']; $row2 = $DB->query("select * from lylme_groups where group_id='$id' limit 1"); $row = $DB->fetch($row2); echo '

修改分组信息



方式1:填写图标的URL地址,如/img/logo.pnghttp://www.xxx.com/img/logo.png
方式2:粘贴图标的SVG代码,查看教程
方式3:留空使用默认图标

优先级:分组加密>链接加密
加密后只能通过输入密码访问,使用该功能先配置加密组 管理加密组

<<返回分组列表
'; } elseif ($set == 'add_submit') { $name = $_POST['group_name']; $icon = $_POST['group_icon']; $pwd = $_POST['group_pwd']; $group_order = $groupsrows + 1; if ($name == NULL) { echo ''; } else { $sql = "INSERT INTO `lylme_groups` (`group_id`, `group_name`, `group_icon`,`group_order`,`group_pwd`) VALUES (NULL, '" . $name . "', '" . $icon . "', '" . $group_order . "', '" . $pwd . "')"; if ($DB->query($sql)) { echo ''; exit(); } else echo ''; exit(); } echo ''; } elseif ($set == 'edit_submit') { $id = $_GET['id']; $rows2 = $DB->query("select * from lylme_groups where group_id='$id' limit 1"); $rows = $DB->fetch($rows2); if (!$rows) echo ''; $name = $_POST['group_name']; $icon = $_POST['group_icon']; $pwd = $_POST['group_pwd']; if ($name == NULL) { echo ''; } else { $sql = "UPDATE `lylme_groups` SET `group_name` = '" . $name . "', `group_icon` = '" . $icon . "',`group_pwd` = '" . $pwd . "' WHERE `lylme_groups`.`group_id` = '" . $id . "';"; if ($DB->query($sql)) echo ''; else echo ''; } } elseif ($set == 'del') { $id = $_POST['group_id']; $delsql1 = 'DELETE FROM `lylme_links` WHERE group_id =' . $id; $delsql2 = 'DELETE FROM `lylme_groups` WHERE group_id=' . $id; $DB->query($delsql1); $DB->query($delsql2); exit(); } elseif ($set == 'on') { $id = $_POST['group_id']; $sql = "UPDATE `lylme_groups` SET `group_status` = '1' WHERE `lylme_groups`.`group_id` =" . $id; $DB->query($sql); exit(); } elseif ($set == 'off') { $id = $_POST['group_id']; $sql = "UPDATE `lylme_groups` SET `group_status` = '0' WHERE `lylme_groups`.`group_id` =" . $id; $DB->query($sql); exit(); } elseif ($set == 'sort') { for ($i=0; $iquery($sql); } exit(); } // elseif ($set == 'up') { // //上移 // $id = $_GET['id']; // $order = $DB->get_row("SELECT `group_id`, `group_order` FROM `lylme_groups` WHERE `group_id` = ".$id.";")['group_order']; //当前排序 // $pl = $DB->get_row("SELECT * FROM `lylme_groups` WHERE `group_order` < ".$order." ORDER BY `lylme_groups`.`group_order` DESC LIMIT 1"); //上一行 // $DB->query("UPDATE `lylme_groups` SET `group_order` = '".$pl['group_order']."' WHERE `lylme_groups`.`group_id` = ".$id.";"); //设置为上一行的排序 // $DB->query("UPDATE `lylme_groups` SET `group_order` = '".$order."' WHERE `lylme_groups`.`group_id` = ".$pl['group_id'].";"); //设置上一行的排序为当前行 // echo ''; // exit(); // } elseif ($set == 'down') { // $id = $_GET['id']; // $order = $DB->get_row("SELECT `group_id`, `group_order` FROM `lylme_groups` WHERE `group_id` = ".$id.";")['group_order']; //当前排序 // $nl = $DB->get_row("SELECT * FROM `lylme_groups` WHERE `group_order` > ".$order." ORDER BY `lylme_groups`.`group_order` ASC LIMIT 1"); //下一行 // $DB->query("UPDATE `lylme_groups` SET `group_order` = '".$nl['group_order']."' WHERE `lylme_groups`.`group_id` = ".$id.";"); //设置为下一行的排序 // $DB->query("UPDATE `lylme_groups` SET `group_order` = '".$order."' WHERE `lylme_groups`.`group_id` = ".$nl['group_id'].";"); //设置下一行的排序为当前行 // echo ''; // exit(); // } else { ?>