<body leftmargin="0" marginwidth="0" marginheight="0">
<center>
<table width="600" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
<tr>
<td><table width="600" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="60" height="25" align="center" bgcolor="#FFFFFF"><strong>房屋状态</strong></td>
<td width="60" align="center" bgcolor="#FFFFFF"><strong>房屋编号</strong></td>
<td width="70" align="center" bgcolor="#FFFFFF"><strong>产权证编号<br>
</strong></td>
<td align="center" bgcolor="#FFFFFF"><strong>房屋位置</strong></td>
<td width="60" align="center" bgcolor="#FFFFFF"><strong>面积</strong></td>
<td width="40" align="center" bgcolor="#FFFFFF"><strong>售价</strong></td>
</tr>
<%
dim rs,sql,a
set rs=server.CreateObject("adodb.recordset")
sql="select * from sale order by id desc"
rs.open sql,conn,1,1
rs.PageSize=28
dim total,PageNo '页数
PageNo=request("PageNo")
total=int(rs.recordcount / rs.PageSize * -1)*-1 '计算可显示页面的总数
dim ScrollAction '上一页,下一页操作符
ScrollAction = Request("ScrollAction")
if ScrollAction = "首页" Then PageNo=1
if ScrollAction = "上一页" Then PageNo=PageNo-1
if ScrollAction = "下一页" Then PageNo=PageNo+1
if ScrollAction = "尾页" Then PageNo=total
if PageNo < 1 Then PageNo = 1
if PageNo > total then PageNo = total
rs.AbsolutePage = PageNo
position=rs.PageSize*PageNo
pagebegin=position-rs.PageSize+1
if position < rs.RecordCount then
pagend=position
else
pagend= rs.RecordCount
end if
RowCount = rs.PageSize
do while not rs.eof
%>
<tr onclick="location.href='show.asp?id=<%=rs("id")%>';" style="cursor:hand;">
<td height="22" align="center" bgcolor="#FFFFFF"><font color="#0000FF">
<%
fettle=rs("fettle")
select case fettle
case "作废"
response.Write("<img src=../images/sale1.gif width=10 height=11 align=absmiddle>"&fettle)
case "已售"
response.Write("<img src=../images/sale3.gif width=10 height=11 align=absmiddle>"&fettle)
case else
response.Write("<img src=../images/sale2.gif width=10 height=11 align=absmiddle>"&fettle)
end select
%>
</font></td>
<td bgcolor="#FFFFFF"> <font color="#0000FF"><%=rs("field1")%></font></td>
<td bgcolor="#FFFFFF"> <font color="#0000FF"><%=rs("field3")%></font></td>
<td align="center" bgcolor="#FFFFFF"><font color="#0000FF"><%=rs("field2")%></font></td>
<td align="center" bgcolor="#FFFFFF"><font color="#0000FF"><%=rs("field4")%></font></td>
<td align="center" bgcolor="#FFFFFF"><font color="#0000FF"> </font></td>
</tr>
<%
a=a+1
if a>=rs.PageSize then exit do
rs.movenext
if rs.eof then exit do
loop
%>
</table>
</td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="250" height="25"> 共<font color="#FF0000"><%=rs.recordcount%></font>条<font color="#FF0000"><%=total%></font>页
当前第<font color="#FF0000"><%=pageno%></font>页 </td>
<td align="right">【<a href=?ScrollAction=首页&PageNo=<%=PageNo%><%if request("action")<>"" then response.Write("&action=select")%><%if request("action")<>"" then response.Write("&name="&request("name"))%>>首页</a>】
【<a href=?ScrollAction=上一页&PageNo=<%=PageNo%><%if request("action")<>"" then response.Write("&action=select")%><%if request("action")<>"" then response.Write("&name="&request("name"))%>>上一页</a>】
【<a href=?ScrollAction=下一页&PageNo=<%=PageNo%><%if request("action")<>"" then response.Write("&action=select")%><%if request("action")<>"" then response.Write("&name="&request("name"))%>>下一页</a>】
【<a href=?ScrollAction=尾页&PageNo=<%=PageNo%><%if request("action")<>"" then response.Write("&action=select")%><%if request("action")<>"" then response.Write("&name="&request("name"))%>>尾页</a>】 </td>
</tr>
</table>
</center>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
'换页
set rs=server.CreateObject ("adodb.recordset")
rs.open sql,conn,3,1
rs.PageSize=30
allPage=rs.PageCount
rsCount=rs.RecordCount
if not IsNumeric(intPage) then intPage=1
if cint(intPage)>cint(allPage) then intPage=allPage
rs.AbsolutePage = intPage
i=1
for j=(intPage-1)*30+1 to (intPage-1)*30+30
if i/2=i\2 then
strColor=""'strColor="#A0E7DE"
else
strColor="bgcolor=""#FFFFFF"""
end if
%>
<%
rs.movenext
if rs.EOF then exit for
i=i+1
next
%>