% code=request("code") SQL = "SELECT * FROM "&code&" ORDER BY NID DESC" Set rs = Server.CreateObject("ADODB.Recordset") rs.PageSize=10 rs.Open Sql, dbConnect, 1 if Request("pageNo")<>"" then Session("curpage")=Request("pageNo") else Session("curpage")=1 end if if Not(rs.EOF or rs.BOF) then rs.AbsolutePage=Session("curpage") numPerPage=10 totalpage=rs.PageCount totalblock=int(totalpage / numPerPage) if totalblock=(totalpage / numPerPage) then totalblock=totalblock-1 end if if Request("pageNo")<>"" then if Request("pageNo") Mod numPerPage=0 then nowblock=int((Request("pageNo")/numPerPage))-1 else nowblock=int((Request("pageNo")/numPerPage)) end if else nowblock=0 end if end if NID=rs("NID") %>
|
|||||||||||||||||