query("SELECT * FROM `lylme_groups`"); ?>
新增链接



方式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_links where 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['name']; $url = $_POST['url']; $icon = $_POST['icon']; $group_id = $_POST['group_id']; $link_order = $linksrows + 1; if ($name == NULL or $url == NULL) { echo ''; } else { $sql = "INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `PS`,`link_order`) VALUES (NULL, '" . $name . "', '" . $group_id . "', '" . $url . "', '" . $icon . "', '" . $name . "', '" . $link_order . "');"; if ($DB->query($sql)) { echo ''; } else echo ''; } } elseif ($set == 'edit_submit') { $id = $_GET['id']; $rows2 = $DB->query("select * from lylme_links where id='$id' limit 1"); $rows = $DB->fetch($rows2); if (!$rows) echo ''; $name = $_POST['name']; $url = $_POST['url']; $icon = $_POST['icon']; $group_id = $_POST['group_id']; if ($name == NULL or $url == NULL) { echo ''; } else { $sql = "UPDATE `lylme_links` SET `name` = '" . $name . "', `url` = '" . $url . "', `icon` = '" . $icon . "', `group_id` = '" . $group_id . "' WHERE `lylme_links`.`id` = '" . $id . "';"; if ($DB->query($sql)) echo ''; else echo ''; } } elseif ($set == 'delete') { $id = $_GET['id']; $sql = "DELETE FROM lylme_links WHERE id='$id'"; if ($DB->query($sql)) echo ''; else echo ''; } else { echo '
系统共有 ' . $linksrows . ' 个链接
新增链接
'; $i = 0; $rs = $DB->query("SELECT * FROM `lylme_links` ORDER BY `lylme_links`.`id` ASC"); while ($res = $DB->fetch($rs)) { $i = $i + 1; echo ''; } ?>
序号名称链接分组操作
' . $i . '' . $res['name'] . '' . $res['url'] . ''; echo $DB->fetch($DB->query("SELECT * FROM `lylme_groups` WHERE `group_id` = " . $res['group_id'])) ["group_name"]; echo '编辑 删除