php 分页类和大家分享一下(5)
来源:未知 责任编辑:责任编辑 发表时间:2015-10-08 14:15 点击:次
当前第1/453页 [首页] [上页] 1 2 3 4 5 6 7 8 9 10 [下页] [尾页]
*/
function subPageCss2(){
$subPageCss2Str="";
$subPageCss2Str.="当前第".$this->current_page."/".$this->pageNums."页 ";
if($this->current_page > 1){
$firstPageUrl=$this->subPage_link."1";
$prewPageUrl=$this->subPage_link.($this->current_page-1);
$subPageCss2Str.="[<a href="$firstPageUrl" mce_href="$firstPageUrl">首页</a>] ";
$subPageCss2Str.="[<a href="$prewPageUrl" mce_href="$prewPageUrl">上一页</a>] ";
}else {
$subPageCss2Str.="[首页] ";
$subPageCss2Str.="[上一页] ";
}
$a=$this->construct_num_Page();
for($i=0;$i<count($a);$i++){
$s=$a[$i];
if($s == $this->current_page ){
$subPageCss2Str.="[<span style="color:red;font-weight:bold;" mce_style="color:red;font-weight:bold;">".$s."</span>]";
}else{
$url=$this->subPage_link.$s;
$subPageCss2Str.="[<a href="$url" mce_href="$url">".$s."</a>]";
}
}
if($this->current_page < $this->pageNums){
$lastPageUrl=$this->subPage_link.$this->pageNums;
$nextPageUrl=$this->subPage_link.($this->current_page+1);
相关新闻>>
- 发表评论
-
- 最新评论 更多>>