query("select * from lylme_apply where apply_id='$id' limit 1");
$row = $DB->fetch($row2);
echo '
修改链接信息
';
} elseif ($set == 'edit_submit') {
$id = $_GET['id'];
$rows2 = $DB->query("select * from lylme_apply where apply_id='$id' limit 1");
$rows = $DB->fetch($rows2);
if (!$rows) echo '';
$name = $_POST['apply_name'];
$icon = $_POST['apply_icon'];
$url = $_POST['apply_url'];
$group = $_POST['apply_group'];
if ($name == NULL) {
echo '';
} else {
$sql = "UPDATE `lylme_apply` SET `apply_name` = '" . $name . "', `apply_group` = '" . $group . "',`apply_icon` = '" . $icon . "',`apply_url` = '" . $url . "' WHERE `lylme_apply`.`apply_id` = '" . $id . "';";
if ($DB->query($sql)) echo ''; else echo '';
}
} elseif ($set == 'delete') {
$id = $_GET['id'];
$delsql = 'DELETE FROM `lylme_apply` WHERE apply_id =' . $id;
if ($DB->query($delsql)) echo ''; else echo '';
} elseif ($set == 'status') {
$id = $_GET['id'];
$sw = $_GET['sw'];
$sql = "UPDATE `lylme_apply` SET `apply_status` = '".$sw."' WHERE `lylme_apply`.`apply_id` = ".$id.";";
if($sw==1) {
if ($DB->query($sql)) {
$applyres = $DB->get_row("SELECT * FROM `lylme_apply` WHERE `apply_id` = ".$id);
$name=strip_tags(daddslashes($applyres['apply_name']));
$url=strip_tags(daddslashes($applyres['apply_url']));
$icon=daddslashes($applyres['apply_icon']);
$group_id=strip_tags(daddslashes($applyres['apply_group']));
$mail=strip_tags(daddslashes($applyres['apply_mail']));
$link_order = $DB->count('select MAX(id) from `lylme_links`')+1;
$sql1 = "INSERT INTO `lylme_links` (`id`, `name`, `group_id`, `url`, `icon`, `PS`,`link_order`) VALUES (NULL, '" . $name . "', '" . $group_id . "', '" . $url . "', '" . $icon . "', '" . $mail . "的提交 ', '" . $link_order . "');";
if($DB->query($sql1)) {
echo '';
} else {
echo '';
}
}
} else {
if (!$DB->query($sql)) {
echo '';
}
}
} else {
echo '