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

📄 list_search.asp

📁 我同学的毕业设计源代码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<% dim typeto
typeto=trim(request("type")) %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>房源信息查询</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
<%
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&"&txtTaox="&rs__myTaox&"&txtTaox="&rs__myTaox&"&txtMianj="&rs__myMianj&"&txtJiag="&rs__myJiag&"&txtsj="&xzsj
SearchValue = "txtDiduan="&rs__myDiduan&"&txtfangx="&rs__myFangx&"&txtTaox="&rs__myTaox&"&txtMianj="&rs__myMianj&"&txtJiag="&rs__myJiag&"&txtsj="&xzsj
'PagetoValue = rs__myDiduan&"&txtTaox="&rs__myTaox&"&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=320,height=450");
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
%>
</head>
<body background="images/topbj.gif" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
      <!--#include file="top.asp" -->
    </td>
  </tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="bk">
  <tr> 
    <td width="180" align="center" valign="top" background="images/index_00.gif">
      <!--#include file="left.asp" -->
    </td>
    <td align="center" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="40" bgcolor="#ffb600"><img src="images/20080320134845251.gif" width="32" height="19"></td>
                <td width="534" bgcolor="#ffb600"><table width="98%" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td width="83%"><font color="#FFFFFF">房信息</font></td>
                      <td width="17%" align="right"><font color="#FFFFFF">&nbsp;</font></td>
                    </tr>
                  </table></td>
              </tr>
              <tr bgcolor="#ffb600"> 
                <td colspan="2"><img src="images/5x5.gif" width="5" height="5"></td>
              </tr>
              <tr> </tr>
            </table></td>
        </tr>
       
      </table>
      
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="10" align="right" valign="bottom"><img src="images/index_04.gif" width="577" height="5"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="14" align="right" valign="top"><img src="images/index_02.gif" width="12" height="138"></td>
          <td align="center" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
              <tr valign="top"> 
                <td height="21" style="border-style: none; border-width: medium"> 
                  <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
                    <tr valign="top"> 
                      <td valign="middle" 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"> <font color="#FF0000">还没有房源!</font></p>
      <p>
                        <% else    
   rs.pagesize=30   
   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 cellspacing="0" style="border-collapse: collapse" bordercolor="#dedede" cellpadding="4" align="center" width="98%">
                          <tr bgcolor="#00CCFF"  valign="bottom"> 
                            <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                            <div align="center">编 号</div></td>
                            <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                            <div align="center"><span style="font-size: 9pt">所属区域</span></div></td>
                            <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                            <div align="center"><span style="font-size: 9pt">地 点</span></div></td>
							  <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                              <div align="center"><span style="font-size: 9pt">房屋类型</span>                            </div></td>
                            <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                              <div align="center"><span style="font-size: 9pt">户  型</span>                            </div></td>
                            <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                              <div align="center"> <span style="font-size: 9pt"> 
                                <% If typeto="sale" Then
					  response.Write("价 格")
					  else
					  response.Write("租 金")
					  end if %>
                            </span> </div></td>
                            
                            <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                            <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%>#F8F8F8<%Else%>#efefef<%End If%>"> 
                            <td style="border-style: solid; border-width: 1"> 
                              <div align="center"> 
                                <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 bgcolor="<%If (i Mod 2) Then%>#F8F8F8<%Else%>#efefef<%End If%>" style="border-style: solid; border-width: 1"> 
                              <div align="center"><span style="font-size:9pt"><%=(rs.Fields.Item("Diduan").Value)%></span></div></td>
                            <td style="border-style: solid; border-width: 1"> 
                              <div align="left"><span style="font-size:9pt">&nbsp;<a target="_blank" href="show.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 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 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 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 style="border-style: solid; border-width: 1"> 
                              <div align="center"><a target="_blank" href="show.asp?zid=<%= rs.Fields.Item("zid").Value %>&typeto=<%= typeto %>" onClick="return newpage(this.href);"><span style="font-size:9pt"><font color="#FF6600">查阅</font></span></a></div></td>
                          </tr>
                          <%     
   if i>=MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出     
   i=i+1     
    rs.movenext     
    loop     
%>
                        </table>
                        <%end sub %>
                        <%sub showpages() %>
                        <%     
end sub     
sub showpages1()     
dim n     
n=totalPage     
%>
                        <div align="center"> 
                          <center>
                            <table height="30" border="0" cellpadding="0" cellspacing="0">
                              <tr> 
                                <td 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=list_search.asp?type=<%= typeto %>&<%= SearchValue %>><font color="#FF6600"><span style="font-size:9pt">[首页]</span></font></a> 
                                    <a href=list_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=list_search.asp?type=<%= typeto %>&Page=<%= (currentPage+1) %>&<%= SearchValue %> ><font color="#FF6600"><span style="font-size:9pt">[下一页]</span></font></a> 
                                    <a href=list_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>页 
                                    </span> </div></td>
                              </tr>
                            </table>
                          </center>
                        </div>
                        <%end sub%>
                      </td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999" class="bk">
  <tr>
    <td height="1">
	</td>
  </tr>
</table>

</body>
</html>

⌨️ 快捷键说明

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