Package zpxx; import java.sql. *; import java.util.arraylist;
Public class pagecount {// Output HTML code public string strdisppagetable = ""; // Scripting file name public string packet file name = ""; // Terfer INT INTOFFSET = 1; // Next page INTNEXT = 0; // Previous INT INTPRV = 0; // One page display record number int intebitSize = 10; // Total page PUBLIC INT INTPAGECOUNT; / / Total record number private int introwcount; public void setPageCount (ResultSet RS) THROWS SQLEXCEPTION {IF (rs! = Null) {r.last (); Introwcount = rs.getrow (); INTPAGECUNT = (INTPANT INTPAGESIZE - 1) / INTPAGESIZE
Public void setPageCountList (int ArrayRS) {IF (arrayrs> 0) {introwcount = arrayrs; intPageCount = (Introwcount INTPAGESIZE - 1) / intPagesize;}}
Public void setscriptname (string stritalname = strers)
Public void setpagesize (int value) {INTPAGESIZE = Value; INTPAGECUNT = (Introwcount INTPAGESIZE - 1) / INTPAGESIZE
Public void setcurrentpage (int value) {INTOFFSET = Value; intnext = INTOFFSET 1; INTPRV = INTOFFSET - 1;}
Private Int gettotalpages () {return INTPAGECOUNT;
Private int getpagenext () {return intnext;}
Private int getpageprv () {return intprv;}
Private int getpageSize () {return INTPAGESIZE;
Private int getcurrentpage () {return intoffset;}
public String getHtmlPageCount () {int Ipagenext = getPageNext (); int Ipageprv = getPagePrv (); int Ipages = getTotalPages (); int IPS = getPageSize (); int Icurpagenum = getCurrentPage (); StrDispPageTable = "
9 font> td>";} else {strDisppageTable = " | 9 font> td> ";} if (intOffset> 1) {stradisppageTable =" | 7 font> td>";} else {strdisppageTable = " | 7 font> td> ";} strdisppagetable =" | [ " Icrpagenum " font >] td> "; if (intOffset Font Face = / "Webdings /"> 8 font> td > ";} Else {strdisppageTable =" 8 font> td> ";} if (intOffset | : Font> td> ";} strdisppagetable =" | jump to "; strdisppagetable =" | |