<%
response.write" "
if request("action") ="add" then
call post()
end if
response.write" "
%>
<%
sub post()
if Replace_Text(request.form("title"))="" then
response.write "
没有填写展会名称
"
founderr=true
end if
if Replace_Text(request.form("title"))>"" then
title=Replace_Text(request.form("title"))
sql="select id from expo where title='"&title&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not (rs.Bof and rs.eof) then
response.write"
此展会名称已经存在,请重新设置
"
founderr=true
end if
end if
if Replace_Text(request.form("holdCountry"))="" then
response.write "
没有填写举办国家
"
founderr=true
end if
if Replace_Text(request.form("beginDate"))="" then
response.write "
没有填写参展开始日期
"
founderr=true
end if
if Replace_Text(request.form("endDate"))="" then
response.write "
没有填写参展结束日期
"
founderr=true
end if
if Replace_Text(request.form("expireDate"))="" then
response.write "
没有填写报名截止日期
"
founderr=true
end if
if Replace_Text(request.form("place"))="" then
response.write "
参展地(展馆)
"
founderr=true
end if
if Replace_Text(request.form("frontFor"))="" then
response.write "
没有填写主办单位
"
founderr=true
end if
if Replace_Text(request.form("brief"))="" then
response.write "
没有填写展会简介
"
founderr=true
end if
if Replace_Text(request.form("product"))="" then
response.write "
没有填写参展范围
"
founderr=true
end if
if Replace_Text(request.form("linkman"))="" then
response.write "
没有填写联系人
"
founderr=true
end if
if Replace_Text(request.form("country1"))="中国" then
if Replace_Text(request.form("province"))="" or Replace_Text(request.form("city"))="" then
response.write "
国家如果选择了中国,必须选择地级市和市、县
"
founderr=true
end if
end if
if Replace_Text(request.form("address"))="" then
response.write "
没有填写联系地址
"
founderr=true
end if
if Replace_Text(request.form("phone"))="" then
response.write "
没有填写固定电话
"
founderr=true
end if
if founderr=false then
'开始存储数据
title=Replace_Text(request.form("title"))
sql="select * from expo where title='"&title&"' and gsid="&session("id")&""
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
if not (rs.Bof and rs.eof) then
response.write"
此展会名称已经存在,请重新设置
"
else
rs.addnew
rs("brief")=Replace_Text(request.form("brief"))
rs("city")=Replace_Text(request.form("city"))
rs("aidance")=Replace_Text(request.form("aidance"))
rs("province")=Replace_Text(request.form("province"))
rs("title")=Replace_Text(request.form("title"))
rs("company")=Replace_Text(request.form("company"))
rs("address")=Replace_Text(request.form("address"))
rs("beginDate")=Replace_Text(request.form("beginDate"))
rs("endDate")=Replace_Text(request.form("endDate"))
rs("activity")=Replace_Text(request.form("activity"))
rs("fax")=Replace_Text(request.form("fax"))
rs("mobile")=Replace_Text(request.form("mobile"))
rs("holdCountry")=Replace_Text(request.form("holdCountry"))
rs("undertake")=Replace_Text(request.form("undertake"))
rs("zip")=Replace_Text(request.form("zip"))
rs("expireDate")=Replace_Text(request.form("expireDate"))
rs("place")=Replace_Text(request.form("place"))
rs("linkman")=Replace_Text(request.form("linkman"))
rs("phone")=Replace_Text(request.form("phone"))
rs("homepage")=Replace_Text(request.form("homepage"))
rs("authorize")=Replace_Text(request.form("authorize"))
rs("charge")=Replace_Text(request.form("charge"))
rs("email")=Replace_Text(request.form("email"))
rs("frontFor")=Replace_Text(request.form("frontFor"))
rs("product")=Replace_Text(request.form("product"))
rs("country1")=Replace_Text(request.form("country1"))
rs("dateandtime")=now()
rs("gsid")=session("id")
rs.update
response.redirect ("/member/modify/modify_mine.jsp")
end if
end if
end sub
%>