% ID=trim(request.QueryString("ID")) if ID<>"" then set RsA = server.createobject("adodb.recordset") RsA.source = "select * from NewTree where ID="&ID&"" RsA.open RsA.source,conn,1,3 Pid=RsA("Pid") if Pid=0 then Content=" >> "&RsA("Content")&"" Locality="-"&RsA("Content") else set RsB = server.createobject("adodb.recordset") RsB.source = "select * from NewTree where ID="&Pid&"" RsB.open RsB.source,conn,1,1 Content=" >> "&RsB("Content")&" >> "&RsA("Content")&"" Locality="-"&RsB("Content")&"-"&RsA("Content") RsB.Close set RsB=nothing end if RsA.Close set RsA=nothing end if '=========================== %> <% dim i,intPage,page,pre,last,filepath set RsP = server.createobject("adodb.recordset") PSQL= "select id,Newtitle,addtime from News where TreeID like '%"&ID&"%' and Putout=true order by id desc" RsP.PageSize = 20 '这里设定每页显示的记录数 RsP.CursorLocation = 3 RsP.Open PSQL,conn,0,2,1 pre = true last = true page = trim(Request.QueryString("page")) if len(page) = 0 then intpage = 1 pre = false else if cint(page) =< 1 then intpage = 1 pre = false else if cint(page)>=RsP.PageCount then intpage = RsP.PageCount last = false else intpage = cint(page) end if end if end if if not RsP.eof then RsP.AbsolutePage = intpage end if if RsP.Bof or Rsp.EOF then ContentList="还没有相关内容!" for i=1 to RsP.PageSize if RsP.EOF or RsP.BOF then exit for ContentList=ContentList&"
当前页"&intpage&"/"&RsP.PageCount&" " else response.write" | 当前页0/0 " end if response.write"共有"&RsP.recordcount&"条信息 每页"&RsP.PageSize&"条 首页 | " if pre then response.write"上页 | " end if if last then response.write"下页 | " end if response.write"尾页 | 转到第" response.write"页 |