php google 风格分页代码_PHP教程
程序员文章站
2022-05-20 13:16:45
...
php google 风格分页代码
public function showCtrlPanel_g($halfPer = 5) {
$re = '
';
return $re;
}
public function showCtrlPanel_g($halfPer = 5) {
$re = '
- '.$this->lineCount.'条
- '.$this->currentPage.'/'.$this->pageCount.'页 ';
- 1 ';
- ... ';
- ... ';
- '.$i.' '." "
- '.$i.' '." ";
- ... ';
- ... ';
- '.$this->pageCount.' ';
if($this->currentPage-$halfPer >1){
$re .= '
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
? '
: '
}
if($this->currentPage+$halfPer pageCount){
if($this->currentPage+$halfPer*2 pageCount){
$re .= '
}else{
$re .= '
}
$re .= '
}
$re .= '
return $re;
}
上一篇: 怎么用PHP发送HTTP请求(转载)