delsort.jsp
上传用户:helenhuo66
上传日期:2007-06-01
资源大小:865k
文件大小:2k
- <%
- if session("admin_name")="" then response.end
- set rs=server.createobject("adodb.recordset")
- %>
- <!--#include file="conn.asp"--><head>
- <%if request("action")="save" then
- sort_id=request("sort_id")
- sort_name=request("sort_name")
- sql="select * from sort where sort_id="&request("sort_id")
- rs.open sql,conn,3,3
- rs("sort_name")=sort_name
- rs.update
- response.write "商品类别修改成功!"
- response.write "<br>"
- response.write "<a href=delsort.asp>返回</a>"
- rs.close
- end if
- %>
- <%
- if request("action")="del" then
- sql="select * from sort where sort_id="&request("sort_id")
- rs.open sql,conn,3,3
- if rs.eof then
- response.redirect "delsort.asp"
- else
- rs.delete
- rs.update
- end if
- response.write "商品类别删除成功"
- response.write "<br>"
- response.write "<a href=delsort.asp>返回</a>"
- rs.close
-
- else
- sql="select * from sort"
- rs.open sql,conn,3,3
- if rs.eof then
- response.write "没有商品分类"
- else
- do while not rs.eof%>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href=../css.css rel=STYLESHEET type=text/css>
- </head>
- <body topmargin="0">
- <table width="350" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#00CCFF" height="20">
- <tr>
-
- <td width="224" height="10">
- <form name="form1" method="post" action="delsort.asp?sort_id=<%=rs("sort_id")%>&action=save">
- <input type="text" name="sort_name" value="<%=rs("sort_name")%>">
- <input type="submit" name="Submit" value="修改">
- </form>
- </td>
- <td width="120" valign="top" height="10"><a href="delsort.asp?sort_id=<%=rs("sort_id")%>&action=del">删除</a></td>
- </tr>
- <Br>
- <%rs.movenext
- loop
- end if
- rs.close
- end if
- %></table>