<%dbdns="../../"%>
<!--#include file="../../inc/conn.asp"-->
<!--#include file="../cook.asp"-->
<%if fla7<>1 then
response.write "<script>alert('操作权限出错，您没有权限操作些功能');history.go(-1);</Script>"
Response.End 
end if%>
<%=citycss%>
<body style="margin:5">
<%sql = "select *  from dlxf_ypxxtwo order by dlxf_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1%>

<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%count = 0
do while not rs.eof%>
subcat[<%=count%>] = new Array("<%= trim(rs("dlxf_ypxxtwo"))%>","<%= trim(rs("dlxf_ypxxone_id"))%>","<%= trim(rs("dlxf_ypxxtwo_id"))%>");
        <%count = count + 1
        rs.movenext
        loop
        rs.close
        set rs=nothing%>
onecount=<%=count%>;

function changelocation(ypxxone)
    {
    document.addform.ypxxtwo_id.length = 0; 

    var ypxxone_id=ypxxone_id;
    var i;
    document.addform.ypxxtwo_id.options[0] = new Option('请选择小类','');
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == ypxxone)
            { 
                document.addform.ypxxtwo_id.options[document.addform.ypxxtwo_id.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</script>
<%sql = "select *  from dlxf_ypaddtwo order by dlxf_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1%>
<script language = "JavaScript">
var onecount1;
onecount1=0;
subcat1 = new Array();
<%count = 0
do while not rs.eof%>
subcat1[<%=count%>] = new Array("<%= trim(rs("dlxf_addtwo"))%>","<%= trim(rs("dlxf_addone_id"))%>","<%= trim(rs("dlxf_addtwo_id"))%>");
        <%count = count + 1
        rs.movenext
        loop
        rs.close
        set rs=nothing%>
onecount1=<%=count%>;

function changelocation1(addone)
    {
    document.addform.addtwo_id.length = 0; 

    var addone_id=addone_id;
    var i;
    document.addform.addtwo_id.options[0] = new Option('请选择市','');
    for (i=0;i < onecount1; i++)
        {
            if (subcat1[i][1] == addone)
            { 
                document.addform.addtwo_id.options[document.addform.addtwo_id.length] = new Option(subcat1[i][0], subcat1[i][2]);
            }        
        }
        
    }
</script>
<script LANGUAGE=JavaScript>
  function textLimitCheck(thisArea, maxLength){
    if (thisArea.value.length > maxLength){
      alert(maxLength + ' 个字限制. \r超出的将自动去除.');
      thisArea.value = thisArea.value.substring(0, maxLength);
      thisArea.focus();
    }
    /*回写span的值，当前填写文字的数量*/
    messageCount.innerText = thisArea.value.length;
  }
  function textLimit(thisArea, maxLength){
    if (thisArea.value.length > maxLength){
      alert(maxLength + ' 个字限制. \r超出的将自动去除.');
      thisArea.value = thisArea.value.substring(0, maxLength);
      thisArea.focus();
    }
    /*回写span的值，当前填写文字的数量*/
    messageCounts.innerText = thisArea.value.length;
  }
</script>
<script language="JavaScript">
<!--
function checkdata() {
if( addform.z_name.value =="") {
alert("\发布商机出错，下面是产生错误的可能原因：\n\n·请输入完整的展会名称")
return false;
}
if( addform.by.value =="" || addform.bm.value =="" || addform.bd.value =="" ) {
alert("\发布商机出错，下面是产生错误的可能原因：\n\n·请输入展会开始时间")
return false;
}
if( addform.ly.value =="" || addform.lm.value =="" || addform.ld.value =="" ) {
alert("\发布商机出错，下面是产生错误的可能原因：\n\n·请输入展会结束时间")
return false;
}
if( addform.jzy.value =="" || addform.jzm.value =="" || addform.jzd.value =="" ) {
alert("\发布商机出错，下面是产生错误的可能原因：\n\n·请输入展会申请结止时间")
return false;
}
if( addform.z_zgname.value =="") {
alert("\发布商机出错，下面是产生错误的可能原因：\n\n·请输入展会具体地址")
return false;
}
if( addform.z_lr.value =="") {
alert("\发布商机出错，下面是产生错误的可能原因：\n\n·请输入展会展会内容")
return false;
}
if( addform.z_jb.value =="") {
alert("\发布商机出错，下面是产生错误的可能原因：\n\n·请输入展会主办方")
return false;
}

return true;
}
// -->
</script>
<%sql1="select * from dlxf_exhibit where dlxf_id="&request("id")
set rs1=server.createobject("adodb.recordset")                     
rs1.open sql1,conn,1,1%>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#6C90D1" bordercolordark="#FFFFFF">
<form name="addform" method="post" action="exhibit_save.asp?action=edit&page=<%=request("page")%>" onSubmit="return checkdata()">
<input name="id" type="hidden" value="<%=request("id")%>">
  <tr>
    <td height=30 align="center" colspan="2"><font color=#666666>带 * 为必填项</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right><font color=red>*</font>展会名称： &nbsp;</td>
	<td width="79%"><input name="z_name" type="text" size="35" maxlength="30" value="<%=rs1("dlxf_z_name")%>"> <font color=#666666>限30个字符</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right><font color=red>*</font>展出时间： &nbsp;</td>
<td width="79%"><select name="by"><option value=""></option><%for i=2004 to 2050%><option value="<%=i%>"<%if year(rs1("dlxf_z_begindate"))=i then%> selected<%end if%>><%=i%>年</option><%next%></select>
<select name="bm"><option value=""></option><%for i=1 to 12%><option value="<%=i%>"<%if month(rs1("dlxf_z_begindate"))=i then%> selected<%end if%>><%=i%>月</option><%next%></select>
<select name="bd"><option value=""></option><%for i=1 to 31%><option value="<%=i%>"<%if day(rs1("dlxf_z_begindate"))=i then%> selected<%end if%>><%=i%>日</option><%next%></select> 开始
	</td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right></td>
	<td width="79%"><select name="ly"><option value=""></option><%for i=2004 to 2050%><option value="<%=i%>"<%if year(rs1("dlxf_z_lastdate"))=i then%> selected<%end if%>><%=i%>年</option><%next%></select>
<select name="lm"><option value=""></option><%for i=1 to 12%><option value="<%=i%>"<%if month(rs1("dlxf_z_lastdate"))=i then%> selected<%end if%>><%=i%>月</option><%next%></select>
<select name="ld"><option value=""></option><%for i=1 to 31%><option value="<%=i%>"<%if day(rs1("dlxf_z_lastdate"))=i then%> selected<%end if%>><%=i%>日</option><%next%></select> 结束
	</td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right><font color=red>*</font>申请截止： &nbsp;</td>
	<td width="79%"><select name="jzy"><option value=""></option><%for i=2004 to 2050%><option value="<%=i%>"<%if year(rs1("dlxf_z_jzdate"))=i then%> selected<%end if%>><%=i%>年</option><%next%></select>
<select name="jzm"><option value=""></option><%for i=1 to 12%><option value="<%=i%>"<%if month(rs1("dlxf_z_jzdate"))=i then%> selected<%end if%>><%=i%>月</option><%next%></select>
<select name="jzd"><option value=""></option><%for i=1 to 31%><option value="<%=i%>"<%if day(rs1("dlxf_z_jzdate"))=i then%> selected<%end if%>><%=i%>日</option><%next%></select>
	</td>
  </tr>
  <tr>
    <td height=50 align=right>展会地区： &nbsp;</td>
	<td><p style="line-height:180%"><select name="addone_id" onChange="changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value)">
<option value="" selected>请选择省</option>
                    <%
sql="select *  from dlxf_ypaddone order by dlxf_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("dlxf_addone_id")%>"><%=rs("dlxf_addone")%></option>
<%rs.movenext
wend
rs.Close()
%> 
</select>
<select name="addtwo_id">
<option selected value="">请选择市</option>
</select> <font color=red>请重新选择</font><br><font color=#666666>如不选则默认为您的企业所在的地区，国际展会则不用填</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right><font color=red>*</font>具体地址： &nbsp;</td>
	<td width="79%"><input name="z_zgname" type="text" size="35" maxlength="40" value="<%=rs1("dlxf_z_zgname")%>"></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right><font color=red>*</font>参展范围： &nbsp;</td>
	<td width="79%"><p style="line-height:180%"><textarea name="z_lr" cols=45 rows=3 onkeyUp="textLimit(this, 300);"><%=rs1("dlxf_z_lr")%></textarea><br><font color=#666666>限 5-300 个字符  已输入 <font color="#CC0000"><span id="messageCounts">0</span></font> 个字</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right><font color=red>*</font>主办方： &nbsp;</td>
	<td width="79%"><p style="line-height:180%"><input name="z_jb" type="text" size="35" value="<%=rs1("dlxf_z_jb")%>"><br><font color=#666666>多家协办请用 "|" 分开</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right>承办方： &nbsp;</td>
	<td width="79%"><p style="line-height:180%"><input name="z_cb" type="text" size="35" value="<%=rs1("dlxf_z_cb")%>"><br><font color=#666666>多家协办请用 "|" 分开</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right>协办方： &nbsp;</td>
	<td width="79%"><p style="line-height:180%"><input name="z_xb" type="text" size="35" value="<%=rs1("dlxf_z_xb")%>"><br><font color=#666666>多家协办请用 "|" 分开</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right>展会说明： &nbsp;</td>
	<td width="79%"><p style="line-height:180%"><textarea name="z_others" cols=45 rows=5 onkeyUp="textLimitCheck(this, 2000);"><%=rs1("dlxf_z_others")%></textarea><br><font color=#666666>限 20-2000 个字符  已输入 <font color="#CC0000"><span id="messageCount">0</span></font> 个字</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right>展会网址： &nbsp;</td>
	<td width="79%"><input name="z_web" type="text" size="35" value="<%=rs1("dlxf_z_web")%>"></td>
  </tr>
  <tr>
    <td width="21%" height=20 colspan=2 bgcolor=#D6DFF7 style="border-bottom:1px #6C90D1 solid">&nbsp;<strong>展会基础信息</strong></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right>展会周期： &nbsp;</td>
	<td width="79%">每 <select name="z_zq"><option value=""></option><%for i=1 to 20%><option value="<%=i%>"<%if rs1("dlxf_z_zq")=i then%> selected<%end if%>><%=i%></option><%next%></select> 年一届，是否是首届 <input type="checkbox" name="z_sj" value=1 style="border:0"<%if rs1("dlxf_z_sj")=1 then%> checked<%end if%>>
	</td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right>创办时间： &nbsp;</td>
	<td width="79%"><input name="z_cbdate" type="text" size="20" maxlength="15" value="<%=rs1("dlxf_z_cbdate")%>"></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right>展会区域： &nbsp;</td>
	<td width="79%"><select name="z_qy"><option value="国内展会"<%if rs1("dlxf_z_qy")="国内展会" then%> selected<%end if%>>国内展会</option><option value="国际展会"<%if rs1("dlxf_z_qy")="国际展会" then%> selected<%end if%>>国际展会</option></select>
	</td>
  </tr>
  <tr>
    <td height=50 align=right>展出行业： &nbsp;</td>
	<td><p style="line-height:180%"><select name="ypxxone_id" onChange="changelocation(document.addform.ypxxone_id.options[document.addform.ypxxone_id.selectedIndex].value)">
<option value="" selected>请选择大类</option>
<%sql="select *  from dlxf_ypxxone order by dlxf_date desc"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
while not rs.eof%>
<option value="<%=rs("dlxf_ypxxone_id")%>"><%=rs("dlxf_ypxxone")%></option>
<%rs.movenext
wend
rs.Close()
%> 
</select>
<select name="ypxxtwo_id">
<option selected value="">请选择小类</option>
</select> <font color=red>请重新选择</font><br><font color=#666666>可以只设大类行业，都不选则为综合展会。</font></td>
  </tr>
  <tr>
    <td width="21%" height=30 align=right>展会对象： &nbsp;</td>
	<td width="79%"><select name="z_xz"><option value="0"<%if rs1("dlxf_z_xz")=0 then%> selected<%end if%>>商人</option><option value="1"<%if rs1("dlxf_z_xz")=1 then%> selected<%end if%>>公众</option></select>
	</td>
  </tr>
  <tr>
    <td height=30 align=right>展会状态： &nbsp;</td>
	<td><input type="radio" name="key2" value=1 class=radio<%if rs1("dlxf_key2")=1 then%> checked<%end if%>> 开通　<input type="radio" name="key2" value=0 class=radio<%if rs1("dlxf_key2")=0 then%> checked<%end if%>> 不开通</td>
  </tr>
  <tr>
    <td height=30 align="center" colspan="2"><input type="submit" name="Submit" value="提 交" class="input1"></td>
  </tr>
</form>
</table>
<%rs1.close%>
<script language="javascript"> 
    changelocation(document.addform.ypxxone_id.options[document.addform.ypxxone_id.selectedIndex].value); 
</script>
<script language="javascript"> 
    changelocation1(document.addform.addone_id.options[document.addform.addone_id.selectedIndex].value); 
</script>
</body>
</html>