<% data_path="../../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/safe.asp"-->
  <!--#include file="../checkrole.asp"-->

<%
  Response.Buffer = true
  Response.ExpiresAbsolute=now()-1
  Response.Expires=0
  Response.CacheControl="no-cache"
 
  call checkuser("zh")
     if issession=0 then
	gsid=Replace_Text(request.Cookies("Yxmemberid"))
	else
	gsid=session("id")
	end if
if Not ChkPost then 
		response.write "<script language='javascript'>"
		response.write"parent.location.href='"&HOPE_InstallDir&"login/login1.asp';</SCRIPT>"
		response.end
end if

 
id=Replace_Text(request.form("id"))
if Replace_Text(request.form("title"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写展会名称！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("title"))>"" then
title=Replace_Text(request.form("title"))
sql="select id from Websen_expo where title='"&title&"' and gsid="&gsid&" and id<>"&id&""
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not (rs.Bof and rs.eof) then
response.write"<SCRIPT language=JavaScript>alert('您已经发布过这条展会信息了！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
end if


if Replace_Text(request.form("holdCountry"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写举办国家！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("beginDate"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写参展开始日期！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("endDate"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写参展结束日期！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("expireDate"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写报名截止日期！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("place"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写参展地(展馆)！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("frontFor"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写主办单位！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("brief"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写展会简介！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("product"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写参展范围！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("linkman"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写联系人！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("country1"))="中国" then
if Replace_Text(request.form("province"))=""  or Replace_Text(request.form("city"))="" then
response.write"<SCRIPT language=JavaScript>alert('国家如果选择了中国，必须选择地级市和市、县！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
end if

if Replace_Text(request.form("address"))="" then
response.write"<SCRIPT language=JavaScript>alert(没有填写联系地址！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if

if Replace_Text(request.form("phone"))="" then
response.write"<SCRIPT language=JavaScript>alert('没有填写固定电话！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if


set rs=server.createobject("adodb.recordset")
sql="select * from Websen_expo where id="&id&""
'response.write sql 
rs.open sql,conn,1,3
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()
if cityzhkey=1 then
 	rs("flag")=1
 	rs("sh")=1
end if
rs.update


//'自动生成用户网站*******20080420********************************
	 
if issession=0 then
   gradeid=Replace_Text(request.Cookies("gradeid"))
else
   gradeid=session("gradeid")
end if 		 
rolelist="no"
set rsgg=server.CreateObject("adodb.recordset")
sqlgg=" select rolelist from Websen_vipgrade where  roleid="&gradeid
rsgg.open sqlgg,conn,1,1
if not rsgg.eof then
   rolelist=rsgg("rolelist")
   rsgg.close
end if
if instr(rolelist,"qw")>0 then
   if autozz=1 and cityscakey="1" then
      %>
      <iframe src=" ../co.asp	" frameborder="0" scrolling="no" width=0 height=0></iframe>
      <%
   end if
//else

end if   

//****************************************************************








	 id1=rs("id")
	 id2=rs("id")
	 if cityzhkey=1 then 
		%>
		<iframe src="../../manage/Autohtml/expo/makedetail_Expo.asp?all=update&id1=<%=id1%>&id2=<%=id2%>&schtml=开始生成>>&other=expo" frameborder="0" scrolling="no" width=0 height=0></iframe>	
		<%
	end if

rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>操作成功</title>
<link href="../../images/css.css" rel="stylesheet" type="text/css">
<meta HTTP-EQUIV=refresh Content='3;url=<%=HOPE_InstallDir%>member/modify/modify_mine.asp'>
</head>

<table border="0" cellspacing="0" width="100%" cellpadding="0" height="418" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="100%" height="418" valign="middle" align="center">

<%
Content="<table width='100%'  border='0' cellspacing='5' cellpadding='0'>"
Content=Content&"       <tr>"
Content=Content&"  <td><strong style='color:#6C88A2;font-size:14px;'>操作成功,<a href='../modify/modify_mine.asp'>返回展会管理!</a></strong></td>"
Content=Content&"</tr>"
Content=Content&" <tr>"
Content=Content&" <td style='font-size:12px;color:#96A9BA;'><li>恭喜您，您的信息已经修改成功！</td>"
 Content=Content&" </tr>"
Content=Content&" </table>"

Call Operation(Content,1)
%>
</td>
</tr>
</table>
  </body>
</html>