<!--#include file="fctop.asp"-->

<%dim server_v1,server_v2
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
response.write "<tr><td style=font:9pt Verdana>"
response.write "<center>你提交的路径有误，禁止从站点外部提交数据!</center>"
response.write "</td></tr></table></center>"
response.end
end if
%>
<%dim fqys,errc,i
fqys=request.servervariables("query_string") 
dim nothis(18) 
nothis(0)="net user" 
nothis(1)="xp_cmdshell" 
nothis(2)="/add" 
nothis(3)="exec%20master.dbo.xp_cmdshell" 
nothis(4)="net localgroup administrators" 
nothis(5)="select" 
nothis(6)="count" 
nothis(7)="asc" 
nothis(8)="char" 
nothis(9)="mid" 
nothis(10)="'" 
nothis(11)=":" 
nothis(12)="""" 
nothis(13)="insert" 
nothis(14)="delete" 
nothis(15)="drop" 
nothis(16)="truncate" 
nothis(17)="from" 
nothis(18)="%" 
errc=false 
for i= 0 to ubound(nothis) 
if instr(fqys,nothis(i))<>0 then 
errc=true 
end if 
next 
if errc then 
response.write "<script language=""javascript"">" 
response.write "parent.alert('非法操作!禁止攻击站点服务器!');" 
response.write "self.location.href='Index.Asp';" 
response.write "</script>" 
response.end 
end if 
%>
<%
dim ThisPage,Pagesize,Allrecord,Allpage,tj
if request("page")="" then
  ThisPage=1		
else
  ThisPage=request("page")
end if
dim xofox,sheng,shi,fangfx,ja,jd,ss,rq
xofox=trim(request("leixing"))
sheng=trim(request("sheng"))
shi=trim(request("shi"))
fangfx=trim(request("fx"))
ja=trim(request("ja"))
jd=trim(request("jd"))
ss=trim(request("ss"))
rq=trim(request("rq"))
dim sss
sss=""&ss&"|"
 dim rsq,sqlq,class1c,class2c,shengc,shic,leixingc
if sheng<>"0" then
set rsq=server.createobject("adodb.recordset") 
sqlq = "select sheng from [FOX_sheng] where id="&sheng&""
rsq.open sqlq,conn,1,1
shengc=rsq("sheng")
rsq.close
set rsq=nothing
end if
if shi<>"0" then
set rsq=server.createobject("adodb.recordset") 
sqlq = "select shi from [FOX_shi] where id="&shi&""
rsq.open sqlq,conn,1,1
shic=rsq("shi")
rsq.close
set rsq=nothing
end if
dim fxfx
if fangfx=0 then
else
if fangfx=1 then
fxfx="普通住宅"
elseif fangfx=2 then
fxfx="小高层住宅"
elseif fangfx=3 then
fxfx="高层住宅"
elseif fangfx=4 then
fxfx="别墅"
elseif fangfx=5 then
fxfx="写字楼"
elseif fangfx=6 then
fxfx="酒店式公寓"
elseif fangfx=7 then
fxfx="商住两用"
elseif fangfx=8 then
fxfx="商铺"
elseif fangfx=9 then
fxfx="厂房"
end if
end if
%>
<head>

<title><%=shengc%><%=shic%>--<%=title%>--<%=web%>--房产频道</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body topmargin="0">
<table cellSpacing="0" cellPadding="0" width="930" align="center" border="0">
	<tr>
		<td colspan="3" height="28" valign="top" class="tdtop">　您的位置：<%=title%>－<a href="fangindex.asp">房产频道</a></td>
	</tr>
	<tr>
		<td width="15">　</td>
		<td width="51" align="center" height="25"><b>区域：</b></td>
		<td width="864"><!--#include file="fangdao.asp"--></td>
	</tr>
	<tr>
		<td width="15">　</td>
		<td width="51" align="center" height="25"><b>房型：</b></td>
		<td width="864"><a href="fangindex.asp?fx=1">普通住宅</a>&nbsp;&nbsp;<a href="fangindex.asp?fx=2">小高层住宅</a>&nbsp;&nbsp;<a href="fangindex.asp?fx=3">高层住宅</a>&nbsp;&nbsp;<a href="fangindex.asp?fx=4">别墅</a>&nbsp;&nbsp;<a href="fangindex.asp?fx=5">写字楼</a>&nbsp;&nbsp;<a href="fangindex.asp?fx=6">酒店式公寓</a>&nbsp;&nbsp;<a href="fangindex.asp?fx=7">商住两用</a>&nbsp;&nbsp;<a href="fangindex.asp?fx=8">商铺</a>&nbsp;&nbsp;<a href="fangindex.asp?fx=9">厂房</a>&nbsp;&nbsp;
		<a href="fangindex.asp">所有</a></td>
	</tr>
	<tr>
		<td width="15">　</td>
		<td width="51" align="center" height="25"><b>价格：</b></td>
		<td width="864"><a href="fangindex.asp?ja=0&jd=100">100元以下</a>&nbsp;&nbsp; <a href="fangindex.asp?ja=100&jd=300">100-300元</a>&nbsp;&nbsp; <a href="fangindex.asp?ja=300&jd=500">300-500元</a>&nbsp; 
		<a href="fangindex.asp?ja=500&jd=1000">500-1000元</a>&nbsp; <a href="fangindex.asp?ja=1000&jd=2000">1000-2000元</a>&nbsp; <a href="fangindex.asp?ja=2000&jd=3000">2000-3000元</a>&nbsp; <a href="fangindex.asp?ja=3000&jd=5000">3000-5000元</a>&nbsp; 
		<a href="fangindex.asp?ja=5000&jd=1000000000">5000元以上</a>&nbsp; <a href="fangindex.asp">所有</a></td>
	</tr>
	<tr>
		<td width="15">　</td>
		<td width="51" align="center" height="25"><b>户型：</b></td>
		<td width="864"><a href="fangindex.asp?ss=1">1室</a>&nbsp; <a href="fangindex.asp?ss=2">2室</a>&nbsp; <a href="fangindex.asp?ss=3">3室</a>&nbsp; <a href="fangindex.asp?ss=4">4室</a>&nbsp; <a href="fangindex.asp?ss=5">5室</a>&nbsp; <a href="fangindex.asp?ss=6">6室</a>&nbsp; <a href="fangindex.asp?ss=7">7室</a>&nbsp; 
		<a href="fangindex.asp?ss=8">8室</a>&nbsp; <a href="fangindex.asp?ss=9">9室</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>类型: </b><a href="fangindex.asp?leixing=1">出租</a>&nbsp;&nbsp;<a href="fangindex.asp?leixing=2">求租</a>&nbsp;&nbsp;<a href="fangindex.asp?leixing=3">出售</a>&nbsp;&nbsp;<a href="fangindex.asp?leixing=4">求购</a> </td>
	</tr>
</table>
<table cellSpacing="0" cellPadding="0" width="930" align="center" border="0" id="table73">
	<tr>
		<td colSpan="3">
		<img height="4" src="images/_scap.gif" width="760"></td>
	</tr>
	<tr>
		<td vAlign="top" width="187">
		<table id="table76" class="table2" width="100%">
		<tr><td class="tdbg2" height="28">最新房源信息
　</td></tr>
<%dim aej,rsfox,sqlfox
set rsfox=server.createobject("adodb.recordset")
sqlfox="select top 20 * from FOX_fang where yz=1 order by fangfbsj desc"
rsfox.open sqlfox,conn,1,1
if rsfox.eof then
response.write "还没有...！"
else
do while not rsfox.eof
%><tr><td>
·[<%=rsfox("fangfx")%>]<A href="fanginfo.asp?fox=<%=rsfox("id")%>"><%=rsfox("fangbt")%></a>
</td></tr><%
aej=aej+1
if aej>=20 then exit do
rsfox.movenext
loop
end if
rsfox.close
set rsfox=nothing
%></table>		
		　</td>
		<td width="55" align="center" valign="top">
		<img height="4" src="images/_scap.gif" width="4"><img border="0" src="<%=css%>bgfox8.jpg"></td>
		<td vAlign="top" width="688">
		<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table86">
			<tr>
				<td height="30" class="tdtop">
				<p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">
				<span style="letter-spacing: 0px">
				&nbsp;<font color="#FFFFFF"><a class="scap" href="index.asp"><%=title%></a> >>></font>
				<%if shengc<>"" then%><%=shengc%><%end if%><%if shic<>"" then%><%=shic%><%end if%>
			<%if trim(request("leixing"))=1 then%><font color="red">出租</font><%elseif trim(request("leixing"))=2 then%><font color="red">求租</font><%elseif trim(request("leixing"))=3 then%><font color="red">出售</font><%elseif trim(request("leixing"))=4 then%><font color="red">求购</font><%else%><font color="red">所有</font><%end if%>房源列表</span></td>
			</tr>
			</table>
		<%dim rsfoxf,sqlfoxf
tj=1
set rsfoxf=server.createobject("adodb.recordset")
 sqlfoxf="SELECT * FROM FOX_fang where yz=1 and"
 If sheng<>"0" Then sqlfoxf=sqlfoxf&" sheng="&sheng&" and"
 If shi<>"0" Then sqlfoxf=sqlfoxf&" shi="&shi&" and"
 If xofox<>"0" Then sqlfoxf=sqlfoxf&" leixing="&xofox&" and"
 If fangfx<>"0" Then sqlfoxf=sqlfoxf&" fangfx like '%"&fxfx&"%' and"
 If ja<>"" and jd<>"" Then sqlfoxf=sqlfoxf&" fangjia>="&ja&" and fangjia<="&jd&" and" 
' If rq<>"0" Then sqlfoxf=sqlfoxf&" datediff('d',fangfbsj,Date())<="&rq&" and"
 If ss<>"0" Then sqlfoxf=sqlfoxf&" left(fanghx,2) like '%"&sss&"%' and" 
' if right(sqlfoxf,5)="where" then sqlfoxf=left(sqlfoxf,clng(len(sqlfoxf))-5)
 if right(sqlfoxf,3)="and" then sqlfoxf=left(sqlfoxf,clng(len(sqlfoxf))-3)
 sqlfoxf=sqlfoxf&" order by fangfbsj desc"
 rsfoxf.Open sqlfoxf,conn,1,3
 rsfoxf.Pagesize=12
Pagesize=rsfoxf.Pagesize
Allrecord=rsfoxf.Recordcount
Allpage=rsfoxf.Pagecount
if ThisPage<1 then                           
ThisPage=1                           
end if
On Error Resume Next
rsfoxf.move (ThisPage-1)*Pagesize
if rsfoxf.eof then
response.write "暂时没有！"
else
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#C0C0C0" style="border-collapse: collapse" id="table169" class="table2">
            <tr bgcolor="#CCCCCC">
              <td colspan="6" height="1"></td>
            </tr> 

            <tr>
              <td height="22" width="1%" class="p9t" bgcolor="#F5F5F5">
				　</td>
              <td height="22" class="p9t" bgcolor="#F5F5F5" align="center">
				户型标题|位置</td>
              <td height="22" class="p9t" bgcolor="#F5F5F5" align="center">
				类型</td>
              <td height="22" class="p9t" bgcolor="#F5F5F5" align="center">
				价格</td>
              <td height="22" class="p9t" bgcolor="#F5F5F5" align="center">
				房东|中介</td>
              <td height="22" class="p9t" bgcolor="#F5F5F5" align="center">
				发布时间</td>
            </tr>
                        <tr>
              <td height="5" width="100%" class="tdbg2" colspan="6"></td>
            </tr>
            <%do while not rsfoxf.eof%>
 <%
set rsq=server.createobject("adodb.recordset") 
sqlq = "select sheng from [FOX_sheng] where id="&rsfoxf("sheng")&""
rsq.open sqlq,conn,1,1
shengc=rsq("sheng")
rsq.close
set rsq=nothing
set rsq=server.createobject("adodb.recordset") 
sqlq = "select shi from [FOX_shi] where id="&rsfoxf("shi")&""
rsq.open sqlq,conn,1,1
shic=rsq("shi")
rsq.close
set rsq=nothing
%>


            <tr>
              <td height="25" width="1%" class="p9t" bgcolor="#F5F5F5">
				<p align="right">
				　</td>
              <td height="25" class="p9t" bgcolor="#F5F5F5" width="47%">
              	<img border="0" src="images/dot17.gif" width="9" height="9"> <b>
              <a href="fanginfo.asp?fox=<%=rsfoxf("id")%>"><%=rsfoxf("fangbt")%></a></b>
              <%dim str,myArr
              str=""&rsfoxf("fanghx")&""
              myArr=Split(str,"|") 
              %>
              <%if myArr(0)<>"0" then
              response.write"<font color=gray>"&myArr(0)&"室</font>"
              end if%>
              <%if myArr(1)<>"0" then
              response.write"<font color=gray>"&myArr(1)&"厅</font>"
              end if%>
              <%if myArr(2)<>"0" then
              response.write"<font color=gray>"&myArr(2)&"卫</font>"
              end if%>
              <%if myArr(3)<>"0" then
              response.write"<font color=gray>"&myArr(3)&"阳台</font>"
              end if%><br>
              <font color="gray">[</font><a href="fangindex.asp?sheng=<%=sheng%>&shi=<%=rsfoxf("shi")%>"><font color="gray"><%=shic%></font></a><font color="gray">]</font>
              <%if rsfoxf("fangxq")<>"" then
              response.write"<font color=gray>"&rsfoxf("fangxq")&"</font>"
              end if%>
              <%if rsfoxf("fangdz")<>"" then
              response.write"<font color=gray> "&rsfoxf("fangdz")&"</font>"
              end if%></td>
              <td height="25" width="11%" align="center">
             <%if rsfoxf("leixing")=1 then%><a href="fangindex.asp?leixing=<%=rsfoxf("leixing")%>"><font color="gray">出租</font></a>
             <%elseif rsfoxf("leixing")=2 then%><a href="fangindex.asp?leixing=<%=rsfoxf("leixing")%>"><font color="gray">求租</font></a>
             <%elseif rsfoxf("leixing")=3 then%><a href="fangindex.asp?leixing=<%=rsfoxf("leixing")%>"><font color="gray">出售</font></a>
             <%elseif rsfoxf("leixing")=4 then%><a href="fangindex.asp?leixing=<%=rsfoxf("leixing")%>"><font color="gray">求购</font></a>
             <%end if%></td>
              <td height="25" width="15%" align="center">
             　<%dim fj
             if rsfoxf("fangjia")<>"" then
             fj=rsfoxf("fangjia")&"元"
             else
             fj="面议"
             end if
             %>
             <%if rsfoxf("leixing")=1 then%><font color="gray"><%=fj%><%=rsfoxf("fangdw")%></font>
             <%else%><font color="gray"><%=fj%></font><%end if%></td>
              <td height="25" width="9%" align="center">
              <%if rsfoxf("fangjai")=1 then
              response.write"<font color=gray>中介</font>"
              if rsfoxf("fangjiaf")=1 then
              response.write"<br><font color=red>收费</font>"
              else
               response.write"<br><font color=red>免费</font>"
              end if
              else
               response.write"<font color=green>房东</font>"
              end if%></td>
              <td height="25" width="17%" align="center"><font color="gray"><%=year(rsfoxf("fangfbsj"))%>-<%=month(rsfoxf("fangfbsj"))%>-<%=day(rsfoxf("fangfbsj"))%>
              </font>
              </td>
            </tr>

            
            <tr>
              <td height="5" width="1%" class="p9t" bgcolor="#F5F5F5" background="fangimages/bg1.gif"></td>
              <td height="5" class="p9t" bgcolor="#F5F5F5" width="99%" colspan="5" background="fangimages/bg1.gif"></td>
            </tr>
			<%
        tj=tj+1
        if tj>Pagesize then exit do
        rsfoxf.movenext
        loop
        %>


			</table>

				<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" style="border-collapse: collapse" id="table170">
                <tr>
                  <td height="25" width="163" class="p9t"><p align="center"> 
					<font color="#CC5200"><%=Pagesize%></font> 条/页 &nbsp;共 <font color="#CC5200"><%=Allrecord%></font> 条记录</td>
                  <td height="25" width="103" class="p9t"><p align="center">共 <font color="#CC5200"><%=Allpage%></font> 页</td>
                  <td height="25" width="78" class="p9t"><p align="center">第 <font color="#CC5200"><%=ThisPage%></font> 页</td>
                  <td height="25" width="187" class="p9t"><p align="center">
 <%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1&sheng="&sheng&"&shi="&shi&"&leixing="&xofox&"&fx="&fangfx&"&ja="&ja&"&jd="&jd&"&ss="&ss&">首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&"&sheng="&sheng&"&shi="&shi&"&leixing="&xofox&"&fx="&fangfx&"&ja="&ja&"&jd="&jd&"&ss="&ss&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&"&sheng="&sheng&"&shi="&shi&"&leixing="&xofox&"&fx="&fangfx&"&ja="&ja&"&jd="&jd&"&ss="&ss&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&"&sheng="&sheng&"&shi="&shi&"&leixing="&xofox&"&fx="&fangfx&"&ja="&ja&"&jd="&jd&"&ss="&ss&">尾页</a>&nbsp;"     
end if
%>  
                    </td>
                </tr>
              </table>


 <%end if
 rsfoxf.close
 set rsfoxf=nothing%>  
		</td>
	</tr>
</table>
<%rs.close
set rs=nothing%>
</body>
<!--#include file="ffbottom.asp"-->