%bid=request("bid")%> <%if bid="" then bid=1 end if %> <% set rs13=server.createobject("adodb.recordset") sql13="select * from x_bclass where id="&bid rs13.open sql13,conn,1,1 if not rs13.eof then x_bclass=rs13("x_bclass") else x_bclass="新闻动态" end if rs13.close set rs13=nothing %>
<%=x_bclass%>
<%
set rs2=server.createobject("adodb.recordset")
sql2="select * from x_article where x_bid="&bid&" order by x_order asc,x_addtime desc"
rs2.open sql2,conn,1,1
if not rs2.eof then
dim ThisPage,Pagesize,Allrecord,Allpage,k,j
k=1
if request("page")="" then
ThisPage=1
else
ThisPage=request("page")
end if
rs2.Pagesize=10
Pagesize=rs2.Pagesize
Allrecord=rs2.Recordcount
Allpage=rs2.Pagecount
if ThisPage<1 then
ThisPage=1
end if
On Error Resume Next
rs2.move (ThisPage-1)*Pagesize
while not rs2.eof and k<=Pagesize
%>
当前页<%=ThisPage%>/<%=Allpage%> 共有 <%=Allrecord%> 条记录 每页<%=pagesize%>条
<%
dim myurl,pageposition
myurl=Request.ServerVariables("QUERY_STRING")
if myurl<>"" then
pageposition=instr(myurl,"page")
if pageposition>0 then
myurl=left(myurl,pageposition-1)
else
myurl=myurl+"&"
end if
end if
if ThisPage<2 then
response.write "首页 "
response.write "上一页 "
else
response.write "首页 "
response.write "上一页 "
end if
if Allpage-ThisPage<1 then
response.write "下一页 "
response.write "尾页 "
else
response.write "下一页 "
response.write "尾页 "
end if
%>
转到:
页
|