Infocount = $infoCount; $this->items = $items; $this->pageno = $pageNo; $this->pagecount = $this->getpagecount (); $this->adjustpageno (); $this->startpos = $this->getstartpos (); } function Adjustpageno () {if ($this->pageno = = | | $this->pageno < 1) $this->pageno = 1; if ($this->pageno > $this->pagecount) $this->pageno = $this->pagecount; }/** * Next * * Function Gotonextpage () {$nextPageNo = $this->pageno + 1; if ($nextPageNo > $this->pagecount) {$ This->nextpageno = $this->pagecount; return false; } $this->nextpageno = $nextPageNo; return true; }/** * Previous page */function Gotoprevpage () {$prevPageNo = $this->pageno-1; if ($prevPageNo < 1) {$this->prevpagen o = 1; return false; } $this->prevpageno = $prevPageNo; return true; } function Getpagecount () {return ceil ($this->infocount/$this->items),} function Getstartpos () {return ($this-& GT;PAGENO-1) * $this->items; }}?>
http://www.bkjia.com/PHPjc/532123.html www.bkjia.com true http://www.bkjia.com/PHPjc/532123.html techarticle infocount = $infoCount; $this->items = $items; $this->pageno = $pageNo; $this->pagecount = $this->getpage Count (); $this->adjustpageno (); $this->startpos = $this->getstartpos (); } F ...