<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>发布招标信息-会展之窗</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="js/site.js"></script>
<script language="JavaScript" type="text/javascript" src="js/calendar.js"></script>
</head>
<!--#include file="inc/Function.asp"-->
<!--#include file="inc/Config.asp"-->
<!--#include file="inc/conn.asp"-->
<%
'response.Write session("DjbUserName")
Call ChkLogin(Session("DjbUserName"))
ID=0
EndTime=date()
display="none"
Call ConnectionDataBase
IF Request("action")="modi" Then
	id = Request.QueryString("id")
	Call ChkIsNumber(id,"参数类型错误!")	
	Sql = "SELECT TOP 1 * FROM T_Tender WHERE TenderID=" & id
	SetRs Rs,Sql,conn,1,1
	IF Not Rs.EOF Then
		UserID = Rs("UserID")	
		ClassID = Rs("ClassID")	
		Title = Rs("Title")		
		EndTime = Formatdatetime(Rs("EndTime"),2)
		IF len(cstr(month(EndTime)))=1 Then
			M= "0"& month(EndTime)
		Else
			M=month(EndTime)
		End IF
		IF len(cstr(day(EndTime)))=1 Then
			D="0"&day(EndTime)
		Else
			D=day(EndTime)
		End IF
		EndTime=year(EndTime)&"-"&M&"-"&D
		Content = Rs("Content")
		Hits = Rs("Hits")
		Area = Rs("Area")	
		Price = Rs("Price")	
		AreaID = Rs("City")	
		House = Rs("House")	
		ImgTitle = Rs("ImgTitle")	
		ImgPath = Rs("ImgPath")	
		ImgTitles = Rs("ImgTitles")	
		ImgPaths = Rs("ImgPaths")	
		Email = Rs("Email")	
		Tel = Rs("Tel")	
		Mobile = Rs("Mobile")	
		Fax = Rs("Fax")	
		QQ = Rs("QQ")	
		MSN = Rs("MSN")	
		OpenContact = Rs("OpenContact")	
		Accept = Rs("Accept")
		AddTime	 = Rs("AddTime")	
		
		ItemsClassID=Rs("ItemsClass")
		StepClassID=Rs("StepClass")
		years=Rs("years")
		months=Rs("months")
		designer=Rs("designer")

		Sql="Select father From T_Area Where areaID='"& AreaID &"'"
		SetRs Rs1,Sql,conn,1,1
		IF Not Rs1.Eof Then	
			CityID=Rs1("father")
		End IF
		DisRs Rs1
		Sql="Select father From T_City Where cityID='"& CityID &"'"
		SetRs Rs1,Sql,conn,1,1
		IF Not Rs1.Eof Then
			ProvinceID=Rs1("father")
		End IF
		DisRs Rs1
		IF ClassID=2 Then display="block"

	End IF
	DisRs Rs
	
End IF
%>
<body>
<!--#include file="top.asp"-->

<table width="990" border="0" align="center" cellpadding="3" cellspacing="0" bgcolor="#F1F1F1" class="margintop">
  <tr>
    <td width="734"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/usr_03.jpg" width="734" height="64" /></td>
      </tr>
      <tr>
        <td><img src="images/usr_05.jpg" width="734" height="91" /></td>
      </tr>
      <tr>
        <td background="images/s_06.jpg">
		<form action="submit.asp" name="frm" method="post" onsubmit="return chkzhaobiao()">
		<input type="hidden" name="action" value="addzb" />
		<input type="hidden" name="UserID" value="<%=Session("DjbUserID")%>" />
		<input type="hidden" name="ID" value="<%=ID%>" />
		<table width="685" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><img src="images/usr_08.jpg" width="685" height="46" /></td>
          </tr>
          <tr>
            <td><table width="98%" border="0" align="center" cellpadding="2" cellspacing="0">
              <tr>
                <td width="110" height="30" align="right" class="fontaddzb">招标类型</td>
                <td class="font14d">
				<%
				For i=0 To ubound(TenderClass)
				checked=""
				IF ClassID="" Then
					IF i=0 Then checked="checked"
				Else
					IF TenderClass(i,0)=ClassID Then checked="checked"
				End IF
				%>
					<input name="rdTender" type="radio" value="<%=TenderClass(i,0)%>" onclick="showItem(<%=TenderClass(i,0)%>)" <%=checked%> /> <%=TenderClass(i,1)%>
				<%Next%>
				*</td>
              </tr>
			  <tr>
                <td height="30" align="right" class="fontaddzb">项目名称</td>
                <td class="font14d"><input type="text" name="Title" id="Title" value="<%=Title%>" />
                  *</td>
              </tr>
              <tr>
                <td height="30" align="right" class="fontaddzb">项目描述</td>
                <td class="font14d"><textarea name="content" id="content" rows="5" cols="40"><%=Content%></textarea>
                  *</td>
              </tr>
              <tr>
                <td height="30" align="right" class="fontaddzb">展位面积</td>
                <td class="font14d"><input type="text" name="areas" id="areas" value="<%=area%>" /> 平方米</td>
              </tr>
              <tr>
                <td height="30" align="right" class="fontaddzb">预算评估</td>
                <td class="font14d"><input type="text" name="Price" id="Price" value="<%=price%>" /> 元
                  *</td>
              </tr>
              <tr>
                <td height="30" align="right" class="fontaddzb">所在城市</td>
                <td class="font14d">
					<select name="province" style="width:100px" onchange="GetCity(this.options[this.selectedIndex].value)">
					<%
					Sql="Select provinceID,province From T_Province"
					SetRs Rs,Sql,conn,1,1
					IF Not Rs.Eof Then
					IF ProvinceID="" Then provinceID=Rs("provinceID")
					Do While Not Rs.eof
					%>
					<option value="<%=Rs("ProvinceID")%>" <%IF ProvinceID=Rs("ProvinceID") Then Response.Write("selected")%>><%=Rs("Province")%></option>
					<%
					Rs.movenext
					Loop
					End IF
					DisRs Rs
					%>
				  </select>
				  <select name="city" id="city" style="width:100px" onchange="GetArea(this.options[this.selectedIndex].value)">
					<%
					Sql="Select cityID,city From T_City Where father='"& provinceID &"'"
					SetRs Rs,Sql,conn,1,1
					IF Not Rs.Eof Then
					IF CityID="" Then cityID=Rs("cityID")
					Do While Not Rs.eof
					%>
					<option value="<%=Rs("cityID")%>" <%IF CityID=Rs("CityID") Then Response.Write("selected")%>><%=Rs("city")%></option>
					<%
					Rs.movenext
					Loop
					End IF
					DisRs Rs
					%>
				  </select>
				  <select name="area" id="area" style="width:100px">
					<%
					Sql="Select areaID,area From T_Area Where father='"& cityID &"'"
					SetRs Rs,Sql,conn,1,1
					IF Not Rs.Eof Then
					Do While Not Rs.eof
					%>
					<option value="<%=Rs("areaID")%>" <%IF AreaID=Rs("areaID") Then Response.Write("selected")%>><%=Rs("area")%></option>
					<%
					Rs.movenext
					Loop
					End IF
					DisRs Rs
					
					%>
				  </select>
                  *</td>
              </tr>
              <tr>
                <td height="30" align="right" class="fontaddzb">展位类型</td>
                <td class="font14d">
				  <%
				  Sql="Select * From T_Class Where CateID=1 Order BY SortID DESC,ID ASC"
				  SetRs Rs,Sql,Conn,1,1
				  n=0
				  Do While Not Rs.Eof
				  	checked=""
					IF House<>"" Then
						IF House=Rs("ID") Then checked="checked"
					Else
				  		IF n=0 Then checked="checked"
					End IF
					n=n+1
					Response.Write "<div style='width:120px; float:left'><input type='radio' name='houseid' id='houseid' value='"& Rs("ID") &"' "& checked &" /> " & Rs("ClassName") & "</div>"
				  Rs.movenext
				  Loop
				  DisRs Rs				  
				  %>
				</td>
              </tr>
              <tr>
                <td height="30" align="right" class="fontaddzb">结束时间</td>
                <td class="font14d"><input type="text" name="EndTime" id="EndTime" onfocus="setday(this)"  value="<%=EndTime%>" readonly/>
                  *</td>
              </tr>
              <tr>
                <td height="30" align="right" class="fontaddzb">传展位图<br /></td>
                <td class="font14d">
                  <input name="ImgTitle" type="text" value="<%=ImgTitle%>" />
                  <input type="text" name="ImgPath" id="ImgPath" class="txt" value="<%=ImgPath%>" />
    			  <input type="button" value="添加附件" class="btn2" onClick="window.open('inc/UpLoad.asp?formname=frm&EditName=ImgPath&filepath=House&fileType=gif,jpg,png,rar,zip,doc,docx,cdr,dwg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> <br />支持格式:gif,jpg,png,rar,zip,doc,docx,cdr,dwg</td>
              </tr>
              <tr>
                <td height="30" align="right" class="fontaddzb">传参考图</td>
                <td class="font14d" id="upfiles"> 
				  <%
				  iCount=1
				  IF ImgPaths<>"" and not isnull(ImgPaths) Then
				  	Imgs=Split(ImgPaths,",")
					Titles=	Split(ImgTitles,",")				
					For i=0 To UBOUND(Imgs)
						IF Imgs(i)<>"" Then							
				  			%>
							  <input name="ImgTitle<%=iCount%>" type="text" value="<%=Titles(i)%>" />
							  <input type="text" name="ImgPath<%=iCount%>" id="ImgPath<%=iCount%>" class="txt" value="<%=Imgs(i)%>" />
							  <input type="button" value="添加附件" class="btn2" onClick="window.open('inc/UpLoad.asp?formname=frm&EditName=ImgPath<%=iCount%>&filepath=House&fileType=gif,jpg,png','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> 							  
				  			<%
							IF iCount=1 Then Response.Write("+<a href=""javascript:addcontrol()"">增加</a>")
							Response.Write("<br>")
							iCount=iCount+1
						End IF
					Next
					IF iCount>1 Then iCount=iCount-1
				  Else
				  %>
				  <input name="ImgTitle1" type="text" value="附件说明" />
                  <input type="text" name="ImgPath1" id="ImgPath1" class="txt" value="<%=ImgPath1%>" />
    			  <input type="button" value="添加附件" class="btn2" onClick="window.open('inc/UpLoad.asp?formname=frm&EditName=ImgPath1&filepath=House&fileType=gif,jpg,png','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"> +<a href="javascript:addcontrol()">增加</a>
				  <%
				  End IF
				  %>                 
				  <input type="hidden" name="RowsCount" id="RowsCount" value="<%=iCount%>" />				  
				  <br />支持格式:gif,jpg,png<br />
				  </td>
              </tr>
			  <tr id="item1" style="display:<%=display%>">
                <td height="30" align="right" class="fontaddzb">项目风格</td>
                <td class="font14d">
				  <%
				  For i=0 To UBOUND(ItemsClass)
				  	checked=""
					IF ItemsClassID="" Then
				  		IF i=0 Then checked="checked"
					Else
						IF ItemsClass(i,0)=ItemsClassID Then checked="checked"
					End IF
					Response.Write "<div style='width:120px; float:left'><input type='radio' name='ItemsClassID' id='ItemsClassID' value='"& ItemsClass(i,0) &"' "& checked &" /> " & ItemsClass(i,1) & "</div>"
				  Next			  
				  %>
				</td>
              </tr>
			  <tr id="item2" style="display:<%=display%>">
                <td height="30" align="right" class="fontaddzb">项目阶段</td>
                <td class="font14d">
				<select name="StepClass" id="StepClass">
				  <%
				  For i=0 To UBOUND(StepClass)
				  	selected=""
					IF StepClassID="" Then
				  		IF i=0 Then selected="selected"
					Else
						IF StepClass(i,0)=StepClassID Then selected="selected"
					End IF
				  	
					Response.Write "<option value='"& StepClass(i,0) &"' "& selected &" > " & StepClass(i,1) & "</option>"
				  Next			  
				  %>
				  </select>
				</td>
              </tr>
			  <tr id="item3" style="display:<%=display%>">
                <td height="30" align="right" class="fontaddzb">布展时间</td>
                <td class="font14d">
				  <select name="years" id="years">
				  	<%
					For i=year(now())+1 to 2010 step -1
					selected=""
					IF years="" Then
					Else
						IF i=years Then selected="selected"
					End IF
					%>
					<option value="<%=i%>" <%=selected%>><%=i%></option>
					<%Next%>
				  </select>
				  年
				  <select name="months" id="months">
				  	<%
					For i=1 to 12
					selected=""
					IF months="" Then
					Else
						IF i=months Then selected="selected"
					End IF
					%>
					<option value="<%=i%>" <%=selected%>><%=i%></option>
					<%Next%>
				  </select>
				  月左右
				</td>
              </tr>
			  <tr id="item4" style="display:<%=display%>">
                <td height="30" align="right" class="fontaddzb">负责人</td>
                <td class="font14d">
				  <input type="text" name="designer" id="designer" value="<%=designer%>" />
				</td>
              </tr>
              <tr>
                <td height="30" align="right" class="fontaddzb">&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table></td>
          </tr>
          
          <tr>
            <td><img src="images/usr_11.jpg" width="685" height="46" /></td>
          </tr>
          <tr>
            <td>
			<%
			IF Request("action")<>"modi" Then
				Sql="Select TOP 1 Email,Tel,Mobile,Fax,QQ,MSN From T_Users Where ID=" & Session("DjbUserID")
				SetRs Rs,Sql,conn,1,1
				IF Not Rs.Eof Then
					Email=Rs("Email")
					Tel=Rs("Tel")
					Mobile=Rs("Mobile")
					Fax=Rs("Fax")
					QQ=Rs("QQ")
					MSN=Rs("MSN")
				End IF			
				DisRs Rs
			End IF
			Call CloseDatabase
			%>
			<table width="98%" border="0" align="center" cellpadding="2" cellspacing="0">
              <tr>
                <td width="146" height="30" align="right" class="fontaddzb">联系方式是否公开</td>
                <td width="525" class="fontaddzb"><p>
                  <input type="radio" name="OpenContact" value="0" checked="checked" />
                  仅对竞标者公开<br />
                  <input type="radio" name="OpenContact" value="1" <%IF OpenContact Then Response.Write("checked")%> />
                仅向所有入围竞标者公开</p>
                  </td>
              </tr>
              <tr>
                <td rowspan="6" align="right" class="fontaddzb">当前您留的联系方式</td>
                <td height="25" class="fontaddzb">E-mail:
                  <input type="text" name="Email" id="Email" value="<%=Email%>" /></td>
              </tr>
              
              <tr>
                <td height="25" class="fontaddzb">座机:
                  <input type="text" name="Tel" id="Tel" value="<%=Tel%>" /></td>
              </tr>
              <tr>
                <td height="25" class="fontaddzb">手机:
                  <input type="text" name="Mobile" id="Mobile" value="<%=Mobile%>" /></td>
              </tr>
              <tr>
                <td height="25" class="fontaddzb">传真:
                  <input type="text" name="Fax" id="Fax" value="<%=Fax%>" /></td>
              </tr>
              <tr>
                <td height="25" class="fontaddzb">QQ:
                  <input type="text" name="QQ" id="QQ" value="<%=QQ%>" /></td>
              </tr>
              <tr>
                <td height="25" class="fontaddzb">MSN:
                  <input type="text" name="MSN" id="MSN" value="<%=MSN%>" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><input name="Submit" value="提交" type="image" src="images/usr_14.jpg"  width="65" height="33" />              </td>
          </tr>
        </table>
		</form>
		</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
    <td>&nbsp;</td>
  </tr>
</table>
<!--#include file="bottom.asp"-->
</body>
</html>
