⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dir_search.asp

📁 中介之家房产中介系统 V4.0企业共享版
💻 ASP
字号:
<!--#include file=conn/conn.asp -->
<!--#include file=inc/top.asp -->
<% dim typeto
typeto=trim(request("type")) %>
<title>房源信息查询</title>
<%
Dim rs__myDiduan
rs__myDiduan = "%"
if(Request("txtDiduan") <> "") then rs__myDiduan = Request("txtDiduan")

Dim rs__myFangx
rs__myFangx = "%"
if(Request("txtFangx") <> "") then rs__myFangx = Request("txtFangx")

Dim rs__myTaox
rs__myTaox = "%"
if(Request("txtTaox") <> "") then rs__myTaox = Request("txtTaox")

Dim rs__myMianj
rs__myMianj = "%"
if(Request("txtMianj") <> "") then rs__myMianj = Request("txtMianj")

Dim rs__myJiag
rs__myJiag = "%"
if(Request("txtJiag") <> "") then rs__myJiag = Request("txtJiag")
%> 
<%
ssj=date
xzsj=request("txtsj")
sj=DateAdd("d",-xzsj,ssj)
%>
<% 
dim SearchValue,PagetoValue
SearchValue = "txtDiduan="&rs__myDiduan&"&txtFangx="&rs__myFangx&"&txtTaox="&rs__myTaox&"&txtMianj="&rs__myMianj&"&txtJiag="&rs__myJiag&"&txtsj="&xzsj
PagetoValue = rs__myDiduan&"&txtFangx="&rs__myFangx&"&txtTaox="&rs__myTaox&"&txtMianj="&rs__myMianj&"&txtJiag="&rs__myJiag&"&txtsj="&xzsj
 %>
<script language= "javascript">
function newpage(htmlurl) {
var newwin=window.open(htmlurl,"newWin","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=2,left=2,width=600,height=350");
newwin.focus();
return false;
}
</script>
<%
   dim MaxPerPage
   dim sql 
   dim rs
   dim gstBookID
   dim totalPut   
   dim CurrentPage
   dim TotalPages
    if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
%>

<html>
<head>
<style type="text/css">{  }
.9size {  font-family: "宋体"; font-size: 9pt; color: #000000; text-decoration: none}
.txt {  font-family: "宋体"; font-size: 9pt; color: #000000; text-decoration: none; background-color: #FFFFFF}
.link {  font-family: "宋体"; font-size: 9pt; color: #000000; text-decoration: underline; cursor: hand; page-break-before: auto; page-break-after: auto?, OffX=20, OffY=30, Positive=50); page-break-before: auto; page-break-after: auto}
a:hover {  font-family: "宋体"; font-size: 9pt; color: #FFFFFF}
.10size { font-family: "宋体"; font-size: 8pt; color: #000000; text-decoration: none }
-->
</style>
</head>
 <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000">
                <div align="center">
                  <center>
                
    
<table width="760" height="169" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" bgcolor="#FFFFFF" style="border-collapse: collapse">
  <tr> 
    <td height="6" width="567" style="border-left-style: none; border-left-width: medium" valign="bottom"> 
       </td>
  </tr>
  <tr valign="top"> 
    <td width="760" valign="top" style="border-left-style: none; border-left-width: medium"> 
      <%   
set rs=server.createobject("adodb.recordset")   
sql= "SELECT zid,Num,Diduan, Fangx, Taox, Mianj, M, Lc,Jiag, J, Xiaoqm, Tele, Content,Dat,fangshi,dj, "& typeto &".Dat  FROM "& typeto &"  WHERE Diduan LIKE '" + Replace(rs__myDiduan, "'", "''") + "' AND Fangx  LIKE '" + Replace(rs__myFangx, "'", "''") + "' AND Taox LIKE '" + Replace(rs__myTaox, "'", "''") + "' AND M LIKE '" + Replace(rs__myMianj, "'", "''") + "' AND J LIKE '" + Replace(rs__myJiag, "'", "''") + "' AND Dat>=#" & sj& "# order by dat Desc "

rs.open sql,conn,1,1   
if rs.eof and rs.bof then %> <p align="center">还没有房源!</p>
      <% else    
   rs.pagesize=25   
   totalPut=rs.recordcount '记录总数    
   totalPage=rs.pagecount    
   MaxPerPage=rs.pagesize    
      if currentpage<1 then    
          currentpage=1    
      end if    
      if currentpage>totalPage then    
          currentpage=totalPage    
      end if    
   if currentPage=1 then    
      showpages    
      showContent    
      showpages1    
    else    
         if (currentPage-1)*MaxPerPage<totalPut then    
         rs.move  (currentPage-1)*MaxPerPage    
         dim bookmark    
         bookmark=rs.bookmark '移动到开始显示的记录位置    
         showpages    
         showContent    
         showpages1    
      else     
               
      end if    
   end if    
      rs.close    
end if    
set rs=nothing      
conn.close    
set conn=nothing      
    
sub showContent    
     dim i,j   
   
%> <br> 
      <table width="760" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" cellpadding="2" border="0">
        <tr bgcolor="#00CCFF" class="9size" valign="bottom"> 
          <td width="38" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"> 
            <div align="center">编 号 </div></td>
          <td width="57" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"> 
            <div align="center"><span style="font-size: 9pt">所属区域</span></div></td>
          <td width="169" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"> 
            <div align="center"><span style="font-size: 9pt">地 点</span></div></td>
          <td width="74" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"> 
            <div align="center"><span style="font-size: 9pt">类 别</span> </div></td>
          <td width="84" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"> 
            <div align="center"><span style="font-size: 9pt">套 型</span> </div></td>
          <td width="47" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"> 
            <p align="center">楼层</td>
          <td width="53" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"> 
            <div align="center"> <span style="font-size: 9pt">面积(M<sup>2</sup>)</span></div></td>
          <td width="83" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"> 
            <div align="center"> <span style="font-size: 9pt"> 
              <% If typeto="sale" Then
					  response.Write("价 格")
					  else
					  response.Write("租 金")
					  end if %>
              </span> </div></td>
          <td width="81" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"><div align="center"><span style="font-size: 9pt">登记时间</span></div></td>
          <td width="63" bgcolor="#E4E4CB" style="border-style: solid; border-width: 1" height="24"> 
            <div align="center"> <span style="font-size: 9pt">详细内容</span></div></td>
        </tr>
        <% i=1   
       do while not (rs.eof or err)%>
        <tr bgcolor="<%If (i Mod 2) Then%>#EAEAEA<%Else%>#FFFFFF<%End If%>"> 
          <td width="38" style="border-style: solid; border-width: 1"> <div align="center"></span> 
              <p align="center"><font color="green"> <span style="font-size:9pt"> 
                <% If rs("num")="" Then %>
                <%=rs("zid")%> 
                <% Else %>
                <%= rs("num") %> 
                <% End If %>
                </span> </font></div></td>
          <td width="57" style="border-style: solid; border-width: 1"> <div align="center"><span style="font-size:9pt"><%=(rs.Fields.Item("Diduan").Value)%></span></div></td>
          <td width="169" style="border-style: solid; border-width: 1"> <div align="left"><span style="font-size:9pt">&nbsp;<a target="_blank" href="list.asp?zid=<%= rs.Fields.Item("zid").Value %>&typeto=<%= typeto %>" onClick="return newpage(this.href);"><font color="#FF6600"><%=(rs.Fields.Item("Xiaoqm").Value)%></font></a></span></div></td>
          <td width="74" style="border-style: solid; border-width: 1"> <div align="left"><span style="font-size:9pt">&nbsp;<%=(rs.Fields.Item("Fangx").Value)%></span></div></td>
          <td width="84" style="border-style: solid; border-width: 1"> <div align="left"><span style="font-size:9pt">&nbsp;<%=(rs.Fields.Item("Taox").Value)%></span></div></td>
          <td width="47" style="border-style: solid; border-width: 1"> <p align="center"><span style="font-size:9pt"><%=(rs.Fields.Item("Lc").Value)%></span></td>
          <td width="53" style="border-style: solid; border-width: 1"> <div align="center"><span style="font-size:9pt"><%=(rs.Fields.Item("Mianj").Value)%></span></div></td>
          <td width="83" style="border-style: solid; border-width: 1"> <div align="center"><span style="font-size:9pt"><%=(rs.Fields.Item("Jiag").Value)%><%=(rs.Fields.Item("fangshi").Value)%></span></div></td>
          <td width="81" style="border-style: solid; border-width: 1"><div align="center"><span style="font-size:9pt"><%=(rs.Fields.Item("Dat").Value)%></span></div></td>
          <td width="63" style="border-style: solid; border-width: 1"> <div align="center"><a target="_blank" href="list.asp?zid=<%= rs.Fields.Item("zid").Value %>&typeto=<%= typeto %>" onClick="return newpage(this.href);"><font color="#0033FF" ><span style="font-size:9pt"><font color="#0000FF">查阅详情</font></span></font></a></div></td>
        </tr>
        <%     
   if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出     
   i=i+1     
    rs.movenext     
    loop     
%>
        <tr> 
      </table>
      <%end sub %> <%sub showpages() %> <table width="98%">
        <tr> 
          <td align="right"><div align="left"><span style="font-size:9pt">符合条件的房源</span><span style="font-size:9pt">共<font color="#FF0000"><%=totalPage%></font>页/<font color="red"><%=totalPut%></font>条</span></div></td>
        </tr>
      </table>
      <%     
end sub     
sub showpages1()     
dim n     
n=totalPage     
%> <form action="dir_search.asp" method="GET" align="right">
        <div align="center"> 
          <center>
            <table width="108%" height="30" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="100%" height="30"> <div align="left"><span style="font-size:9pt"> 
                     共<font color="#FF0000"><%=totalPage%></font>页/<font color="red"><%=totalPut%></font>条房源</span> 
                    <% If currentPage <> 1 Then %>
                    <A href=dir_search.asp?type=<%= typeto %>&<%= SearchValue %>><font color="#FF6600"><span style="font-size:9pt">[首页]</span></font></A> 
                    <A href=dir_search.asp?type=<%= typeto %>&Page=<%= (currentPage-1) %>&<%= SearchValue %> ><font color="#FF6600"><span style="font-size:9pt">[上一页]</span></font></A> 
                    <% End If %>
                    <% If currentPage <> rs.PageCount Then %>
                    <A href=dir_search.asp?type=<%= typeto %>&Page=<%= (currentPage+1) %>&<%= SearchValue %> ><font color="#FF6600"><span style="font-size:9pt">[下一页]</span></font></A> 
                    <A href=dir_search.asp?type=<%= typeto %>&Page=<%= totalPage %>&<%= SearchValue %>><font color="#FF6600"><span style="font-size:9pt">[尾页]</span></font></A> 
                    <% End If %>
                    <span style="font-size:9pt">第<font color="#FF0000"><%=currentPage%></font>页/共<font color="#FF0000"><%=totalPage%></font>页 转到:
                    <select name='page' size=1 class=smallselsect style='font-family: 宋体; font-size: 9pt;'>
                      <% for i=1 to n %>
                      <option value= "<%= i %>"      
   <% if currentpage=i then %>      
     selected   
   <% end if  %> > <%= i %> </option>
                      <% next  %>
                    </select>
                    <input name="submit" type='submit' class=buttonface  style='font-family: 宋体; font-size: 9pt;'  value='go'>
                    <input type='hidden' name='type' value="<%= typeto %>">
                    <input type='hidden' name='txtDiduan' value="<%= rs__myDiduan %>">
                    <input type='hidden' name='txtFangx' value="<%= rs__myFangx %>">
                    <input type='hidden' name='txtTaox' value="<%= rs__myTaox %>">
                    <input type='hidden' name='txtMianj' value="<%= rs__myMianj %>">
                    <input type='hidden' name='txtJiag' value="<%= rs__myJiag %>">
                    <input type='hidden' name='txtsj' value="<%= xzsj %>">
                    </span> </div></td>
              </tr>
            </table>
          </center>
        </div>
      </form>
      <%end sub%> </td>
  </tr>
</table>
<!--#include file="inc/bottom.asp"-->
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -