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

📄 list_search1.asp

📁 我同学的毕业设计源代码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<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__myQiu
if(request("txtqiu")<>"") then rs__myQiu=  request("txtqiu")
if rs__myQiu= "change1" then rs__myQiu= "租房"
if rs__myQiu="change2" then  rs__myQiu= "购房"

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   rs__myQiu= "租房"  then
if(Request("txtJiag2") <> "") then rs__myJiag = Request("txtJiag2")
end if 
if   rs__myQiu= "购房" then
if(Request("txtJiag1") <> "") then rs__myJiag = Request("txtJiag1")

end if
%>
<%
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 = "txtqiu="&rs__myQiu&"&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="left2.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="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td width="77%"><font color="#FFFFFF">求租求购信息</font></td>
                      <td width="23%" align="center"><font color="#FFFFFF"></font></td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td colspan="2" bgcolor="#ffb600"><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,uid,City,Diduan,Fangx, Taox, Mianj, M, Lc,Jiag, J, Xiaoqm, Tele, email,Zx,Content,fangshi,D,Contperson,qiu,quansh, need.Dat  FROM need WHERE qiu like '"&rs__myQiu +"' and 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=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 cellpadding="4" cellspacing="0" bordercolor="#dedede" style="border-collapse: collapse" align="center" border="0" width="98%">
                          <tr bgcolor="#00CCFF" class="9size" valign="bottom"> 
                            <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                            <p align="center">类 别 </td>
                            <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">需求地段</div></td>
							  <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                              <div align="center"><font size="2"><span class="9size"> 
                            需求房型</span></font></div></td>
                            <td bgcolor="#ffcc99" style="border-style: solid; border-width: 1"> 
                              <div align="center"><font size="2"><span class="9size"> 
                            需求户型</span></font></div></td>
                            <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"> 
                            <p align="center">有效期 </td>
                            <td bgcolor="#FFCC99" style="border-style: solid; border-width: 1"> 
                            <div align="center">详情况</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 align="center" style="border-style: solid; border-width: 1"> 
                              <span style="font-size:9pt"> <%=(rs.Fields.Item("qiu").Value)%></span> 
                            </td>
                            <td 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"><a href="show_need.asp?<%= "zid=" & rs.Fields.Item("zid").Value %>&typeto=need" target="_blank" onClick="return newpage(this.href);"><font color="#FF6600"> 
                                <%if len(rs("Xiaoqm"))>8 then %>
                                <%=left(rs("Xiaoqm"),8)%>... 
                                <%else%>
                                <%=rs("Xiaoqm")%> 
                                <%end if %>
                                </font></a></span></div></td>
								<td style="border-style: solid; border-width: 1"> 
                              <div align="center"><span style="font-size:9pt"><%=(rs.Fields.Item("Fangx").Value)%></span><span style="font-size: 9pt"></span></div></td>
                            <td style="border-style: solid; border-width: 1"> 
                              <div align="center"><span style="font-size:9pt"><%=(rs.Fields.Item("Taox").Value)%></span><span style="font-size: 9pt"></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 align="center" style="border-style: solid; border-width: 1"> 
                              <span style="font-size:9pt"> <%=(rs.Fields.Item("D").Value)%>天</span></td>
                            <td style="border-style: solid; border-width: 1"> 
                              <div align="center"><a target="_blank" href="show_need.asp?zid=<%= rs.Fields.Item("zid").Value %>&typeto=need" 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=houseneedlist.asp><font color="#FF6600"><span style="font-size:9pt">[首页]</span></font></a> 
                                    <a href=houseneedlist.asp?Page=<%= (currentPage-1) %>><font color="#FF6600"><span style="font-size:9pt">[上一页]</span></font></a> 
                                    <% End If %>
                                    <% If currentPage <> rs.PageCount Then %>
                                    <a href=houseneedlist.asp?Page=<%= (currentPage+1) %>><font color="#FF6600"><span style="font-size:9pt">[下一页]</span></font></a> 
                                    <a href=houseneedlist.asp?Page=<%= totalPage %>><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 + -