if session("admin_name")="" then response.end
set rs=server.createobject("adodb.recordset")
%>
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 ""
response.write "返回"
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 ""
response.write "返回"
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%>
删除
loop
end if
rs.close
end if
%>