<!--#include file="Common/Inc_DatConn.asp"-->
<!--#include file="Common/Inc_Function.asp"-->

<%
bid=RtnReplaceInt(request("bid"),0)
sid=RtnReplaceInt(request("sid"),0)
lx=RtnReplaceInt(request("lx"),0)
px=changechr(request("px"))
sdq=changechr(request("sdq"))
dqwz ="所有信息"
if px="tj" then
dqwz ="推荐信息"
end if
if sdq<>"" then
dqwz =""&sdq&""
end if
if px="hits" then
dqwz ="热门信息"
end if
strKeyword=changechr(request("Keyword"))
InfoClass=changechr(request("InfoClass"))
InfoAdd=changechr(request("InfoAdd"))
dq=changechr(request("dq"))
BigClassName=changechr(request("BigClassName"))
SmallClassName=changechr(request("SmallClassName"))
if strKeyword<>"" then
dqwz ="信息搜索"
end if
if dq<>"" then
dqwz =""&dq&""
end if
if px="" then
px="InfoKey"
end if
if px<>"" and px<>"tj" and px<>"hits" and px<>"InfoKey" then
		response.write "<script>alert('对不起，搜索条件错误，请返回！');window.close();</Script>"
		response.end
end if
if bid<>0 then
set rsb=server.createobject("adodb.recordset")
sqlb="select * from bigclass where id="&bid
rsb.open sqlb,conn,1,1
	if rsb.eof and rsb.bof  then 
		response.write "<script>alert('对不起，此分类不存在，请返回！');window.close();</Script>"
		response.end
	else
strurl_list3=gqwebdir&"list.asp?bid="&bid
	dlmc=rsb("bigclassname")
	dqwz="<a class=links href="&gqwebdir&"class.asp target=_blank>供求分类</a> <span class=STYLE1>>></span> <a class=links  href="&strurl_list3&">"&dlmc&"</a>"
end if
rsb.close
set rsb=nothing
end if
if sid<>0 then
set rss=server.createobject("adodb.recordset")
sqls="select * from smallclass where id="&sid
rss.open sqls,conn,1,1
	if rss.eof and rss.bof  then 
		response.write "<script>alert('对不起，此分类不存在，请返回！');window.close();</Script>"
		response.end
	else
set rssd=server.createobject("adodb.recordset")
sqlsd="select * from bigclass where id="&clng(rss("dl"))
rssd.open sqlsd,conn,1,1
	dlmc=rssd("bigclassname")
rssd.close
set rssd=nothing
xlname=rss("smallclassname")
rssdlid=rss("dl")
strurl_list=gqwebdir&"list.asp?bid="&rssdlid
strurl_list1=gqwebdir&"list.asp?sid="&sid
	dqwz="<a href="&gqwebdir&"class.asp target=_blank class=links >供求分类</a> <span class=STYLE1>>></span> <a class=links href="&strurl_list&" target=_blank>"&dlmc&"</a> <span class=STYLE1>>></span> <a class=links  href="&strurl_list1&">"&xlname&"</a>"
end if
rss.close
set rss=nothing
end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><% = strSiteName%> - <%=dlmc%> - <%=xlname%> - <%=dq%></title>
<meta name="Keywords" content="重庆信息网" />
<meta name="Description" content="重庆信息网" />
<link href="imger/css.css" type="text/css" rel="stylesheet">
</head>
<body>
<!--#include file="head.asp"-->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="10" bgcolor="f2f2f2">
  <tr>
    <td width="26%" valign="top"><table width="100%" border="0" cellpadding="9" cellspacing="1" bgcolor="#e6e6e6">
      <tr>
        <td bgcolor="#FFFFFF"><iframe name="login" width="172" height="110" src="<%=gqwebdir%>common/inc_login.asp" scrolling="no" align="middle" border="0" frameborder="0" marginwidth="1" marginheight="1" target="_top">
				浏览器不支持嵌入式框架，或被配置为不显示嵌入式框架。</iframe></td>
      </tr>
    </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="10"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="9" cellspacing="1" bgcolor="#e6e6e6">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><img src="imger/announce.gif" width="172" height="37"></td>
            </tr>
            <tr>
              <td><table border="0" width="100%" cellspacing="0" cellpadding="0"><%
					Dim rdsAffiche
					Dim sqlAffiche
					Dim intAfficheCot
					Dim intAfficheCount
					Dim strAfficheSubject
          
					intAfficheCot = 5
					set rdsAffiche = Server.CreateObject("ADODB.Recordset")
					sqlAffiche = "Select * From Dat_News Where NewsClass = 1 And State = 1 Order By NewsKey Desc"
					rdsAffiche.Open sqlAffiche,Conn,1,1
					if not rdsAffiche.EOF then
					do while not rdsAffiche.EOF 
					%><tr><td width="100%" height="25" class="F16"><font color="#FF6600">·</font><a href="View_News.asp?Id=<% = rdsAffiche("NewsKey")%>" target="_blank"><% = rdsAffiche("Topic")%></a></td></tr><tr>
						  <td width="100%" height="1" colspan="2" background="images/dotline.gif"></td>
						</tr><%intAfficheCount = intAfficheCount + 1
							if intAfficheCount > intAfficheCot then exit do
							rdsAffiche.MoveNext 
					loop
                    else
                    %>
                    <tr>
                      <td width="100%" height="22"><font color="#FF0000">&nbsp;&nbsp;没有站务公告信息</font>...</td>
                    </tr>
                    <%
                    end if
					rdsAffiche.Close
					set rdsAffiche = nothing
                    %>
                  </table></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="10"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="9" cellspacing="1" bgcolor="#e6e6e6">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><img src="imger/trade.gif" width="172" height="37"></td>
              </tr>
              <tr>
                <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
                      <%
                      Dim rdsInfo1
                      Dim sqlInfo1
                      Dim intInfoCount1
                      Dim strInfoClass1
                      Dim strTopic1
                      
                      set rdsInfo1 = Server.CreateObject("ADODB.Recordset")
                      sqlInfo1 = "Select top "&intNewInfoCot&" infokey,tj,state,infoclass,topic,color,CreateTime From Dat_Information Where State = 1 order by infokey desc"
                      rdsInfo1.Open sqlInfo1,Conn,1,1
                      if not rdsInfo1.EOF then
                        do while not rdsInfo1.EOF
		xxlx3=rdsInfo1("InfoClass")
								strTopic1 =leftt(rdsInfo1("Topic"),24)
							pic=rdsInfo1("pic")
							strcolor=rdsInfo1("color")
							strsjnew=rdsInfo1("CreateTime")
							strsj1new=FormatTime(strsjnew,6)
                      %>
                        <tr> 
                          <td height="25" class="F16"><font color="#FF6600">·</font><a href="<% =gqwebdir%>View_Info.asp?Id=<% = rdsInfo1("InfoKey")%>" target="_blank" class="a01"><%if  strcolor<>""  then%><font color="#<%=strcolor%>"><% = strTopic1%></font><%else%><% = strTopic1%><%end  if%></a>
</td></tr>
						<tr>
						  <td width="100%" height="1" colspan="2" background="images/dotline.gif"></td>
						</tr>
				      <%
					rdsInfo1.MoveNext
						loop
				      else
				      %>
						<tr>
						  <td width="100%" colspan="2" height="22">&nbsp;<font color="#FF0000">对不起!没有相匹配的信息</font>...</td>
						</tr>
				      <%
				      end if
					  rdsInfo1.Close
					  set rdsInfo1 = nothing
				      %>	
                      </table></td>
              </tr>
          </table></td>
        </tr>
      </table></td>
    <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#e6e6e6">
      <tr>
        <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="10" cellpadding="0">
          <tr>
            <td height="24" background="imger/09.gif"><span class="STYLE6">≡</span> <span class="STYLE2"><b>您的位置：</b></span><b>
              <%if lx<>0 then
lx=cstr(lx)
call  gqlx(2,lx)
else%><%=dqwz%><%end if%></b></td>
          </tr>
          <tr>
            <td><table cellSpacing="0" cellPadding="0" width="100%" border="0">
					<tr>
						<td bgColor="#ffffff">
<table cellSpacing="0" cellPadding="0" width="100%" bordercolordark="#FFFFFF" borderColorLight="#3986CE" border="0">
            <tbody>
              <tr>
               <td vAlign="top" width="100%" align="center">
<table width="100%" height="22" border="0" cellpadding="0" cellspacing="0">
                  <tr> 
                    <td height="23" valign="top"> 
                      <table width="100%" height="20" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF">

<%
if bid<>"" then
if bid<>0 then
%>
<tr bgcolor="#E6F7FF"> 
                          <td height="31" colspan="4" align="center"><%
set rssc = Server.CreateObject("ADODB.Recordset")
sqlsc = "Select * From smallclass where dl='"&bid&"' Order By sj Desc"
rssc.Open sqlsc,Conn,1,1
if not rssc.eof then
rssc.movefirst
%>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <TBODY>
<%do while not rssc.eof%>
                    <TR>
<%
for i=1 to 6
if not rssc.eof then
strsname=rssc("SmallClassName")
strsid=rssc("id")
%>
<TD height="20"><A href="<% =gqwebdir%>list.asp?sdq=<%=strsname%>" class="menu"><%=strsname%></A>&nbsp;&nbsp;</td>
<%end if
if not rssc.eof then
rssc.movenext
end if
next
%>
</TR>
<%
loop%>
</TBODY></TABLE>
<%
end if
rssc.close
set rssc=nothing
%></td>
</tr>
<%
end if
end if
%>

<%if dq<>"" then%>
<%
set rscd = Server.CreateObject("ADODB.Recordset")
sqlInfo = "Select * From fysmallmxdq where dl='"&dq&"' Order By sj Desc"
rscd.Open sqlInfo,Conn,1,1
if not rscd.eof then
%>
<tr bgcolor="#E6F7FF"> 
                          <td height="31" colspan="4" align="center">

<%rscd.movefirst%>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <TBODY>
<%do while not rscd.eof%>
                    <TR>
<%
for i=1 to 6
if not rscd.eof then
strsname=rscd("SmallClassName")
strsid=rscd("id")
%>
<TD height="20"><A href="<% =gqwebdir%>list.asp?sdq=<%=strsname%>" class="menu"><%=strsname%></A>&nbsp;&nbsp;</td>
<%end if
if not rscd.eof then
rscd.movenext
end if
next
%>
</TR>
<%
loop%>
</TBODY></TABLE>
<%
end if
rscd.close
set rscd=nothing
%></td>
                          </tr><%end if%>
 <tr bgcolor="#E6F7FF"> 
                          <td width="54%" height="31" background="<% =gqwebdir%>images/2x41.gif"><strong><font color="#3986CE">　信息主题</font></strong></td>
                          <td width="11%" align="center" height="31" background="<% =gqwebdir%>images/2x41.gif"><strong><font color="#3986CE">
							地区</font></strong></td>
                          <td width="14%" align="center" height="31" background="<% =gqwebdir%>images/2x41.gif"><strong><font color="#3986CE">价格</font></strong></td>
                          <td width="12%" align="center" height="31" background="<% =gqwebdir%>images/2x41.gif"><strong><font color="#3986CE">日期</font></strong></td>
                        </tr>
<%
Dim rdsInfo
Dim sqlInfo
Dim strInfoClass   '/供求信息类型/
Dim rdsTotalRec 
Dim intPage        '/当前页/
Dim intTotalRec	   '/所有记录/
Dim intInfoCount
Dim n,p,ii	       '/定义一些临时变量/
Dim strTopic

intPage = Replace(Trim(Request("Page")),"'","")
intPage = Replace(Trim(Request("Page"))," ","")
if intPage = "" then
	intPage = 1
else
	intPage = Clng(intPage)
end if
                      
set rdsInfo = Server.CreateObject("ADODB.Recordset")

if is_sqldata=0 then
strsql=" and  CInt(DateDiff('d',CreateTime,Now()))<CInt(InfoDate) "
else
strsql=" and Cast(DateDiff(day,CreateTime,GetDate()) as int)<Cast(InfoDate As Int) "
end  if

if bid<>0 then
strsql=strsql&" and dl='"&bid&"' "
end if
if sj<>"" then
strsql=strsql&" and cint(DateDiff('d',CreateTime,now()))<"&sj&" "
end if
if sid<>0 then
strsql=strsql&" and xl='"&sid&"' "
end if
if BigClassName<>"" then
strsql=strsql&" and dl='"&BigClassName&"' "
end if
if SmallClassName<>"" then
strsql=strsql&" and xl='"&SmallClassName&"' "
end if
if InfoAdd<>"" then
strsql=strsql&" and InfoAdd='"&InfoAdd&"' "
end if
if dq<>"" then
strsql=strsql&" and InfoAdd='"&dq&"' "
end if
if sdq<>"" then
strsql=strsql&" and smalldq='"&sdq&"' "
end if
if strKeyword<>"" then
strsql=strsql&" and Topic like '%"&strKeyword&"%' "
end if
if InfoClass<>"" then
strsql=strsql&" and InfoClass='"&InfoClass&"' "
end if
if lx<>0 then
strsql=strsql&" and InfoClass='"&lx&"' "
end if
if px="tj"  then
strsql=strsql&" and tj='1' "
end if
if px="hits"  then
strsql=strsql&" and hits>=100 "
end if

	set rdsTotalRec = Conn.Execute("Select Count(InfoKey) From Dat_Information Where State = 1 "&strsql&"")
	intTotalRec = rdsTotalRec(0)
	sqlInfo = "Select * From Dat_Information Where State = 1 "&strsql&" order by infotop desc,tj desc,CreateTime desc"

rdsInfo.Open sqlInfo,Conn,1,1
if not rdsInfo.EOF then
	if intTotalRec mod intInfoCot = 0 then
		n = intTotalRec \ intInfoCot
	else
		n = intTotalRec \ intInfoCot + 1
	end if

	rdsInfo.MoveFirst
	if intPage > n then intPage = n
	if intPage < 1 then intPage = 1
	rdsInfo.Move (intPage - 1) * intInfoCot
	do while not rdsInfo.EOF and intInfoCount < Clng(intInfoCot)
		intInfoCount = intInfoCount + 1
		xxlx=rdsInfo("InfoClass")
		strTopic=leftt(rdsinfo("Topic"),38)
		strjg = rdsInfo("jg")
		yxq=rdsInfo("InfoDate")
						  fbsj=FormatTime(rdsInfo("CreateTime"),8)
						  dqsj=DateAdd( "d" ,yxq ,fbsj)
						  sysj=DateDiff ("d",date(),dqsj)
						  if sysj<0 then
						  sysj="<font color=#808080>过期</font>"
						  else
						  sysj="<font color=#ff0000>"&sysj&"</font>&nbsp;天"
						  end if
						  dq1=rdsInfo("InfoAdd")
						  strcolor=rdsInfo("color")
						  strinfoid=rdsInfo("InfoKey")
						  strpic=rdsInfo("pic")
                      %>
                        <tr onMouseOver="this.style.backgroundColor='#c5edfc';" onMouseOut="this.style.backgroundColor='#E6F7FF'" bgcolor="#E6F7FF"> 
                          <td width="54%" height="22" class="F16" bgcolor="#F9f9f9"><%if rdsInfo("infotop")=1 then%><img border="0" src="<% =gqwebdir%>images/Ontop.gif" alt="置顶信息"><%else%><%if rdsInfo("tj")=1 then%><img border="0" src="<% =gqwebdir%>images/arrow.gif" alt="推荐信息"><%else%><img border="0" src="<% =gqwebdir%>images/tu33.gif" alt="一般信息"><%end if%><%end if%>&nbsp;<font color="#478B47"><span style="font-size: 12px"><%call  gqlx(2,xxlx)%></span></font><span style="font-size: 12px">&nbsp;</span>
                          <a href="<% =gqwebdir%>View_Info.asp?Id=<% =strinfoid%>" target="_blank" class="a01"><span style="font-size: 12px"><%if strcolor<>"" then%><font color="#<%=strcolor%>"><% = strTopic%></font><%else%><% = strTopic%><%end if%></span></a></td>
                          <td width="11%" align="center" bgcolor="#F9f9f9"><a href="<% =gqwebdir%>list.asp?dq=<%=dq1%>"  target="_blank"><%=dq1%></a></td>
                          <td width="14%" align="center" bgcolor="#F9f9f9"><%if strjg<>"" and strjg<>"0" then%><font color="#FF0000"><%=strjg%></font> 元<%else%>面议<%end if%></td>
                          <td width="12%" align="center" bgcolor="#F9f9f9"><%
						  fbsj=FormatTime(rdsvInfo("CreateTime"),8)
%><% =fbsj%></td>
                        </tr>
                        <tr>
						  <td height="1" background="<% =gqwebdir%>images/dotline.gif"></td>
						  <td height="1" background="<% =gqwebdir%>images/dotline.gif"></td>
						  <td height="1" background="<% =gqwebdir%>images/dotline.gif"></td>
						  <td height="1" background="<% =gqwebdir%>images/dotline.gif"></td>
                        </tr>
<%
  		rdsInfo.MoveNext
	loop
else
n=0
%>
						<tr>
						  <td height="25" colspan="4">&nbsp;<font color="#FF0000">对不起!没有相匹配的信息</font>...</td>
						  </tr>
<%
end if
rdsInfo.Close
set rdsInfo = nothing
if intPage - 1 mod 10 = 0 then
	p = (intPage - 1) \ 10
else
	p = (intPage - 1) \ 10
end if
%>
                      </table>
				    </td>
                  </tr>
                </table>
               </td>
              </tr>
            </tbody>
            </table>
<div align="center">
            <center>
            <table cellSpacing="0" cellPadding="0" width="100%" bordercolordark="#FFFFFF" borderColorLight="#3986CE" border="0"><tbody>
              <tr>
                <td vAlign="top" width="100%">
                
                <table border="0" cellspacing="0" width="100%" cellpadding="0">
				  <tr>
					<td width="100%" height="30" align="center" valign="top"><%if n>0 then%>
	  <table border="0" width="98%" cellspacing="0" cellpadding="0" align="center">
	    <tr>
		  <td width="10%" height="30" valign="middle">共<b><%= intTotalRec %></b>条</td>
		  <td width="80%" height="30" valign="middle"><div align="center">
			<%
if intPage = 1 then
					Response.Write "<font face=webdings>9</font>   "
				else
Response.Write "<a href='?Page=1&KeyWord="& strKeyWord &"&dq="& dq &"&bid="&bid&"&sid="&sid&"&lx="&lx&"&px="&px&"&InfoClass="&InfoClass&"&InfoAdd="&InfoAdd&"&BigClassName="&BigClassName&"&SmallClassName="&SmallClassName&"' title=首页><font face=webdings>9</font></a>   "
				end if
				if p * 10 > 0 then Response.Write "<a href='?Page="&Cstr(p*10)&"&KeyWord="& strKeyWord &"&dq="& dq &"&bid="&bid&"&sid="&sid&"&lx="&lx&"&px="&px&"&InfoClass="&InfoClass&"&InfoAdd="&InfoAdd&"&BigClassName="&BigClassName&"&SmallClassName="&SmallClassName&"' title=上十页><font face=webdings>7</font></a>   "
				Response.Write "<b>"
				for ii = p * 10 + 1 to P * 10 + 10
					   if ii = intPage then
				          Response.Write "<font color=""#FF0000"">"+Cstr(ii)+"</font> "
					   else
					      Response.Write "<a href='?Page="&Cstr(ii)&"&KeyWord="& strKeyWord &"&dq="& dq &"&bid="&bid&"&sid="&sid&"&lx="&lx&"&px="&px&"&InfoClass="&InfoClass&"&InfoAdd="&InfoAdd&"&BigClassName="&BigClassName&"&SmallClassName="&SmallClassName&"'>"+Cstr(ii)+"</a>   "
                       end if
					if ii = n then exit for
				next
				Response.Write "</b>"
				if ii < n then Response.Write "<a href='?Page="&Cstr(ii)&"&KeyWord="& strKeyWord &"&dq="& dq &"&bid="&bid&"&sid="&sid&"&lx="&lx&"&px="&px&"&InfoClass="&InfoClass&"&InfoAdd="&InfoAdd&"&BigClassName="&BigClassName&"&SmallClassName="&SmallClassName&"' title=下十页><font face=webdings>8</font></a>   "
				if intPage=n then
					Response.Write "<font face=webdings>:</font>   "
				else
					Response.Write "<a href='?Page="&Cstr(n)&"&KeyWord="& strKeyWord &"&dq="& dq &"&bid="&bid&"&sid="&sid&"&lx="&lx&"&px="&px&"&InfoClass="&InfoClass&"&InfoAdd="&InfoAdd&"&BigClassName="&BigClassName&"&SmallClassName="&SmallClassName&"' title=尾页><font face=webdings>:</font></a>   "
				end if
			%>
			</div></td>
		  <td width="10%" height="30" valign="middle">
<table border="0" id="table1" cellspacing="0" cellpadding="0">
	<form method="post" action="?" name="Form2"><tr>
		<td>
	    <input type="hidden" name="KeyWord" value="<% = strKeyWord%>">
	    <input type="hidden" name="bid" value="<% =bid%>">
	    <input type="hidden" name="sid" value="<% =sid%>">
	    <input type="hidden" name="lx" value="<% =lx%>">
	    <input type="hidden" name="px" value="<% =px%>">
	    <input type="hidden" name="dq" value="<% =dq%>">
	    <input type="hidden" name="InfoClass" value="<% =InfoClass%>">
	    <input type="hidden" name="InfoAdd" value="<% =InfoAdd%>">
	    <input type="hidden" name="BigClassName" value="<% =BigClassName%>">
	    <input type="hidden" name="SmallClassName" value="<% =SmallClassName%>"><input type="text" name="Page" size="2" maxlength="10" value="<%= intPage %>" class="face"> <input type="submit" value="Go" name="submit" class="button">
			</td>
	</tr></form>
</table></td>
		</tr>
		
	  </table>
				<%end if%></td>
				  </tr>
				</table>
               </td>
              </tr>
              </tbody></table></center></div>
</td>
					</tr>
				</table></td>
          </tr>
        </table></td>
      </tr>
    </table>      </td>
  </tr>
</table>
<!--#include file="boot.asp"-->
</body>
</html>
<%
conn.close
set conn=nothing
%>
