<%sql="select top 30 info_id,type,showname from info where type='供' and flag=1 order by info_id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if rs.eof then
response.write"暂无供求信息"
else
page=int(request.QueryString ("page"))
rs.PageSize=20 //每页显示的记录条数
if page<=0 then page=1
if request.QueryString("page")="" then page=1
if page>rs.pagecount then page=rs.pagecount
rs.AbsolutePage=page
for k=1 to rs.PageSize
%>
</td>
</tr>
<tr bgcolor="E3F0FF" class="class1">
<td nowrap> <font color="#000000"><%=rs("info_id")%> </font></td>
<td nowrap> <font color="#000000"><%=rs("type")%> </font></td>
<td nowrap> <font color="#000000"><a href='info.asp?info_id="&rs("info_id")&"' target='_blank' >
<%response.write" <a href='info.asp?info_id="&rs("info_id")&"' target='_blank' >"&left(rs("showname"),20)&"</a>"%>
</a>
<%rs.movenext
if not rs.eof then response.write "<br/>"
if rs.eof then exit for
next
%>
</font></td>
</tr>
</table>
<table width="72%" height="10" border="0" align="center" bordercolor="#FFFFFF" bgcolor="#000000" class="classdbgridbottom">
<tr>
<td height="23" align="center" valign="top" class="classdbgridbottom"><font size="2">当前<%=page%>/<%=rs.pagecount%>一共<%=rs.recordcount%>条信息
每页<%=rs.PageSize%>条 <a href="list.asp?page=1">首页</a>
<%
if page-1=0 then
response.write "<font color='gray'>上一页</font>"
else
%>
<a href="list.asp?page=<%=page-1%>">上一页</a>
<%end if
if page+1>rs.pagecount then
response.write "<font color='gray'>下一页</font>"
else
%>
<a href="list.asp?page=<%=page+1%>">下一页</a>
<%end if%>
<a href="list.asp?page=<%=rs.pagecount%>">尾页</a> 转到:
<SELECT name="select" οnchange=window.location.href=options[selectedIndex].value;>
<%for i=1 to rs.pagecount%>
<OPTION value=list.asp?page=<%=i%> <%if page=4 then response.write " selected"%>><%=i%></OPTION>
<%next%>
</SELECT>
</font> <font size="2">
<%
end if
%>
<%
rs.close
call connclose
%>