<!--#include file="top.asp"-->
<%if userflag3=0 then
response.redirect"ok.asp?action=flag"
end if

id=request("id")
page=request("page")
if page="" then page=1
'====================================================删除数据
if request("action")="del" then
conn.execute("delete from dlxf_exhibit where dlxf_id="& id &" and dlxf_yp_id="&session("id"))
conn.execute("delete from dlxf_leaveword where dlxf_book_sort=5 and dlxf_book_table="&id&" and dlxf_book_ypid="&session("id")&"")
Response.Redirect "ok.asp?url=exhibit.asp&page="&page
end if
'====================================================获取数据
z_name=request("z_name")
z_web=request("z_web")
by=request("by")
bm=request("bm")
bd=request("bd")
ly=request("ly")
lm=request("lm")
ld=request("ld")
jzy=request("jzy")
jzm=request("jzm")
jzd=request("jzd")
addone_id=request("addone_id")
addtwo_id=request("addtwo_id")
z_zgname=request("z_zgname")
z_lr=request("z_lr")
z_jb=request("z_jb")
z_cb=request("z_cb")
z_xb=request("z_xb")
z_others=request("z_others")
z_zq=request("z_zq")
z_sj=request("z_sj")
z_cbdate=request("z_cbdate")
z_qy=request("z_qy")
ypxxone_id=request("ypxxone_id")
ypxxtwo_id=request("ypxxtwo_id")
z_xz=request("z_xz")
if cityzhkey=1 then
key=1
else
key=0
end if

z_begindate=cdate(by&"-"&bm&"-"&bd)
z_lastdate=cdate(ly&"-"&lm&"-"&ld)
z_jzdate=cdate(jzy&"-"&jzm&"-"&jzd)
if addone_id="" then addone_id=0
if addtwo_id="" then addtwo_id=0
if ypxxone_id="" then ypxxone_id=0
if ypxxtwo_id="" then ypxxtwo_id=0

if cb="" then cb=null
if xb="" then xb=null
if z_others="" then z_others=null
if z_zq="" then z_zq=null
if z_sj="" then z_sj=0
if z_cbdate="" then z_cbdate=null
if z_web="" then z_web=null
if z_qy="国际展会" then
addone_id=0
addtwo_id=0
end if
'====================================================添加数据
if request("action")="add" then
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_exhibit where dlxf_yp_id="& session("id")
rs.open sql,conn,1,3

if userflag3<>0 then
if rs.recordcount >= cint(userflag3) then
errstyle="·您是"&vipshow&"，只能上传最多 "&userflag3&" 条展会信息！"
scripterr
end if
else
errstyle="·对不起，此功能已对"&vipshow&"关闭！"
scripterr
end if

rs.addnew
rs("dlxf_z_name")=z_name
rs("dlxf_z_web")=z_web
rs("dlxf_addone_id")=addone_id
rs("dlxf_addtwo_id")=addtwo_id
rs("dlxf_z_zgname")=z_zgname
rs("dlxf_z_lr")=z_lr
rs("dlxf_z_jb")=z_jb
rs("dlxf_z_cb")=z_cb
rs("dlxf_z_xb")=z_xb
rs("dlxf_z_others")=z_others
rs("dlxf_z_zq")=z_zq
rs("dlxf_z_sj")=z_sj
rs("dlxf_z_cbdate")=z_cbdate
rs("dlxf_z_qy")=z_qy
rs("dlxf_ypxxone_id")=ypxxone_id
rs("dlxf_ypxxtwo_id")=ypxxtwo_id
rs("dlxf_z_xz")=z_xz
rs("dlxf_z_begindate")=z_begindate
rs("dlxf_z_lastdate")=z_lastdate
rs("dlxf_z_jzdate")=z_jzdate
rs("dlxf_z_enrol")=0

rs("dlxf_key")=key
rs("dlxf_yp_id")=session("id")

rs.update
rs.close
set rs=nothing

if cityzhkey=1 then
response.redirect"ok.asp?url=exhibit_add.asp"
elseif cityzhkey=0 then
response.redirect"ok.asp?url=exhibit_add.asp&key=yes"
end if

elseif request("action")="edit" then
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from dlxf_exhibit where dlxf_id="&request("id")&" and dlxf_yp_id="&session("id")
rs.open sql,conn,1,3

if userflag3=0 then
errstyle="·对不起，此功能已对"&vipshow&"关闭！"
scripterr
end if

rs("dlxf_z_name")=z_name
rs("dlxf_z_web")=z_web
rs("dlxf_addone_id")=addone_id
rs("dlxf_addtwo_id")=addtwo_id
rs("dlxf_z_zgname")=z_zgname
rs("dlxf_z_lr")=z_lr
rs("dlxf_z_jb")=z_jb
rs("dlxf_z_cb")=z_cb
rs("dlxf_z_xb")=z_xb
rs("dlxf_z_others")=z_others
rs("dlxf_z_zq")=z_zq
rs("dlxf_z_sj")=z_sj
rs("dlxf_z_cbdate")=z_cbdate
rs("dlxf_z_qy")=z_qy
rs("dlxf_ypxxone_id")=ypxxone_id
rs("dlxf_ypxxtwo_id")=ypxxtwo_id
rs("dlxf_z_xz")=z_xz
rs("dlxf_z_begindate")=z_begindate
rs("dlxf_z_lastdate")=z_lastdate
rs("dlxf_z_jzdate")=z_jzdate

rs("dlxf_key")=key
rs.update
rs.close
set rs=nothing
if cityzhkey=1 then
response.redirect"ok.asp?url=exhibit.asp&page="&page
elseif cityzhkey=0 then
response.redirect"ok.asp?url=exhibit.asp&page="&page&"&key=yes"
end if
end if
%>