<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx1<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if

dim ziduanid,ziduanorder,ziduanname,ziduanno,i
if request("action")="update" then
    for i=1 to request.form("ziduanid").count
	ziduanid=replace(request.form("ziduanid")(i),"'","")
	zdname=replace(request.form("zdname")(i),"'","")
	zd1=replace(request.form("zd1")(i),"'","")
	zd2=replace(request.form("zd2")(i),"'","")
	zd3=replace(request.form("zd3")(i),"'","")
	zd4=replace(request.form("zd4")(i),"'","")
	zd5=replace(request.form("zd5")(i),"'","")
	zd6=replace(request.form("zd6")(i),"'","")
	zd7=replace(request.form("zd7")(i),"'","")
	zd8=replace(request.form("zd8")(i),"'","")
	zd9=replace(request.form("zd9")(i),"'","")
	zd10=replace(request.form("zd10")(i),"'","")
	zd11=replace(request.form("zd11")(i),"'","")
	zd12=replace(request.form("zd12")(i),"'","")
	zd13=replace(request.form("zd13")(i),"'","")
	zd14=replace(request.form("zd14")(i),"'","")
	zd15=replace(request.form("zd15")(i),"'","")
	zd16=replace(request.form("zd16")(i),"'","")
	zd17=replace(request.form("zd17")(i),"'","")
	zd18=replace(request.form("zd18")(i),"'","")
	zd19=replace(request.form("zd19")(i),"'","")
	ziduanorder=replace(request.form("ziduanorder")(i),"'","")

	'conn.execute("update shop_ziduan set zdname='"&zdname&"' and  zdname='"&zdname&"' where id="&ziduanid)
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from shop_ziduan where id="&ziduanid,conn,1,3
rs("zdname")=zdname
rs("zd1")=zd1
rs("zd2")=zd2
rs("zd3")=zd3
rs("zd4")=zd4
rs("zd5")=zd5
rs("zd6")=zd6
rs("zd7")=zd7
rs("zd8")=zd8
rs("zd9")=zd9
rs("zd10")=zd10
rs("zd11")=zd11
rs("zd12")=zd12
rs("zd13")=zd13
rs("zd14")=zd14
rs("zd15")=zd15
rs("zd16")=zd16
rs("zd17")=zd17
rs("zd18")=zd18
rs("zd19")=zd19
rs("ziduanorder")=ziduanorder
rs.Update
    next
conn.close
set conn=nothing
response.write "<p align=center><font color=red>字段设置成功!<br>2秒钟后返回上页!</font>"
response.write "<meta http-equiv=""refresh"" content=""2;url=ziduan_manage.asp"">"
elseif request("action")="add" then
	zdname=request.form("zdname")
	zd1=request.form("zd1")
	zd2=request.form("zd2")
	zd3=request.form("zd3")
	zd4=request.form("zd4")
	zd5=request.form("zd5")
	zd6=request.form("zd6")
	zd7=request.form("zd7")
	zd8=request.form("zd8")
	zd9=request.form("zd9")
	zd10=request.form("zd10")
	zd11=request.form("zd11")
	zd12=request.form("zd12")
	zd13=request.form("zd13")
	zd14=request.form("zd14")
	zd15=request.form("zd15")
	zd16=request.form("zd16")
	zd17=request.form("zd17")
	zd18=request.form("zd18")
	zd19=request.form("zd19")
	ziduanorder=request.form("ziduanorder")
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from shop_ziduan",conn,1,3
rs.addnew
rs("zdname")=zdname
rs("zd1")=zd1
rs("zd2")=zd2
rs("zd3")=zd3
rs("zd4")=zd4
rs("zd5")=zd5
rs("zd6")=zd6
rs("zd7")=zd7
rs("zd8")=zd8
rs("zd9")=zd9
rs("zd10")=zd10
rs("zd11")=zd11
rs("zd12")=zd12
rs("zd13")=zd13
rs("zd14")=zd14
rs("zd15")=zd15
rs("zd16")=zd16
rs("zd17")=zd17
rs("zd18")=zd18
rs("zd19")=zd19
rs("ziduanorder")=ziduanorder
rs.Update
conn.close
set conn=nothing
response.write "<p align=center><font color=red>字段设置成功!<br>2秒钟后返回上页!</font>"
response.write "<meta http-equiv=""refresh"" content=""2;url=ziduan_manage.asp"">"
end if
if request("action")="del" then
id=request("id")
conn.execute "delete from shop_ziduan where id="&id
response.write "<p align=center><font color=red>字段删除成功!<br>2秒钟后返回上页!</font>"
response.write "<meta http-equiv=""refresh"" content=""2;url=ziduan_manage.asp"">"

end if
%>