php google 风格分页代码
public function showCtrlPanel_g($halfPer = 5) {
$re = '
- '.$ this->lineCount.'条
- '.$this->currentPage.'/'.$this->pageCount.'页< ;/span>
';
if($this->currentPage-$halfPer >1){
$re .= '- 1
';
if($this->currentPage-$halfPer*2 >1){
$re .= '- < span>...
';
}else{
$re .= '- ...
';
}
}
for ( $i = $this->currentPage - $ハーフパー,$i > 1 || $i = 1 , $j = $this->currentPage + $j < $this->pageCount;$ i <= $j ;$i++ )
{
$re .= $i == $this->currentPage
?? '- '.$i.'< /span>
'." "
: '- '.$i.'
'." ";
}
if($this->currentPage+$halfPer < $this-> ;pageCount){
if($this->currentPage+$halfPer*2 < $this->pageCount){
$re .= '- ...
';
} else{
$re .= '- ...
';
}
$re .= '- '.$this->pageCount.'
';
}
$re .= '
';
return $re;
}
http://www.bkjia.com/PHPjc/445013.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445013.html技術記事 php google 风格分页代码 public function showCtrlPanel_g($halfPer = 5){ $re = 'div class=pageMore ul lispan'.$this-lineCount.'条/span/li lispan'.$this-currentPage.'/'。 $this-p...