num_rows($DB->query("SELECT * FROM `lylme_tags`")); ?>
新增导航菜单链接




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

修改导航菜单链接





<<返回
'; } elseif ($set == 'add_submit') { $name = $_POST['name']; $link = $_POST['link']; if ($_POST['target'] == true) { $target = 1; } else { $target = 0; } if ($name == NULL or $link == NULL) { echo ''; } else { $sql = "INSERT INTO `lylme_tags` (`tag_id`, `tag_name`, `tag_link`, `tag_target`) VALUES (NULL, '" . $name . "', '" . $link . "', '" . $target . "');"; if ($DB->query($sql)) { echo ''; } else echo ''; } } elseif ($set == 'edit_submit') { $id = $_GET['id']; $rows2 = $DB->query("select * from lylme_tags where tag_id='$id' limit 1"); $rows = $DB->fetch($rows2); if (!$rows) echo ''; $name = $_POST['name']; $link = $_POST['link']; if ($_POST['target'] == true) { $target = 1; } else { $target = 0; } if ($name == NULL or $link == NULL) { echo ''; } else { $sql = "UPDATE `lylme_tags` SET `tag_name` = '" . $name . "', `tag_link` = '" . $link . "', `tag_target` = '" . $target . "' WHERE `lylme_tags`.`tag_id` = " . $id . ";"; if ($DB->query($sql)) echo ''; else echo ''; } } elseif ($set == 'delete') { $id = $_GET['id']; $sql = "DELETE FROM lylme_tags WHERE tag_id='$id'"; if ($DB->query($sql)) echo ''; else echo ''; } else { echo '
系统共有 ' . $tagsrows . ' 个导航菜单
新增导航菜单
'; ?>
query("SELECT * FROM `lylme_tags`"); while ($res = $DB->fetch($rs)) { echo ''; } ?>
名称链接操作
' . $res['tag_name'] . '' . $res['tag_link'] . '编辑 删除