php数据分页跳转 php分页实现跳转( 四 )


break;
case '2':
$this-next_page='下一页';
$this-pre_page='上一页';
$this-first_page='首页';
$this-last_page='尾页';
return $this-first_page($style,$nowindex_style)." ".$this-pre_page($style,$nowindex_style)." ".$this-next_page($style,$nowindex_style)." ".$this-last_page($style,$nowindex_style).' 第'.$this-select().'页 (当前第span style="color:#C16012; font-size:12pt;"'.$this-nowindex.'/span页 共span style="color:#C16012; font-size:12pt;"'.$this-totalpage.'/span页 span style="color:#C16012; font-size:12pt;"'.$this-total.'/span条记录)';
break;
case '3':
$this-next_page='下一页';
$this-pre_page='上一页';
$this-first_page='首页';
$this-last_page='尾页';
return $this-pre_page($style,$nowindex_style)." ".$this-nowbar($style,$nowindex_style)." ".$this-next_page($style,$nowindex_style).' (当前第span style="color:#C16012; font-size:12pt;"'.$this-nowindex.'/span页 共span style="color:#C16012; font-size:12pt;"'.$this-totalpage.'/span页 span style="color:#C16012; font-size:12pt;"'.$this-total.'/span条记录)';
break;
case '4':
$this-next_page='下一页';
$this-pre_page='上一页';
return $this-pre_page($style,$nowindex_style)." ".$this-nowbar($style,$nowindex_style)." ".$this-next_page($style,$nowindex_style).' 第'.$this-select().'页 (当前第span style="color:#C16012; font-size:12pt;"'.$this-nowindex.'/span页 共span style="color:#C16012; font-size:12pt;"'.$this-totalpage.'/span页 span style="color:#C16012; font-size:12pt;"'.$this-total.'/span条记录)';
break;
case '5':
$this-next_page='';
$this-pre_page='';
$this-first_page='';
$this-last_page='';
return $this-first_page($style,$nowindex_style)." ".$this-pre_page($style,$nowindex_style)." ".$this-nowbar($style,$nowindex_style)." ".$this-next_page($style,$nowindex_style)." ".$this-last_page($style,$nowindex_style).' (当前第span style="color:#C16012; font-size:12pt;"'.$this-nowindex.'/span页 共span style="color:#C16012; font-size:12pt;"'.$this-totalpage.'/span页 span style="color:#C16012; font-size:12pt;"'.$this-total.'/span条记录)';
break;
case '6':
$pagehtml="div";
if($this-nowindex1)
{
$pagehtml.="span class=\"pagenum-l\"a href=https://www.04ip.com/"{$this-_get_url($this-nowindex-1)}\"img src=https://www.04ip.com/"images/page_up.gif\" //a/span";
}
else
{
$pagehtml.="span class=\"pagenum-l\"img src=https://www.04ip.com/"images/page_up.gif\" //span";
}
$pagehtml.="span class=\"pagenum-c\"";
$pagehtml.="tabletr";
$plus=ceil($this-pagebarnum/2);
if($this-pagebarnum-$plus+$this-nowindex$this-totalpage)$plus=($this-pagebarnum-$this-totalpage+$this-nowindex);
$begin=$this-nowindex-$plus+1;
$begin=($begin=1)?$begin:1;
for($i=$begin;$i$begin+$this-pagebarnum;$i++)
{
if($i=$this-totalpage){
if($i!=$this-nowindex)
$pagehtml.="td a href=https://www.04ip.com/"{$this-_get_url($i)}\"{$i}/a /td";
else
$pagehtml.="td {$i} /td";
}else{
break;
}
$pagehtml.="\n";
}
unset($begin);
$pagehtml.="/tr/table";
$pagehtml.="/span";
if($this-nowindex$this-totalpage)
{
$pagehtml.="span class=\"pagenum-r\"a href=https://www.04ip.com/"{$this-_get_url($this-nowindex+1)}\"img src=https://www.04ip.com/"images/page_down.gif\" //a/span";
}
else
{
$pagehtml.="span class=\"pagenum-r\"img src=https://www.04ip.com/"images/page_down.gif\" //span";
}
$pagehtml.="/div";
return $pagehtml;
break;
}
}
/*----------------private function (私有方法)-----------------------------------------------------------*/
/**
* 设置url头地址
* @param: String $url
* @return boolean
*/
function _set_url($url="")
{
if($this-page_webmode!="php"$url!=""){

推荐阅读