《script》ec(2);《script》
$cpage['page'] = $this->page > $cpage['countPage'] ? $cpage['countPage']:$this->page ;
//当前页
//显示总数
$cpage['lun'] = $cpage['countPage'] < $this->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;
}
}
/*include "../inc/smarty.php";
$cp = new page;
empty($_REQUEST['page']) || $cp->page = $_REQUEST['page'];
$cp->count = 70000;
$cp->param = $_GET;
$cp->size = 100;
$cp->lun = 7;
$cp->run = true;
$data = $cp->pageDate();
$smarty->assign("page",$data);
$smarty->display("cpage.html");
*/
?>