日期:2014-05-16 浏览次数:20850 次
<% if request.querystring("action")="add" then
if trim(request.form("sort"))="" then
response.Write "<script language=javascript>alert('请填写产品类别!');window.location.href='"&request.serverVariables("HTTP_REFERER")&"';</script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from product_small_sort"
rs.open sql,conn,1,3
rs.addnew
rs("big_sortid")=server.HTMLEncode(trim(request.form("big_sortid")))
rs("sort")=server.HTMLEncode(trim(request.form("sort")))
rs("money")=server.HTMLEncode(trim(request.form("money")))
rs("danwei")=server.HTMLEncode(trim(request.form("danwei")))
rs("sx")=server.HTMLEncode(trim(request.form("sx")))
rs.update
response.Write "<script language=javascript>alert('添加产品小类成功!');window.location.href='"&request.serverVariables("HTTP_REFERER")&"';</script>"
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
<% if request.querystring("action")="save" then
...
<% if request.querystring("action")="delete" then
...
conn.Execute "DELETE FROM product_small_sort WHERE 条件"
Set strRs=Server.CreateObject("ADODB.Recordset")
strRs.Open "product_small_sort",conn,2,3
strRs.AddNew
rs("big_sortid")=server.HTMLEncode(trim(request.form("big_sortid")))
rs("sort")=server.HTMLEncode(trim(request.form("sort")))
rs("money")=server.HTMLEncode(trim(request.form("money")))
rs("danwei")=server.HTMLEncode(trim(request.form("danwei")))
rs("sx")=server.HTMLEncode(trim(request.form("sx")))
strRs.Update
'
strRs.Close
Set strRs=Nothing