📄 houselist.asp
字号:
<!--#include file ="conn.asp"-->
<!--#include file ="head.asp"-->
<%
if request("hcgood")<>"" then session("hcgood")=request("hcgood")
sql = "select * from house where checkup=1 and puttype='"&session("hcgood")&"' order by id desc"
response.write "<font size=6><center><b>房屋信息</b></font><br>"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount=0 then
response.write "<br><center>没有任何信息"
response.end
end if
page=int(request.QueryString ("page"))
rs.PageSize=5
pagecount=rs.pagesize
if page<=0 then page=1
if request.QueryString("page")="" then page=1
rs.AbsolutePage=page
gg=rs.recordcount/pagecount
gh=int(gg)
if gh<=1 then gh=1
if gg>gh then gh=gh+1
gg=gh
%>
<table border="0" width="744" align="center">
<tr align="center">
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC">房屋地址</td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC">发布类型</td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC">价格</td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC">联系人</td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC">联系方式</td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC">操作</td>
</tr>
<%
for i=1 to pagecount
%>
<tr align="center">
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC"><%=rs("region")%><%=rs("address")%></td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC"><%=rs("puttype")%></td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC"><%=rs("price")%></td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC"><%=rs("linkman")%></td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC"><%=rs("connect")%></td>
<td style="border-style: dotted; border-width: 1px" bordercolor="#CCCCCC"><a href=houseview.asp?hcgood=<%=rs("id")%>>查看</a></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
%></table><br>
<%
if page<>1 then
%>
<a href='houselist.asp?page=<%=page-1%>'>上一页</a>
<%end if%>
<%if rs.eof then%>
<%else%>
<a href='houselist.asp?page=<%=page+1%>'>下一页</a>
<%end if%>
共<%=rs.recordcount%>条 每页显示<%=pagecount%>条 第<%=page%>页 共<%=gg%>页
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -