<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="inc/Function.asp"-->
<!--#include file="inc/Config.asp"-->
<!--#include file="inc/conn.asp"-->
<%
ID=Request.QueryString("ID")
Call ChkIsNumber(ID,"对不起,请文明访问本站")
Call ConnectionDataBase()
Sql="Select * From T_Tender Where TenderID=" & ID
SetRs Rs,Sql,conn,1,1
IF Not Rs.Eof Then

	ClassID=Rs("ClassID")
	Title=Rs("Title")
	content=Rs("content")
	Area=Rs("area")
	Price=Rs("Price")
	City=Rs("city")
	House=Rs("house")
	Accept=Rs("Accept")
	EndTime=Rs("EndTime")
	ImgTitle=Rs("ImgTitle")
	ImgPath=Rs("ImgPath")
	ImgTitles=Rs("ImgTitles")
	ImgPaths=Rs("ImgPaths")
	OpenContact=Rs("OpenContact")
	Email=Rs("email")
	Tel=Rs("Tel")
	Mobile=Rs("Mobile")
	Fax=Rs("Fax")
	QQ=Rs("qq")
	MSN=Rs("MSN")
	UserID=Rs("UserID")
	ItemsClassID=Rs("ItemsClass")
	StepClassID=Rs("StepClass")
	years=Rs("years")
	months=Rs("months")
	designer=Rs("designer")
	IF Isnumeric(House) Then
	Sql="Select ClassName From T_Class Where ID=" & House
	SetRs Rs1,Sql,conn,1,1
	IF Not Rs.Eof Then ClassName=Rs1("ClassName")
	DisRs Rs1
	End IF
	For i=0 To UBOUND(TenderClass)
		IF TenderClass(i,0)=ClassID Then
			ZbClass=TenderClass(i,1)
			Exit For
		End IF
	Next
	'省
	StrSql="Select Province From T_Province Where provinceID=(select father from t_city where cityid=(select father from t_area where areaid='"& Rs("City") &"'))"
	SetRs Rs1,StrSql,conn,1,1
	IF Not Rs1.Eof Then Province=Rs1("Province")
	DisRs Rs1
	'市
	StrSql="select city from t_city where cityid=(select father from t_area where areaid='"& Rs("City") &"')"
	SetRs Rs1,StrSql,conn,1,1
	IF Not Rs1.Eof Then city=Replace(Replace(Rs1("city"),"市辖区",""),"县","")
	DisRs Rs1
	'区
	StrSql="select area from t_area where areaid='"& Rs("City") &"'"
	SetRs Rs1,StrSql,conn,1,1
	IF Not Rs1.Eof Then town=Replace(Rs1("area"),"市辖区","")
	DisRs Rs1
	'投票数
	StrSql="select count(*) as total from t_ballot where tenderid=" & id
	SetRs Rs1,StrSql,conn,1,1
	IF Not Rs1.Eof Then total=Rs1("total")
	DisRs Rs1
	'项目风格
	For i=0 To UBOUND(ItemsClass)
		IF ItemsClass(i,0)=ItemsClassID Then ItemsName=ItemsClass(i,1)
	Next
	'项目阶段
	For i=0 To UBOUND(StepClass)
		IF StepClass(i,0)=StepClassID Then StepName=StepClass(i,1)
	Next		
End IF
DisRs Rs

%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%= 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>
</head>

<body>
<!--#include file="top.asp"-->

<table width="990" border="0" align="center" cellpadding="0" cellspacing="0" class="margintop">
  <tr>
    <td width="756" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/zbs_03.jpg" width="756" height="40" /></td>
      </tr>
      <tr>
        <td height="300" valign="top" class="bordertree"><br />
          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="margintop">
          <tr>
            <td width="67" valign="top">
			
			<table width="67" height="58" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center" valign="middle" background="images/zbs_11.jpg">				
<br/>
<%IF DateDiff("d",now(),EndTime)<0 OR Accept>0 Then Response.Write("<font color='#ff0000'>[已结束]</font>") else Response.Write("<font color='#ff0000'>[进行中]</font>") %>
				
				
				</td>
              </tr>
            </table>
		
			<br />
			<table width="67" height="58" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td align="center" valign="middle" background="images/zbs_10.jpg"><br/><%=total%></td>
              </tr>
            </table></td>
            <td><table width="98%" height="223" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#F5F5F5">
              <tr>
                <td height="25" colspan="2" bgcolor="#FFFFFF" class="fontaddzb2"><strong class="font14hui">
				<%
				For i=0 To UBOUND(TenderClass)
					IF TenderClass(i,0)=ClassID Then Response.Write("【"&TenderClass(i,1)&"】")
				Next
				Response.Write Title
				%>
				</strong></td>
                <td bgcolor="#FFFFFF" class="fontaddzb2">结束时间：<%=EndTime%></td>
              </tr>
              <tr>
                <td width="33%" height="25" bgcolor="#FFFFFF" class="fontaddzb2">项目类型：<%=ClassName%></td>
                <td width="33%" bgcolor="#FFFFFF" class="fontaddzb2">预算评估：¥<%=Price%>元</td>
                <td width="33%" bgcolor="#FFFFFF" class="fontaddzb2">项目规模：<%=Area%>平方米</td>
              </tr>
              <tr>
                <td height="25" bgcolor="#FFFFFF" class="fontaddzb2">招标类型：<%=ZbClass%></td>
                <td bgcolor="#FFFFFF" class="fontaddzb2" colspan="2">项目地点：<%=Province&"&nbsp;"&city&"&nbsp;"&town%></td>
              </tr>
              <tr>
                <td height="25" bgcolor="#FFFFFF" class="fontaddzb2">展位图：<a href="/UpLoadFiles/House/<%=ImgPath%>" target="_blank">点击下载</a></td>
                <td colspan="2" bgcolor="#FFFFFF" class="fontaddzb2">&nbsp;</td>
                </tr>
              <tr>
                <td height="25" bgcolor="#FFFFFF" class="fontaddzb2" colspan="3"><div class="FloatLeft">相关参考图：</div>
				<%
				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'><div style='height:100px'><a href='/UpLoadFiles/House/"& Imgs(i) &"' target='_blank'><img src='/UpLoadFiles/House/"& Imgs(i) &"' width='100' /></a></div><div>"
							Response.Write Titles(i) & "</div></div>"
						End IF
					Next
				End IF
				%>				</td>
                </tr>
              <tr>
                <td height="25" bgcolor="#FFFFFF" class="fontaddzb2" colspan="3">招标需求：<%=content%></td>
                </tr>
			  <%IF ClassID=2 Then%>
			  <tr>
                <td height="25" bgcolor="#FFFFFF" class="fontaddzb2" colspan="3">项目风格：<%=ItemsName%></td>
              </tr>
			  <tr>
                <td height="25" bgcolor="#FFFFFF" class="fontaddzb2" colspan="3">项目阶段：<%=StepName%></td>
              </tr>
			  <tr>
                <td height="25" bgcolor="#FFFFFF" class="fontaddzb2" colspan="3">采购时间：<%=years%>年<%=months%>月左右</td>
              </tr>
			  <tr>
                <td height="25" bgcolor="#FFFFFF" class="fontaddzb2" colspan="3">项目负责人：<%=designer%></td>
              </tr>
			 <%End IF%>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td valign="top"><table width="223" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="images/zbs_05.jpg" width="223" height="51" /></td>
      </tr>
      <tr>
        <td height="230" valign="top" background="images/zbs_13.jpg">
		<div style="margin:4px 18px auto 18px">
		<img src="images/untitled.jpg" width="80" height="80"><br />
		发布人:
		<%
		Sql="select id,RealName from t_users where ID=" & UserID
		SetRs Rs,Sql,conn,1,1
		IF Not Rs.Eof Then Response.Write Rs("RealName")
		DisRs Rs
		%>
		<br/>来自:<%=Province&City%>
		<br/><br/>	
		<%			
				IF Session("DjbUserName")<>"" Then
					IF OpenContact and Session("VIP")=1 OR OpenContact=false Then
		%>
			
				<%IF Email<>"" Then%>E-mail:<%=Email%><br /><%End IF%>
				<%IF Tel<>"" Then%>
				座机:<%=Tel%><br /><%End IF%>
				<%IF Mobile<>"" Then%>手机:<%=Mobile%><br /><%End IF%>
				<%IF Fax<>"" Then%>传真:<%=Fax%><br /><%End IF%>
				<%IF QQ<>"" Then%>QQ: <%=QQ%><br /><%End IF%>
				<%IF MSN<>"" Then%>MSN:<%=MSN%><br /><%End IF%>
				
				
				<%Else%>
					
						仅向VIP高级会员竞标者公开
		<%
				End IF
				  End IF
		%>
				
			</div>		</td>
      </tr>
      <tr>
        <td><img src="images/zbs_15.jpg" width="223" height="17" /></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="990" height="80" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#cdcdcd" class="margintop">
  <tr>
    <td valign="middle" bgcolor="#FFFFFF"><img src="images/zbs_18.jpg" width="158" height="31" align="left" /> <table width="361" height="31" border="0">
      <tr>
        <td width="47" align="right" bordercolor="0"><img src="images/best.gif" alt="中标" width="24" height="22" /></td>
        <td width="64" align="center" bordercolor="0">中标人： </td>
        <td width="236" bordercolor="0"><%
		Sql="select nickname from t_users where ID=" & Accept
		SetRs Rs,Sql,conn,1,1
		IF Not Rs.Eof Then Response.Write Rs("nickname")
		DisRs Rs
		%></td>
      </tr>
    </table>
      <br />
		<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#cdcdcd" class="margintop">
		<%
		Sql = "SELECT U.ID AS UserID,B.Content AS Content,OpenType,Logo,NickName,CityID FROM T_Ballot AS B Left Join T_Users AS U ON B.UserID=U.ID Where TenderID="&ID&" Order By B.AddTime DESC"	
		SetRs Rs,Sql,conn,1,1
		IF Rs.eof And Rs.bof Then
		Else
			n=0
			Rs.pagesize=10
			IF Not isempty(request("page")) And isnumeric(request("page")) Then 				  
				p=cint(request("page"))   
				IF p>Rs.pagecount Then p=Rs.pagecount
			Else   
				p=1
			End IF             
			Rs.AbsolutePage=p
			Do While Not Rs.eof	
			StrSql="select city from t_city where cityid=(select father from t_area where areaid='"& Rs("CityID") &"')"
			SetRs Rs1,StrSql,conn,1,1
			IF Not Rs1.Eof Then city=Rs1("city")
			DisRs Rs1
		%>
		<tr>
		<td width="15%" align="center" valign="top" bgcolor="#FFFFFF">
		<%
		nickname="匿名"
		content="-该内容被作者设置为隐藏-"
		logo="images/untitled.jpg"
		IF Rs("Logo")<>"" Then
			IF Rs("OpenType")=0 Then
				logo="/UpLoadFiles/Users/" & Rs("Logo")
			ElseIF Rs("OpenType")=2 Then
				IF Session("DjbUserID")=UserID Then
					logo="/UpLoadFiles/Users/" & Rs("Logo")
				End IF
			End IF
		End IF
		IF Rs("OpenType")=0 Then
			nickname=Rs("NickName")
			from="来自:" & City
			content=Rs("Content")
		ElseIF Rs("OpenType")=2 Then
			IF Session("DjbUserID")=UserID Then
				nickname=Rs("NickName")
				from="来自:" & City
				content=Rs("Content")
			End IF
		End IF
		%>
		<img src="<%=logo%>" width="84" vspace="5" /><br />
		<%=nickname%><br /><%=from%>		</td>
		<td width="75%" valign="top" bgcolor="#FFFFFF"><%=content%></td>
		<td width="10%" align="center" valign="middle" bgcolor="#FFFFFF">

<%if UserID=Session("DjbUserID") then %>


		<%IF (DateDiff("d",now(),EndTime)<0 OR Accept>0 ) Then %>
		
		
		<%else%>
				
		<input type="button" name="submit" value="设置中标人"  onclick="window.location.href='Submit.asp?action=AcceptTender&UserID=<%=Rs("UserID")%>&TenderID=<%=ID%>'">
	<%end if%>	
		
<%end if%>
		
		</td>
		</tr>
		<%  
				n=n+1     
				Rs.movenext
				IF n>=Rs.pagesize Then Exit Do
			Loop
		End IF
		IF Rs.recordcount>0 Then
		%>
		<tr><td colspan="3" bgcolor="#FFFFFF">
		<%
			Call showpage(p,Rs.recordcount,Rs.pagesize,"?ID=" & ID,"&")
			DisRs Rs
			Response.Write("</td></tr>")
		End IF
		Call CloseDataBase
		%>
	  </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="31" background="images/zbs_22.jpg" class="font14hui">&nbsp;竟价答疑/报名</td>
        </tr>
        <tr>
          <td class="bordertree">
		  <form action="submit.asp" method="post" name="frm" style="margin:0" onsubmit="return chkaddzb()">
		  <input type="hidden" name="action" value="submitballot" />
		  <input type="hidden" name="TenderID" value="<%=ID%>" />
		  <input type="hidden" name="UserID" value="<%=Session("DjbUserID")%>" />
		  <table width="99%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>
			  <textarea name="content" id="content" cols="60" rows="7"></textarea><br />
			  <input type="radio" name="OpenType" value="0" checked="checked" /> 完全公开
			  <input type="radio" name="OpenType" value="1" /> 匿名
			  <input type="radio" name="OpenType" value="2" /> 仅向发布招标者公开
			  </td>
            </tr>
            <tr>
              <td>
			  <input type="image" src="images/zbs_26.jpg" width="63" height="28"   />
			  <%
			  IF Session("DjbUserName")="" Then
			  	Response.Write "<a href='login.asp'>登陆</a>(请登陆后再发布投标信息)"
			  Else
			  	IF Session("VIP")=0 Then Response.Write("只有VIP会员才能发布投标信息")
			  End IF
			  %>
			  
			  </td>
            </tr>
          </table>
		  </form>
		  </td>
        </tr>
    </table></td>
  </tr>
</table>
<!--#include file="bottom.asp"-->
</body>
</html>
