<?php
/** 
 * UQ云商：	www.uqcms.com  
 * 联系QQ：	2200631718 
 * 可免费商用，需要留UQ云商链接作为交换，只首页底部留取即可，不影响使用。
 */

defined('IN_UQ') or exit('Access Denied'); class page{ private $uq0; private $uq1; private $uq2; private $uq3; private $uq4; private $uq5 = array(); private $uq6; function __construct($uq0, $uq1, $uq2, $uq3, $uq6, $uq7 = NULL) { $this->each_disNums=intval($uq0); $this->nums=intval($uq1); if(!$uq2){ $this->current_page=1; }else{ $this->current_page=intval($uq2); } $this->sub_pages = intval($uq3); $this->pageNums = ceil($uq1/$uq0); $this->subPage_link = $uq6; $this->wid_link = $uq7; } function initArray() { for($uq8=0;$uq8<$this->sub_pages;$uq8++){ $this->page_array[$uq8]=$uq8; } return $this->page_array; } function construct_num_Page() { if($this->pageNums < $this->sub_pages){ $uq9=array(); for($uq8=0;$uq8<$this->pageNums;$uq8++){ $uq9[$uq8]=$uq8+1; } }else{ $uq9=$this->initArray(); if($this->current_page <= 3){ for($uq8=0;$uq8<count($uq9);$uq8++){ $uq9[$uq8]=$uq8+1; } }elseif ($this->current_page <= $this->pageNums && $this->current_page > $this->pageNums - $this->sub_pages + 1 ){ for($uq8=0;$uq8<count($uq9);$uq8++){ $uq9[$uq8]=($this->pageNums)-($this->sub_pages)+1+$uq8; } }else{ for($uq8=0;$uq8<count($uq9);$uq8++){ $uq9[$uq8]=$this->current_page-2+$uq8; } } } return $uq9; } function subPage() { $subPageCss2Str=""; if($this->current_page > 1){ $uq11=$this->subPage_link."1".$this->wid_link; $uq12=$this->subPage_link.($this->current_page-1).$this->wid_link; $subPageCss2Str.="<a href='$uq11'>首页</a>"; $subPageCss2Str.="<a href='$uq12'>上一页</a>"; }else{ $subPageCss2Str.="<a>首页</a>"; $subPageCss2Str.="<a>上一页</a>"; } $uq13=$this->construct_num_Page(); for($uq8=0;$uq8<count($uq13);$uq8++){ $uq14=$uq13[$uq8]; if($uq14 == $this->current_page ){ $subPageCss2Str.="<span><a>".$uq14."</a></span>"; }else{ $uq15=$this->subPage_link.$uq14.$this->wid_link; $subPageCss2Str.="<a href='$uq15'>".$uq14."</a>"; } } if($this->current_page < $this->pageNums){ $uq16 = $this->subPage_link.$this->pageNums.$this->wid_link; $uq17 = $this->subPage_link.($this->current_page+1).$this->wid_link; $subPageCss2Str .= "<a href='$uq17'>下一页</a>"; $subPageCss2Str .= "<a href='$uq16'>尾页</a>"; }else{ $subPageCss2Str .= "<a>下一页</a>"; $subPageCss2Str .= "<a>尾页</a>"; } $uq18['page'] = $subPageCss2Str; $uq19 = $this->subPage_link.($this->current_page+1); $uq20 = '<div id="more">
						<a href="'.$uq19.'"></a>
						<input type="hidden" id="curr_page" value="'.$this->current_page.'"/>
						<input type="hidden" id="path_parse" value="'.$this->subPage_link.'">
					</div>'; $uq18['scroll_url'] = $uq20; return $uq18; } function __destruct(){ unset($uq0); unset($uq1); unset($uq2); unset($uq3); unset($uq4); unset($uq5); unset($uq6); } } ?>