{
//当前页
var$page=1;
//每页显示条数
var$size=20;
//总记录数
var$;
//每栏显示条数
var$lun=10;
//参数绑订
var$;
//跳转
var$run;
=&pwd=2132&sex=1
//$_GET['name']=;
(){
$=$this->;
unset($param['page']);
if(is_array($param)&&!empty($param)){
foreach($paramas$key=>$value){
$data[]=$key."/".$value;
}
$this->url=implode("/",$data);
$this->param=$this->url;
$this->url="/".$this->url;
}else{
if(!empty($param)){
$this->url=$param;
$this->param=$this->url;
$this->url="/".$this->url;
}
}
}
functionpageDate(){
$this->setParam();
$num=ceil($this->lun/2);
$this->page=intval($this->page);
$this->page=$this->page
page;
$cpage['countPage']=ceil($this->count/$this->size);//总页数
$cpage['page']=$this->page>$cpage['countPage']?$cpage['countPage']:$this->page;
//当前页
//显示总数
$cpage['lun']=$cpage['countPage']
lun?$cpage['countPage']:$this->lun;
//开始页码
$cpage['start']=$this->page>$num-1?$this->page-$num+1:1;
$cpage['start']=($cpage['start']+$cpage['lun'])>=$cpage['countPage']?$cpage['countPage']-$cpage['lun']+1:$cpage['start'];
//参数显示
$cpage['url']=$this->url;
//控制跳转
$cpage['run']=$this->run?1:0;
$cpage['param']=is_array($this->param)?'':"?".$this->param;
return$cpage;
}
}
?>