php google 风格分页代码
public function showctrlpanel_g($halfper = 5) {
$re = '
- '.$this->linecount.'条
- '.$this->currentpage.'/'.$this->pagecount.'页
';
if($this->currentpage-$halfper >1){
$re .= '- 1
';
if($this->currentpage-$halfper*2 >1){
$re .= '- ...
';
}else{
$re .= '- ...
';
}
}
for ( $i = $this->currentpage - $halfper,$i > 1 || $i = 1 , $j = $this->currentpage + $halfper, $j pagecount || $j = $this->pagecount;$i {
$re .= $i == $this->currentpage
? '- '.$i.'
'." "
: '- '.$i.'
'." ";
}
if($this->currentpage+$halfper pagecount){
if($this->currentpage+$halfper*2 pagecount){
$re .= '- ...
';
}else{
$re .= '- ...
';
}
$re .= '- '.$this->pagecount.'
';
}
$re .= '
';
return $re;
}
http://www.bkjia.com/PHPjc/445013.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445013.htmlTechArticlephp google 风格分页代码 public function showCtrlPanel_g($halfPer = 5){ $re = 'div class=pageMore ul lispan'.$this-lineCount.'条/span/li lispan'.$this-currentPage.'/'.$this-p...