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

<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../css/style.css">
<body>

<table width="98%" border="0" cellspacing="0" cellpadding="0"  align=center class="tableBorder">
<tr> 
<th class="tableHeaderText" colspan=2 height=25>展会信息管理</th>
</tr>
<tr>
<td height="20"  colspan="2"  ><font color="#666666">温馨提示： ①任何的删除操作都是不可逆的，执行删除时请慎重。 
<font color=blue>②点击<font color=red>未审核</font>与<font color=red>已审核</font>即可进行审核操作。</font> </td>
</tr>
<FORM name=searchForm action="select.asp" method=post>
<tr>
<td width="19%" height=25 class="forumRowHighlight">
<B>管理操作选项</B></td>
<td width="81%" class=forumRowHighlight>关键字：<input name="keywords" type="text" value="<%=keywords%>">
&nbsp;范围：
<select name="which">
			  <option value="0" <%if action ="0" then Response.Write "selected"%>>待审展会信息</option>
			  <option value="1" <%if action ="1" then Response.Write "selected"%>>已审待审展会</option>
		</select> <input type="submit" value="立刻查找" id=submit name=submit>&nbsp;&nbsp;&nbsp;&nbsp;[<a href="javascript:location.reload()">刷新页面</a>]</td>
</tr>
</form>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableBorder">
 <form action="postexpo.asp?action=add" name="form" method="post">
<tr> 
    <td>
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="content_border"> 
        <tr> 
          <td>
            <script language="JavaScript" src="../../js/calendar.js"> </script> 
			<table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="25%"></td>
                <td><font color="#FF0000"><%
response.write"<br>"
if request("action") ="add" then 
call post()
end if
response.write"<br>"
%></font></td>
              </tr>
            </table>
              <table border="0" width="100%" cellpadding="4" cellspacing="0" align="center" bgcolor="#5D86D6" style="border-bottom:#E7E7E7 5 solid;"> 
                <tr> 
                  <td width="180" align="middle" class=M><font color="#FFFFFF">展会基本信息</font></td> 
                   <td bgcolor="#FFFFFF" align="right"> 标有 <font color="#FF0000">*</font> 为必填项</td> 
                </tr> 
                <tr> 
                  <td bgcolor="#f6f6f6" colspan="3"></td> 
                </tr> 
              </table> 
               <table width="100%" border="0" align="center" cellpadding="3" cellspacing="2">
			    <tr> 
                  <td width="180" align="right" class=forumRow><span id="advance">标题图片：</span></td> 
                   <td valign="top" class=forumRow><input name="pic_on" type="checkbox" id="pic_on" value="1" onClick=showadv()></td> 
                 </tr>
				 		  		  		  		  <TR>
		  <td class="Forumrow"></td> 
<TD class="Forumrow">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id=adv style="DISPLAY: none">
  <tr>
    <td width="92%">
<!----------------------------------------------------文件上传----------------------------------------------->
  <iframe id="d_file" frameborder="0" src="../../inc/upload.asp?tMode=4&istwo=0&utype=expkind" width="300" height="40" scrolling="no"></iframe>
  <!--------------------------------------------------------------------------->  
<br><input type='hidden' name="picture" value="">
 	  </td>
  </tr>
</table></TD>
</TR> 
                <tr> 
                  <td width="180" align="right" class=forumRow> <font color="#FF0000">*</font> 展会名称：</td> 
                   <td valign="top" class=forumRow> <input name="title" size="60" value="<%=Replace_Text(request.form("title"))%>" maxlength="50"> </td> 
                 </tr> 
                <tr> 
                  <td align="right" class=forumRow> <font color="#FF0000">*</font> 举办国家：</td> 
                   <td valign="top" class=forumRow> <select name="holdCountry"> 
                     <option value="" selected >--选择国家与地区--</option> 
                       <option value="CN" <%if Replace_Text(request.form("holdCountry"))="CN" then response.write"selected"%>>中国大陆</option> 
                       <option value="HK" <%if Replace_Text(request.form("holdCountry"))="HK" then response.write"selected"%>>中国香港</option> 
                       <option value="MO" <%if Replace_Text(request.form("holdCountry"))="MO" then response.write"selected"%>>中国澳门</option> 
                       <option value="TW" <%if Replace_Text(request.form("holdCountry"))="TW" then response.write"selected"%>>中国台湾</option> 
                       <option value="QT" <%if Replace_Text(request.form("holdCountry"))="QT" then response.write"selected"%>>--其他国家--</option> 
                     </select> </td> 
                 </tr> 
                <tr> 
                  <td align="right" class=forumRow> <font color="#FF0000">*</font> 参展日期：</td> 
                   <td valign="top" class=forumRow> <input type="text" name="beginDate" size="16" maxlength="16" value="<%=Replace_Text(request.form("beginDate"))%>" onFocus="calendar()" > 
                    ~
                    <input type="text" name="endDate" size="16" maxlength="16" value="<%=Replace_Text(request.form("endDate"))%>" onFocus="calendar()" > 
                    <br> 
                    <font color="#999999">(日期格式:2004-10-01) </font></td> 
                 </tr> 
                <tr> 
                  <td width="180" align="right" class=forumRow> <font color="#FF0000">*</font> 报名截止：</td> 
                   <td class=forumRow> <input type="text" name="expireDate" size="16" maxlength="16" value="<%=Replace_Text(request.form("expireDate"))%>" onFocus="calendar()" > 
                    <br> 
                    <font color="#999999">(日期格式:2004-10-01) </font></td> 
                 </tr> 
                <tr> 
                  <td align="right" class=forumRow> <font color="#FF0000">*</font> 参展地(展馆)：</td> 
                   <td valign="top" class=forumRow> <input name="place" size="45" maxlength="50" value="<%=Replace_Text(request.form("place"))%>"> </td> 
                 </tr> 
                <tr> 
                  <td align="right" class=forumRow> 批准单位：</td> 
                   <td valign="top" class=forumRow> <input type="text" name="authorize" size="45" value="<%=Replace_Text(request.form("authorize"))%>" maxlength="50"> </td> 
                 </tr> 
                <tr> 
                  <td align="right" class=forumRow> <font color="#FF0000">*</font> 主办单位：</td> 
                   <td valign="top" class=forumRow> <textarea name="frontFor" cols="60" rows="4"><%=Replace_Text(request.form("frontFor"))%></textarea> </td> 
                 </tr> 
                <tr> 
                  <td align="right" class=forumRow> 承办单位：</td> 
                   <td valign="top" class=forumRow> <textarea name="undertake" cols="60" rows="8"><%=Replace_Text(request.form("undertake"))%></textarea> </td> 
                 </tr> 
                <tr> 
                  <td align="right" class=forumRow> 支持协办单位：</td> 
                   <td valign="top" class=forumRow> <textarea name="aidance" cols="60" rows="8"><%=Replace_Text(request.form("aidance"))%></textarea> </td> 
                 </tr> 
              </table> 
               <br> 
               <table border="0" width="100%" cellpadding="4" cellspacing="0" align="center" bgcolor="#5D86D6" style="border-bottom:#E7E7E7 5 solid;"> 
                <tr> 
                  <td width="180" align="center" class=M><font color="#ffffff">展会简介</font></td> 
                   <td bgcolor="#FFFFFF">&nbsp; </td> 
                 </tr> 
                <tr> 
                  <td bgcolor="#f6f6f6" colspan="2"></td> 
                 </tr> 
              </table> 
               <table width="100%" border="0" align="center" cellpadding="3" cellspacing="2"> 
                <tr> 
                  <td width="180" align="right" class=forumRow><font color="#FF0000">* </font>展会简介 </td> 
                   <td valign="top" class=forumRow> <textarea name="brief" rows="8" cols="60"><%=Replace_Text(request.form("brief"))%></textarea></td> 
                 </tr> 
              </table> 
               <br> 
               <table border="0" width="100%" cellpadding="4" cellspacing="0" align="center" bgcolor="#5D86D6" style="border-bottom:#E7E7E7 5 solid;"> 
                <tr> 
                  <td width="180" align="center" class=M><font color="#ffffff">参展范围</font></td> 
                   <td bgcolor="#FFFFFF">&nbsp; </td> 
                 </tr> 
                <tr> 
                  <td bgcolor="#f6f6f6" colspan="2"></td> 
                 </tr> 
              </table> 
               <table width="100%" border="0" align="center" cellpadding="3" cellspacing="2"> 
                <tr> 
                  <td width="180" align="right" class=forumRow><font color="#FF0000">* </font>参展范围</td> 
                   <td valign="top" class=forumRow> <textarea name="product" rows="8" cols="60"><%=Replace_Text(request.form("product"))%></textarea></td> 
                 </tr> 
              </table> 
               <br> 
               <table border="0" width="100%" cellpadding="4" cellspacing="0" align="center" bgcolor="#5D86D6" style="border-bottom:#E7E7E7 5 solid;"> 
                <tr> 
                  <td width="180" align="center" class=M><font color="#ffffff">收费标准</font></td> 
                   <td bgcolor="#FFFFFF">&nbsp; </td> 
                 </tr> 
                <tr> 
                  <td bgcolor="#f6f6f6" colspan="2"></td> 
                 </tr> 
              </table> 
               <table width="100%" border="0" align="center" cellpadding="3" cellspacing="2"> 
                <tr> 
                  <td width="180" align="right" class=forumRow>&nbsp; </td> 
                   <td valign="top" class=forumRow> <textarea name="charge" rows="8" cols="60"><%=Replace_Text(request.form("charge"))%></textarea></td> 
                 </tr> 
              </table> 
               <br> 
               <table border="0" width="100%" cellpadding="4" cellspacing="0" align="center" bgcolor="#5D86D6" style="border-bottom:#E7E7E7 5 solid;"> 
                <tr> 
                  <td width="180" align="center" class=M><font color="#FFFFFF">展会现场活动</font></td> 
                   <td bgcolor="#FFFFFF">&nbsp; </td> 
                 </tr> 
                <tr> 
                  <td bgcolor="#f6f6f6" colspan="2"></td> 
                 </tr> 
              </table> 
               <table width="100%" border="0" align="center" cellpadding="3" cellspacing="2"> 
                <tr> 
                  <td width="180" align="right" class=forumRow>&nbsp; </td> 
                   <td valign="top" class=forumRow> <textarea name="activity" rows="8" cols="60"><%=Replace_Text(request.form("activity"))%></textarea></td> 
                 </tr> 
              </table> 
               <br> 
               <table border="0" width="100%" cellpadding="4" cellspacing="0" align="center" bgcolor="#5D86D6" style="border-bottom:#E7E7E7 5 solid;"> 
                <tr> 
                  <td width="180" align="center" class=M><font color="#ffffff">联系资料</font></td> 
                   <td bgcolor="#FFFFFF">&nbsp; </td> 
                 </tr> 
                <tr> 
                  <td bgcolor="#f6f6f6" colspan="2"></td> 
                 </tr> 
              </table> 
               <table width="100%" align="center" bordercolordark="#eeeeee" cellspacing="2" border="0" cellpadding="3"> 
                <tr> 
                  <td class=forumRow width="180" align="right"> <font color="#FF0000">*</font> 联系人：</td> 
                   <td class=forumRow valign="top"> <input name="linkman" size="30" value="<%=Replace_Text(request.form("linkman"))%>" maxlength="16"> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> 公司名称：</td> 
                   <td class=forumRow valign="top"> <input name="company" value="<%=Replace_Text(request.form("company"))%>" size="45" maxlength="40"> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> <font color="#FF0000">*</font> 国家或地区：</td> 
                   <td class=forumRow valign="top"> <SELECT style="WIDTH: 90px" 
            onchange=javascript:changeCountry1(this); name=country1> </SELECT> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> 省/州：</td> 
                   <td class=forumRow valign="top"> <SELECT style="WIDTH: 60px" 
            onchange=changeProvince(this); name=province> 
                      <OPTION value="" 
              selected>省份</OPTION> 
                     </SELECT> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> 城 市：</td> 
                   <td class=forumRow valign="top"> <SELECT name=city> 
                      <OPTION value="" 
              selected>地级城市</OPTION> 

                     </SELECT> 
                    <SCRIPT language=javascript src="../../js/area1.js"    
      purpose="INITIALIZER"></SCRIPT> 
                    <SCRIPT language=javascript>
<!--
    //设置国家1的缺省值
    for (var i=0;i<5;i++){
	    if (country1form.options[i].value == '<%=Replace_Text(request.form("country1"))%>'){
		    country1form.options[i].selected=true;
		}
	}

    for (var i=0;i<catArr1.length;i++) {
		catform.options[i+1]=new Option(catArr1[i].title,catArr1[i].id);
		//设置省选择框的选择值
		if(catform.options[i+1].value == '<%=Replace_Text(request.form("province"))%>'){
	        	catform.options[i+1].selected=true;
	        }
	}
	changeProvince(catform);
	var len = boardform.options.length;
	for (var i=0;i<len;i++) {
		//设置城市选择框的选择值
		if(boardform.options[i].value == '<%=Replace_Text(request.form("city"))%>') {
		    boardform.options[i].selected=true;
		}
	}

-->
</SCRIPT></td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> <font color="#FF0000">*</font> 联系地址：</td> 
                   <td class=forumRow valign="top"> <input name="address" value="<%=Replace_Text(request.form("address"))%>" size="45" maxlength="50"> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> 邮 编：</td> 
                   <td valign="top" class=forumRow> <input name="zip" value="<%=Replace_Text(request.form("zip"))%>" size="16" maxlength="16"> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> <font color="#FF0000">*</font> 固定电话：</td> 
                   <td valign="top" class=forumRow> <input name="phone" size="30" value="<%=Replace_Text(request.form("phone"))%>" maxlength="20"> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> 传 真：</td> 
                   <td valign="top" class=forumRow> <input name="fax" value="<%=Replace_Text(request.form("fax"))%>" size="30" maxlength="15"> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> 移动电话：</td> 
                   <td class=forumRow valign="top"> <input name="mobile" size="30" value="<%=Replace_Text(request.form("mobile"))%>" maxlength="20"> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> 电子邮件：</td> 
                   <td class=forumRow valign="top"> <input name="email" size="45" value="<%=Replace_Text(request.form("email"))%>" maxlength="30"> </td> 
                 </tr> 
                <tr> 
                  <td class=forumRow align="right"> 网 址：</td> 
                   <td class=forumRow valign="top"> <input name="homepage" value="<%=Replace_Text(request.form("homepage"))%>" size="45" maxlength="30"> </td> 
                 </tr>
                <tr>
                  <td class=forumRow align="right">直接通过审核：</td>
                  <td class=forumRow valign="top"><input name="sh" type="checkbox" id="sh" value="1" checked> 
                    选定既不需要审核 </td>
                </tr> 
              </table> 
               <table width="100%" align="center"> 
                <tr> 
                  <td align="center"> <input type="submit" value=" 一切完成，我要发布！" name="Post" class=C> </td> 
                 </tr> 
              </table> 
            </td> 
        </tr> 
      </table>
	</td>
  </tr></form>
 </table>
<%
sub post()
if Replace_Text(request.form("title"))="" then
response.write "<li>没有填写展会名称</li>"
founderr=true
end if

if Replace_Text(request.form("title"))>"" then
title=Replace_Text(request.form("title"))
sql="select id from Websen_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"<li>此展会名称已经存在，请重新设置</li>"
founderr=true
end if
end if

if Replace_Text(request.form("picture"))<>"" then
pictexturl=Replace_Text(request.form("picture"))
else
pictexturl="nopicture.gif"
end if 
if Replace_Text(request.form("holdCountry"))="" then
response.write "<li>没有填写举办国家</li>"
founderr=true
end if

if Replace_Text(request.form("beginDate"))="" then
response.write "<li>没有填写参展开始日期</li>"
founderr=true
end if

if Replace_Text(request.form("endDate"))="" then
response.write "<li>没有填写参展结束日期</li>"
founderr=true
end if

if Replace_Text(request.form("expireDate"))="" then
response.write "<li>没有填写报名截止日期</li>"
founderr=true
end if

if Replace_Text(request.form("place"))="" then
response.write "<li>参展地(展馆)</li>"
founderr=true
end if

if Replace_Text(request.form("frontFor"))="" then
response.write "<li>没有填写主办单位</li>"
founderr=true
end if

if Replace_Text(request.form("brief"))="" then
response.write "<li>没有填写展会简介</li>"
founderr=true
end if

if Replace_Text(request.form("product"))="" then
response.write "<li>没有填写参展范围</li>"
founderr=true
end if

if Replace_Text(request.form("linkman"))="" then
response.write "<li>没有填写联系人</li>"
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 "<li>国家如果选择了中国，必须选择地级市和市、县</li>"
founderr=true
end if
end if

if Replace_Text(request.form("address"))="" then
response.write "<li>没有填写联系地址</li>"
founderr=true
end if

if Replace_Text(request.form("phone"))="" then
response.write "<li>没有填写固定电话</li>"
founderr=true
end if

if founderr=false then
'开始存储数据
title=Replace_Text(request.form("title"))

sql="select * from Websen_expo where title='"&title&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
if not (rs.Bof and rs.eof) then
response.write"<li>此展会名称已经存在，请重新设置</li>"
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"))
if Replace_Text(request.form("sh"))="" then
rs("sh")=0
else
rs("sh")=1
end if
 rs("picture")=pictexturl
 
rs("dateandtime")=now()
rs.update
 id=rs("id")
Response.write("<iframe src='../../manage/makehtml/expo/makedetail_expo.asp?all=update&id1="&id&"&id2="&id&"' width=0 height=0 ></iframe>")	
Response.write("<iframe src='../../manage/makehtml/expo/makelist.asp?all=all' width=0 height=0 ></iframe>")	
response.Write ("<script>window.location.href='expo.asp?pass=1'</script>")
 
end if
end if
end sub
%> 
<script>
function showadv(){
if (document.form.pic_on.checked == true) {
		adv.style.display = "";
		advance.innerText="取消上传标题图片"
	}else{
		adv.style.display = "none";
		advance.innerText="上传标题图片"
	}
}		
</script>
<!--#include file="../copy.asp"-->