PageCount

xiaoxiao2021-03-06  106

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 = "

; strdisppagetable = ""; if (intOffset> 1 ) {StrDisppageTable = "
9 ";} else {strDisppageTable = " 9 ";} if (intOffset> 1) {stradisppageTable =" 7 ";} else {strdisppageTable = " 7 ";} strdisppagetable =" [ " Icrpagenum " ] "; if (intOffset <

Font Face = / "Webdings /"> 8 ";} Else {strdisppageTable ="

8 ";} if (intOffset : ";} else {strdisppageTable =" : ";} strdisppagetable =" jump to "; strdisppagetable =" total " ipages " page / per page "; strDisppageTable = "

Select name = / "menu2 /" size = / "1 /" onchange = / "mm_jumpmenu ('self", 0) / ">"; if (INTPAGESIZE == 10) strdisppagetable = "

转载请注明原文地址:https://www.9cbs.com/read-104897.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.043, SQL: 9