时间:2021-07-01 10:21:17 帮助过:10人阅读
// +----------------------------------------------------------------------
// $Id: page.class.php 2013-05-26 00:08:49
();
;
;
;
;
;
;
;
;
;
= ;
= 'header'=>'条记录','prev'=>'上一页','next'=>'下一页','first'=>'首页','last'=>'尾页',
'theme' => '%records% %header% %page%/%pageMax% 页 %firstPage%%prevPage%%linkPage%%nextPage%%lastPage%'
__construct(, , = 'p', = ->records = ->pageMax = (/->page= (([]), 1);
->page = (->page, ->pageMax);
->nextPage = ->page + 1->prevPage = ->page - 1->varPage = ;
->parameter = ;
setConfig(, ((->config[->config[] = 输出
+----------------------------------------------------------
* @param $length 分页条长度
+----------------------------------------------------------
* @param $hide 是否适时隐藏上、下一页,比如:当前是第一页,则隐藏上一页
+----------------------------------------------------------
show(, = (0 == ->records) ''(->url)? ->url = ['REQUEST_URI'] : = ->url.((->url,'?')?'':'?').-> = (((['query'(['query'],([-> = ['path'].'?'.(('mid' == ->style){
( % 2 != 0 = ( / 2 = - 1 ;
} = = / 2 = - 1;
->startPage = (->page + ) > ->pageMax ? ->pageMax - : ->page - ->endPage = (->page < )? : ->page + {
->startPage = (->page >= )? ['startPage'] : 1->endPage = ->startPage + - 1->lastPage = (['lastPage'])? ['lastPage'] : 1;
['lastPage'] = ->page;
(->lastPage < ->page){
(->page >= ->->startPage = ['startPage'] = ->->endPage = ->startPage + -1(->lastPage == ->page){
(->page == ->->startPage =