<!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>
<meta content="会展招标，展台招标，设计招标，招标信息，材料招标" name="keywords">
<meta content="会展之窗为参展商、展览公司、展览工厂、材料市场提供了一个招标投标的业务平台，在这里可以找到更好的服务，更好的材料，省心省力。" name="description">
<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>
<!--#include file="inc/Function.asp"-->
<!--#include file="inc/Config.asp"-->
<!--#include file="inc/conn.asp"-->
<body>
<!--#include file="top.asp"-->
<%
action=Request("action")
ItemClass=Request("ItemClass")
ProvinceID=Request("province")
Key=Request("Key")
%>
<table width="990" height="60" border="0" align="center" cellpadding="0" cellspacing="0" background="images/search03.jpg" class="margintop" style="background-repeat:no-repeat">
  <tr>
		<form action="?" name="frm" method="post">
		<input type="hidden" name="action" value="search" />
    <td width="160" height="60">&nbsp;</td>
    <td width="150" class="font14hui">快速接近您的目标：</td>
    <td width="100"><select name="ItemClass">
			<%
			Call ConnectionDataBase()
			Sql="Select * From T_Class Where CateID=1 Order BY SortID DESC,ID ASC"
			SetRs Rs,Sql,conn,1,1
			Do While Not Rs.eof
			%>
			<option value="<%=Rs("ID")%>" <%IF Cstr(Rs("ID"))=Cstr(ItemClass) Then Response.Write("selected")%>><%=Rs("ClassName")%></option>
			<%
			Rs.movenext
			Loop
			DisRs Rs
			%>
		</select></td>
    <td width="150"><select name="province">
			<%
			Sql="Select provinceID,province From T_Province"
			SetRs Rs,Sql,conn,1,1
			Do While Not Rs.eof
			%>
			<option value="<%=Rs("ProvinceID")%>" <%IF Cstr(Rs("provinceID"))=Cstr(provinceID) Then Response.Write("selected")%>><%=Rs("Province")%></option>
			<%
			Rs.movenext
			Loop
			DisRs Rs
			%>
		</select></td>
    <td width="180"><input type="text" name="Key" id="Key" value="<%=Key%>" /></td>
    <td><input type="image" name="btnSearch" src="images/search.jpg" /></td>
    <td>&nbsp;</td></form>
  </tr>
</table>
<table width="990" border="0" align="center" cellpadding="3" cellspacing="0" bgcolor="#F1F1F1" class="margintop">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>

		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="250" valign="top"><table width="95%" border="0" align="center" cellpadding="3" cellspacing="2">
                <tr>
                  <td><a href="addzb.asp"><img src="images/a_03.jpg" width="233" height="41" border="0" /></a></td>
                </tr>
                <tr>
                  <td><a href="javascript:showdiv('regtxt');"><img src="images/a_06.jpg" width="233" height="41" border="0" /></a></td>
                </tr>
                <tr>
                  <td height="30" align="center">已经注册会员，未登录的<a href="javascript:showdiv('logintxt');">立即登录</a></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
              </table></td>
              <td valign="top" bgcolor="#FFFFFF"><table width="98%" border="0" align="center" cellpadding="2" cellspacing="1">
                <%
		    Sql = "SELECT T.TenderID AS TenderID,Title,Content,Price,EndTime,Area,City,Total,ClassID FROM T_Tender AS T Left Join (Select count(*) AS total,TenderID From T_Ballot Group By TenderID) AS B ON T.TenderID=B.TenderID Where Recycle=0"	
			IF Action="search" Then Sql=Sql & " And ClassID=" & ItemClass & " AND title like '%"&Key&"%' AND City in (select areaid from t_area where father in (select cityid from t_city where father='"& ProvinceID &"'))"
			Sql=Sql & " Order By SortID DESC,AddTime DESC"
			SetRs Rs,Sql,conn,1,1
			IF Rs.eof And Rs.bof Then
				Response.Write "<tr><td>对不起,目前没有相关记录!</td></tr>"
			Else
				n=0
				Rs.pagesize=20
				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 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
				%>
                <tr>
                  <td height="60" align="center" bgcolor="#F6F6F6"> 报名数
                    <%IF isnull(Rs("Total")) Then Response.write "0" Else response.write Rs("Total")%>
                    位<br />
                    <%
				IF DateDiff("d",now(),EndTime)<0 OR Accept<>0 Then Response.Write "已结束" Else Response.Write "进行中"
				For i=0 To UBOUND(TenderClass)
					IF TenderClass(i,0)=Rs("ClassID") Then Response.Write("<br>【"&TenderClass(i,1)&"】")
				Next
				%>
                  </td>
                  <td bgcolor="#F6F6F6" style="line-height:25px;"><a href="addzb_s.asp?id=<%=Rs("TenderID")%>" class="font14hui">
                    <%LeftStr Rs("Title"),30%>
                    </a> [<%=Province%>]<br />
                    <span class="fontcont">招标需求:
                      <%LeftStr Rs("Content"),40%>
                      </span><br />
                    预算评估:¥<%=Rs("Price")%>元 &nbsp;&nbsp;结束时间:<%=Rs("EndTime")%> &nbsp;&nbsp;面积:<%=Rs("Area")%>平方米 </td>
                  <%  
					n=n+1     
					Rs.movenext
					IF n>=Rs.pagesize Then Exit Do
				Loop
			End IF
			%>
                </tr>
                <tr align="center">
                  <td colspan="2"><%
			IF Rs.recordcount>0 Then
				Call showpage(p,Rs.recordcount,Rs.pagesize,"?action="&action&"&ItemClass="&ItemClass&"&province="&ProvinceID&"&Key="&Server.URLEncode(Key),"&")
				DisRs Rs
			End IF
			Call CloseDataBase
			%>
                  </td>
                </tr>
              </table></td>
            </tr>
          </table>
		  </td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
<!--#include file="bottom.asp"-->
</body>
</html>
