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 " 轉(zhuǎn)到:<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
%>
轉(zhuǎn)發(fā)請注明:丁丁貓