sql="select * from news where a='"&a&"' order by pai desc"
rs.Open sql,conn,1,1
if rs.eof and rs.bof then
response.Write("暂时没有记录")
else
%>
<%
rs.PageSize=24
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page
for j=1 to rs.PageSize
%>
<%if rs("l3")<>"" then%>
<li><p><a href="<%=rs("l3")%>" target="_blank"><%=rs("title")%> </a></p><span><%=year(rs("Infotime"))%>.<%=month(rs("Infotime"))%>.<%=day(rs("Infotime"))%></span></li>
<%else%>
<li><p><a href="newsnw.asp?id=<%=rs("id")%>"><%=rs("title")%> </a></p><span><%=year(rs("Infotime"))%>.<%=month(rs("Infotime"))%>.<%=day(rs("Infotime"))%></span></li>
<%end if%>
<%
rs.movenext
if rs.eof then exit for
next
%>
</div>
<div class="fen"><form method=Post action="?a=<%=a%>&b=<%=b%>">
<%if Page<2 then
response.write "首页 上一页 "
else
response.write "<a href=?a="&a&"&b="&b&"&page=1>首页</a> "
response.write "<a href=?a="&a&"&b="&b&"&page=" & Page-1 & ">上一页</a> "
end if
if rs.pagecount-page<1 then
response.write "下一页 尾页"
else
response.write "<a href=?a="&a&"&b="&b&"&page=" & (page+1) & ">"
response.write "下一页</a> <a href=?a="&a&"&b="&b&"&page="&rs.pagecount&">尾页</a>"
end if
response.write " 页次:<strong><font color=red>"&Page&"</font>/"&rs.pagecount&"</strong>页 "
response.write " 共<b><font color='#FF0000'>"&rs.recordcount&"</font></b>条记录 <b>"&rs.pagesize&"</b>条记录/页"
response.write " 转到:<input type='text' name='page' size=4 maxlength=10 class=input value="&page&">"
response.write " <input class=input type='submit' value=' Goto ' name='cndok'></span></p>"
%>
</form>
</div>
<%
end if
rs.close
set rs=nothing
%>
转发请注明:丁丁猫