php 分页类和大家分享一下(10)
来源:未知 责任编辑:责任编辑 发表时间:2015-10-08 14:15 点击:次
$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);
$subPageCss2Str.=" [<a href="$nextPageUrl" mce_href="$nextPageUrl">下一页</a>] ";
$subPageCss2Str.="[<a href="$lastPageUrl" mce_href="$lastPageUrl">尾页</a>] ";
}else {
$subPageCss2Str.="[下一页] ";
$subPageCss2Str.="[尾页] ";
}
echo $subPageCss2Str;
}
}
?>
摘自 chaojie2009的专栏
相关新闻>>
- 发表评论
-
- 最新评论 更多>>