<!--#include file="conn.asp"-->
<%
if request.cookies("bjx")("shjianame")="" then
response.Redirect "admin_index.asp"
response.End
end if
%>
<%dim action,shjclassid
shjclassid=request.QueryString("id")
action=request.querystring("action")
select case action
'//添加新数据
case "add" 
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_shjclass",conn,1,3
rs.AddNew
rs("shjclass")=trim(request("shjclass2"))
rs("shjclassidorder")=int(request("shjclassidorder2"))
rs("fudongjia")=int(request("fudongjia2"))
rs("shjname")=trim(request.cookies("bjx")("shjianame"))
rs.Update
rs.Close
set rs=nothing
response.Redirect "shjclass.asp"
'//修改数据
case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_shjclass where shjclassid="&shjclassid,conn,1,3
rs("shjclass")=trim(request("shjclass"))
rs("shjclassidorder")=int(request("shjclassidorder"))
rs("fudongjia")=int(request("fudongjia"))
rs("shjname")=trim(request.cookies("bjx")("shjianame"))
rs.Update
rs.Close
set rs=nothing
response.Redirect "shjclass.asp"
'//删除数据
case "del"
conn.execute ("delete from shop_shjclass where shjclassid="&shjclassid)
conn.execute ("delete from shop_books where shjclassid="&shjclassid)
response.Redirect "shjclass.asp"
end select
%>