php 分页类和大家分享一下(4)
来源:未知 责任编辑:责任编辑 发表时间:2015-10-08 14:15 点击:次
$subPageCss1Str="";
$subPageCss1Str.="共".$this->nums."条记录,";
$subPageCss1Str.="每页显示".$this->each_disNums."条,";
$subPageCss1Str.="当前第".$this->current_page."/".$this->pageNums."页 ";
if($this->current_page > 1){
$firstPageUrl=$this->subPage_link."1";
$prewPageUrl=$this->subPage_link.($this->current_page-1);
$subPageCss1Str.="[<a href="$firstPageUrl" mce_href="$firstPageUrl">首页</a>] ";
$subPageCss1Str.="[<a href="$prewPageUrl" mce_href="$prewPageUrl">上一页</a>] ";
}else {
$subPageCss1Str.="[首页] ";
$subPageCss1Str.="[上一页] ";
}
if($this->current_page < $this->pageNums){
$lastPageUrl=$this->subPage_link.$this->pageNums;
$nextPageUrl=$this->subPage_link.($this->current_page+1);
$subPageCss1Str.=" [<a href="$nextPageUrl" mce_href="$nextPageUrl">下一页</a>] ";
$subPageCss1Str.="[<a href="$lastPageUrl" mce_href="$lastPageUrl">尾页</a>] ";
}else {
$subPageCss1Str.="[下一页] ";
$subPageCss1Str.="[尾页] ";
}
echo $subPageCss1Str;
}
/*
构造经典模式的分页
相关新闻>>
- 发表评论
-
- 最新评论 更多>>