📄 fenlei_2edit.asp
字号:
<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<%
dim rs,sql,class1,class2,paixu,classid,leibie,tijiao
tijiao=request("tijiao")
if tijiao<>"" then
classid=trim(request("classid"))
class1=request("class1")
class2=trim(request("class2"))
paixu=trim(request("paixu"))
if class1="" then
response.write "<li>错误,类别为空!"
call cl()
response.end
end if
if class2="" then
response.write "<li>错误,类别为空!"
call cl()
response.end
end if
if paixu="" then
response.write "<li>错误,类别为空!"
call cl()
response.end
end if
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [class2] where id="&cstr(classid)
rs.open sql,conn,1,3
leibie=trim(rs("class2"))
if class2=leibie then
rs("paixu")=paixu
rs.update
response.write "排序修改成功!"
call cl()
response.end
end if
if rs.eof then
response.write "参数错误!"
call cl()
else
rs("class1")=class1
rs("class2")=class2
rs("paixu")=paixu
rs.update
response.write "修改成功!!"
call cl()
end if
rs.close
set rs=nothing
closedb
%>
<%sub cl()%>
<body onLoad="setTimeout(window.close, 2000)">
<%end sub%>
<%else%>
<title>修改分类</title>
<link href="inc_style.css" rel="stylesheet" type="text/css">
<body>
<p align="center"><img border="0" src="img/list_bo.gif" width="600" height="12"></p>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#CCCCCC" width="325" height="68">
<form action="fenlei_2editchk.asp?classid=<%=request("classid")%>" name="cnmai" method="POST">
<tr>
<td height="25" bgcolor="#FEEEBC" width="323">
<p align="center">所属大类:
<select name="class1" size="1" style="font-size: 9pt">
<%
dim cnmai,id
class1=request("class1")
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [class1] order by paixu desc"
rs.open sql,conn,1,1
if rs.eof then
response.write "没有类别请添加!"
response.end
else
Do while not rs.eof
id=cstr(rs("id"))
if trim(request("class1"))=id then
cnmai="selected"
else
cnmai=""
end if
response.write "<option " & cnmai & " value=" + Cstr(rs("id")) + ">" + rs("class1") + "</option>"
rs.MoveNext
Loop
end if
rs.close
set rs=nothing
closedb
%>
</select>
</td>
</tr>
<tr>
<td height="25" style="border-bottom-style: none; border-bottom-width: medium" width="323">
<p align="center">分类名称:<input type="text" name="class2" size="19" value="<%=request("class2")%>"></p>
</td>
</tr>
<tr>
<td height="25" align="center" style="border-top-style: none; border-top-width: medium; border-bottom-style: none; border-bottom-width: medium" width="323">
<p>排序数字:<input type="text" name="paixu" size="19" value="<%=request("paixu")%>"></td>
</tr>
<tr>
<td height="25" style="border-top-style: none; border-top-width: medium">
<p align="center">
<input type="submit" value=" 提 交" name="B1" style="color: #000000; "></td>
</tr>
</form>
</table>
</div>
<%end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -