<!--#include file="byshop_conn.asp"-->
<!--#include file="session.asp"-->
<%dim action,url,i,abc,anclassid,anclass
action=request.QueryString("action")
'//添加新数据
select case action
case "add"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from fcpic",conn,1,3
rs.AddNew
rs("picname")=trim(request("picname"))
rs("picclass")=int(request("picclass"))
rs("pics")=trim(request("pics"))
rs("picb")=trim(request("picb"))
rs("picorder")=int(request("picorder"))
rs.Update
rs.Close
set rs=nothing
response.redirect "fcpic.asp"
'//修改数据
case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from fcpic where id="&request.QueryString("id"),conn,1,3
rs("picname")=trim(request("picname"))
rs("picclass")=int(request("picclass"))
rs("pics")=trim(request("pics"))
rs("picb")=trim(request("picb"))
rs("picorder")=int(request("picorder"))
rs.update
rs.close
set rs=nothing
response.redirect "fcpic.asp"
'//删除数据
case "del"
id=request.QueryString("id")
conn.execute ("delete from fcpic where id="&request.QueryString("id"))
response.redirect "fcpic.asp"
end select
%>
