<!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 type="text/css" rel="stylesheet" href="../Css/style.css" />
<script language="javascript" type="text/javascript" src="../jQuery/lib/jquery.js"></script>
<script language="javascript" type="text/javascript" src="../js/WebSite.js"></script>
<script language="javascript" type="text/javascript" src="../js/ChkForm.js"></script>
<script language="JavaScript" type="text/javascript" src="../js/Calendar.js"></script>
</head>
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Function.asp"-->
<!--#include file="../../inc/Config.asp"-->
<body>
<%
Call ChkLogin(session("WebAdminsUserName"))
Call ConnectionDataBase(2)

id = Request.QueryString("id")
Call ChkIsNumber(id,"参数类型错误!")
IF id>0 Then
	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)
		Content = Rs("Content")
		Hits = Rs("Hits")
		Area = Rs("Area")	
		Price = Rs("Price")	
		CityID = 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")	
		
		Sql="Select RealName From T_Users Where ID=" & UserID
		SetRs Rs1,Sql,conn,1,1
		IF Not Rs1.Eof Then RealName=Rs1("RealName")
		DisRs Rs1
		Sql="Select ClassName From T_Class Where ID=" & ClassID
		SetRs Rs1,Sql,conn,1,1
		IF Not Rs1.Eof Then ClassName=Rs1("ClassName")
		DisRs Rs1
		Sql="Select area,father From T_Area Where areaID='"& CityID &"'"
		SetRs Rs1,Sql,conn,1,1
		IF Not Rs1.Eof Then
			AreaName=Replace(Rs1("area"),"市辖区","")			
			fatherid=Rs1("father")
		End IF
		DisRs Rs1
		Sql="Select city,father From T_City Where cityID='"& fatherid &"'"
		SetRs Rs1,Sql,conn,1,1
		IF Not Rs1.Eof Then
			CityName=Replace(Replace(Replace(Rs1("city"),"市辖区",""),"县",""),"市","")
			fatherid=Rs1("father")
		End IF
		DisRs Rs1
		Sql="Select province From T_Province Where provinceID='"& fatherid &"'"
		SetRs Rs1,Sql,conn,1,1
		IF Not Rs1.Eof Then ProvinceName=Rs1("province")
		DisRs Rs1
	End IF
	DisRs Rs
End IF
Call CloseDatabase
%>

<table width="100%" border="0" cellspacing="0" cellpadding="0">  
  <tr>
    <td width="15%" align="right">项目名称：</td>
    <td width="85%" align="left"><%=Title%> &nbsp;<%IF DateDiff("d",now(),EndTime)<0 OR Accept<>0 Then Response.Write "<font color='#ff0000'>[结束]</font>"%></td>
  </tr>
  <tr>
    <td width="15%" align="right">招标类型：</td>
    <td width="85%" align="left">
	<%
	For i=0 To ubound(TenderClass)
		IF TenderClass(i,0)=ClassID Then
			Response.Write TenderClass(i,1)
			Exit For
		End IF
	Next
	%></td>
  </tr>
  <tr>
    <td width="15%" align="right">发布人姓名：</td>
    <td width="85%" align="left"><%=RealName%></td>
  </tr>
  <tr>
    <td width="15%" align="right">截止日期：</td>
    <td width="85%" align="left"><%=EndTime%>   </td>
  </tr>
  <tr>
    <td align="right">点击数：</td>
    <td align="left"><%=Hits%></td>
  </tr>
  <tr>
    <td width="15%" align="right">建筑面积：</td>
    <td width="85%" align="left"><%=Area%>平方米</td>
  </tr>
  <tr>
    <td width="15%" align="right">预算评估：</td>
    <td width="85%" align="left"><%=Price%>元左右</td>
  </tr>
  <tr>
    <td width="15%" align="right">所在城市：</td>
    <td width="85%" align="left"><%Response.Write ProvinceName & "&nbsp;" & CityName & "&nbsp;" & AreaName%></td>
  </tr>
  <tr>
    <td width="15%" align="right">房屋类型：</td>
    <td width="85%" align="left"><%=ClassName%></td>
  </tr>  
  <tr>
    <td width="15%" align="right">联系方式公开方式：</td>
    <td width="85%" align="left"><%IF OpenContact Then Response.Write "仅向所有入围竞标者公开" Else Response.Write "对所有竞标者公开"%></td>
  </tr>
  <tr>
    <td width="15%" align="right">E-mail：</td>
    <td width="85%" align="left"><%=Email%></td>
  </tr>
  <tr>
    <td width="15%" align="right">座机：</td>
    <td width="85%" align="left"><%=Tel%></td>
  </tr>
  <tr>
    <td width="15%" align="right">手机：</td>
    <td width="85%" align="left"><%=Mobile%></td>
  </tr>
  <tr>
    <td width="15%" align="right">传真：</td>
    <td width="85%" align="left"><%=Fax%></td>
  </tr>
  <tr>
    <td width="15%" align="right">QQ：</td>
    <td width="85%" align="left"><%=QQ%></td>
  </tr>
  <tr>
    <td width="15%" align="right">MSN：</td>
    <td width="85%" align="left"><%=MSN%></td>
  </tr>  
  <tr>
    <td width="15%" align="right">户型图：</td>
    <td width="85%" align="left">
	<a href="/UpLoadFiles/House/<%=ImgPath%>" target="_blank">点击下载</a>
	</td>
  </tr>
  <tr>
    <td width="15%" align="right">其他参考图：</td>
    <td width="85%" align="left">
	<%
	IF ImgPaths<>"" Then
		Imgs=Split(ImgPaths,",")
		Titles=Split(ImgTitles,",")
		For i=0 To UBOUND(Imgs)
			IF Imgs(i)<>"" Then
				Response.Write "<div class='FloatLeft' style='margin-right:15px'><img src='/UpLoadFiles/House/"& Imgs(i) &"' width='100' /><br />"
				Response.Write Titles(i) & "</div>"
			End IF
		Next
	End IF
	%>
	</td>
  </tr>
  <tr>
    <td align="right">招标内容：</td>
    <td align="left"><%=Content%></td>
  </tr>
  <tr>
    <td align="right">&nbsp;</td>
    <td align="left"><a href="javascript:window.history.back()">返回上一页</a></td>
  </tr>  
</table>
</body>
</html>
