📄 sort_edit.asp
字号:
<!--#include file="../inc/CheckAdmin.asp"-->
<!--#include file="../inc/Config.asp"-->
<!--#include file="../inc/Navtree.asp"-->
<!--#include file="../inc/Conn.asp"-->
<!--#include file="setting.asp"-->
<%
types=formatStr(Request("type"))
if types="" then types="1"
if types="1" then
table="hfrom"
zid="hf_id"
ziduan="hf_name"
elseif types="2" then
table="hto"
zid="ht_id"
zpid="ht_pid"
ziduan="ht_name"
else
table="harea"
zid="ha_id"
ziduan="ha_name"
end if
id=request("id")
if id="" or not isnumeric(id) then check_alert "非法操作!","Sort_Admin?type="&types
if request("update")=1 then
names=formatStr(Request("name"))
set rs = Server.createObject("ADODB.Recordset")
rs.open"select * from "&table&" where "& zid &"="&id,conn,1,3
if not rs.eof then
'rs.addnew
if types="2" then rs(zpid)=Trim(Request.Form("sel2"))
rs(ziduan)=names
rs.update
end if
rs.close
set rs=nothing
check_alert "修改成功!","Sort_admin.asp?type="&types
end if
rs.open"select * from "&table&" where "& zid &"="&id,conn,1,1
if not rs.eof then
SortId=rs(zid)
if types="2" then sel2=rs(zpid)
PS_Name=rs(ziduan)
end if
rs.close
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站管理系统</title>
<link href="../Css_Main.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #CCCCCC}
.STYLE2 {color: #FF0000}
-->
</style>
</head>
<script language="JavaScript">
function Check()
{
if (form.Name.value == "")
{alert("类别名称不能为空");
form.Name.focus();
return false;
}
document.form.submit();
}
</script>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr>
<td class="title_dh"><div align="center">路线管理——修改分类</div></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20"></td>
</tr>
</table>
<form name="form" method="post" action="">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr class="title_top">
<td colspan="2"><div align="center">修改分类</div></td>
</tr>
<tr class="tdbg" style="display:<% If types<>"2" Then response.Write("none") %>">
<td width="20%"><div align="right"><strong>所属区域:</strong></div></td>
<td><select name="sel2" class="Maxl" id="sel2">
<option value="">请选择区域</option>
<%sql="select * from harea order by ha_id"
set rs1=conn.execute(sql)
do while not rs1.eof%>
<option value="<%= rs1("ha_id") %>"<% If rs1("ha_id")=sel2 Then response.Write(" selected")%>><%= rs1("ha_name") %></option>
<%rs1.movenext
loop
rs1.close
set rs1=nothing%>
</select></td>
</tr>
<tr class="tdbg">
<td><div align="right"><strong>类别名称:</strong></div></td>
<td><input name="Name" type="text" id="Name" value="<%=PS_Name%>" size="16">
<input name="id" type="hidden" id="id" value="<%=SortId%>">
<input name="update" type="hidden" id="update" value="1">
<input name="type" type="hidden" id="type" value="<%= types %>">
<span class="STYLE2">*</span></td>
</tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="40">
<div align="center"><span class="style1">
<input type="button" name="Submit" value="修改" onClick="Check()">
<input type="reset" name="reset" value="取消">
</span> </div></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -