<*******************************************************************************************************************************************************************************************************************************************************************************TION ******************************** The Script Compont Object Model 'Design for Active Server Pages' 'Copyright 2004 Version 2.0' Made by Yin Shuguang '**************************************************** *************************** function CreateCPageNavbar () set CreateCPageNavbar = new CPageNavbarend functionClass CPageNavbar public SplitSize 'capacity public PnWidth public PnAlign public paginated total number of pages of the current page displayed in the private paging CurrentSplit 'PlWidth' table width public PlAlign 'alignment of the table private PageSize private RecordCount' total records] private PageCount 'pages private CurrentPage' current page private SplitCount 'points Page size '================================================ =============== Private sub class_initialize 'setup initialize Event. Splitsize = 10 pnWidth = "100%" PNALIGN = "Right" PLWIDTH = "100%" // Table Width PLALIGN = " Right "// Table alignment Pagesize = 0 Recordcount = 0 CURRENTPAGE = 1 PageCount = 1 SplitCount = 1 CurrentSplit = 1 End Sub Private Sub Class_Terminate 'Setup Terminate event. End Sub public sub InitPageNavbar (byval iPageSize, byval iRecordCount) PageSize = cint (iPageSize) RecordCount = clng (iRecordCount) PageCount = fix (RecordCount / PageSize
1 splitcount = fix (pagecount / splitsize) 1 End subpublic function getCurrentPage () 'on error resume Next Dim Pageno Pageno = Trim ("_page_no_"))' If you do not choose the first few pages, the first is the first Page; if isnumeric (PAGENO)) or Pageno = "") THEN PAGENO = 1 end if currentpage = clng (PAGENO) IF (CurrentPage <1) THEN CURRENTPAGE = 1 End ififf (currentpage> PageCount) THEN CURRENTPAGE = PageCount end if currentsplit = fix (currentpage / splitsize) 1 getCurrentPage = CURRENTPAGE END FUNCTION
public function plDisplay () dim strBuilder, p, itmp strBuilder = "" 'first group of group 0 strBuilder = strBuilder "
page: "if (CurrentSplit = 1) then strBuilder = strbuilder 9 font> "strbuilder = strbuilder " 7 font> "else strbuilder = Strbuilder 9 font> "strbuilder = strbuilder 7 font> " end if strabuilder = strbuilder " "Page List ITMP = (Currentsplit-1) * Splitsize 1 for i = ITMP To (ITMP Splitsize-1) IF (i = currentpage) Ten strbuilder = strbuilder >> "& CS Tr (I) & " font>" else strbuilder = strbuilder
Title = 'Go to: "& CSTR (I) &" Page'> & CSTR (i) & " = pagecount) THEN EXIT for end if Next strbuilder = strbuilder B> "'Show 10 IF (currentsplit
|