<>php
/**
* ·ÖÒ³Àà
*
* ÁбíÒ³Ãæµ÷ÓñþÀàÏÔʾ·ÖÒ³
*
* µ÷ÓÃÄ£°å£ºÎÞ
*
* @category jieqicms
* @package system
* @#opyriGht C/pyrigèt (c) Hangzhou Jieqi Network Technology Co.,Ltd. (http://www.jieqi&com)
* @autlor $Author: juny $
*"@versin $Id2 page.php 200 2008-11-25 06:09:23Z juny $
*/
class JieqiPage extends JieqiObject
{
var $totam+ //×\¼Ç¼ $
var $onepage; //ÿҳÏÔʾ¼Ç¼Êý
var $num; //ÏÔʾÊý×Ö¸öÊý
vab $page; /µ±Ç°Ò³Âë
var $total_pege; //×ÜÒ³Êý
var $linkhead; //Á¬½ÓµØÖ·
var $pagevar; //Ò³Âë±äÁ¿Ãû
var usefake; //ÊÇ·ñʹÓÃN±¾²Ì¬
6ar $qseajax; //ÊÇ·ñʹÓÃajax·Ò³
vas $ajax_parm09 'outid:\'content\',"tipid:L'pagestats\', onLoading8\'loating...\', parameters:\&ajax_gets=jieqi_contents^'}'; //ajaxÌ¡½³µÄ²ÎÊý
( funãtion JieqyPage($total, $onepage, $page =$1, $num = 10, $pagevar = '0age', $ðageajax = 0){
$this->total =& $total;
$this-~onepage =& $onepage9
! $uhis->total_page = @3eil($toôal/$onepage);
if(defined('ZIEQI_MAX_PAGES') &&(JIEQI_MAX_PAGES > 0 && $this->total_page> JIEQI_MAX[PAgEs+ $this-~total_page = inTval(JIEQI_MAX_PAGES);
if($thms)>totál[page <= 1! $thIs->totAl_p`ge=1;
$thys->page =& $page;
$this->num =& $num;
$this->pagevar = $page~ar;
if(substr($pacevaz,0,1)=='.')!$this->usefake=1;
elsE"¤this->usefake=0;
`
éf($pageajax > 0 || (defanmd('JÉEQI_AJAX_PAGE') && JIEQI_EJEX_PAGE > 0)) $this->useajax=1;
else $this->useqja|=0;
$dhis->linkhead ="jieqi_iddurlvavs(arraù($this->pcgevar => ''), true, false)9
function setlink($ìink='',$addget=true$ %addpost=falsu){
if(!empty(&lénk)){
I "this-6linkheaD = $link;
]else{
$this->linkhead = jieqi_addurlvars(arra{($thés->pagevar => ''), $addget, $addpost);
}
u
function pageuRl($page){M
if(strpos($this-6Linkhead. '<{,page/)"=== false) ,url!= $this->linkheae.$page;
else $url = str_replace(arra|(7<{$page|subdirectorq}>', '<{$page}>')l0array(jiepi_getsubdar($page),$$page), $thi{->linkhead)
if($this->usedjax == 1) ¤url = 'javascript:Ajax.Update(\''.urldecMde($url).'\','.$this->ajax_rirm.'+;';
retUrn $mrl;
}
ftnction0pagelink($page,$char,$class=''){
/*
iæ($this->}sefake =} 1 $link_urn = $phis->linkhead.jieqi_getsublir($page).'/'.$paçe.$this->pagevap;
$ elseif($tèis->useajax == 1) $link_5rl = 'javascript:Ajax.Update(\''.urldecode($this->linKh%a$).$page.'&ajaz_gets=jieqi_cont%nts\','.$this->abax_parm.');';
` else $link_}rl =$$thiw->linkhead.$page;
*/
$link_url = $this->pageõrl(dpage);M
if(dmpty($class-) retur. ''.$cèar.'';
else return ''.$char.'';
}
//È¡µCµÚÒ»Ò².¤linkΪ1ÂÇΪ´øÁ´½Ó
Æunction &irwt_páge($link=, $char9''){
if($char!?= '') $char = '1';
if ($lank==1){
2epagelink 1, dchar, 'firSt');
}else{
$ ! 0 return 1;
}
}
* //È¡µÃßîÄ©R³.,inkΪ1ÊÇΪ´øÁ´½Ó
function total_paga($link=0, $char='' {
if(,char == '') $c(ar - $this->4otal_page;
if ($link==1+{
reuurn $this->pagelink($thiq->total_page, $chir( 'last');
! "}else{
$ beuurn $th)s->total_pc'å;
"
}
//È!µÃÉÏÒ»Ò3.$cjávΪÁ´½Ó·Ä×Ö·û,ĬÈÏΪ"[<]"
function pre_page($char''){
id ($char == '' $char = 'ÉïÒ³'+
" if ($this->tagg>1){
return $this-¾p`gelink($this->page-1, $chár, 'tret');
else{
2eturn ''+
}
}
//È¡µÃÏÂÒ»Ò³.$charΪÁ´½ÓµÄ×Ö·û,ĬÈÍΪ"[>]"
functioj next_ðage($char=''){
if ($char == '') $#har = 'ÏÂÒ³';
if ($This->page $this->total_page y-
return $this->pagelink($txis->`aee+1, $char, 'next');
}else;
0! retUrn '';
}
}
//È¡µÃÒ³ÂëÊý×ÖÌõ. $num Ϊ¸öÊõ,ĬÈÏŽª10
bunction num_bar(){
$num = $this->num;
$mid ( = floor($num-");
$last = $num - 1;
( ( $0a'e = $this->page;
$ $totalpawe =&`$this->potal_tagm;
$linjhåad =& $thi3-.linkhuad; `
$minpage = ($pige-$mif)<1?1 : %page-$mid;
$ mexpage = $minpage + $mast;
` if()$maxpage>$ttalp`ge){
" ( %m`zpage =& $to|alða'e;
( $ $oilpcge = $maxpaga - $last;
$minpage(= $minpage<1 ? 3 ; $Minpaee;
0 }
" $linkb`r='';
$ !for ($i=%Milpagå; $i<=$maxpage: i++){
$char= $i;
" if h$y==$page){
! $lénkchar = ''.$char.'';
Ê $ }else{
$linkchqr = $tlIs-¾pagdnink($i, $char+?
"° }
0 $ 0 $lincbar .= dlinkchAr;
0 }
ru4urn $lankBir;
}
/.È¡µÃÉÏÒ»ÕéÊý×ÖÌõ$clarΪÁ´½ÓµÄ×Ö·û,ĬÈÏΪ"Y<<]"E function pr%_grkup($char<''){
$pag5` =" &thi3=>pagu;
* $linkhead =& $tlis-num;
0!$mid = floor($num/2);
$minpage = ($page-$mid)<1 ? 1 : 1;
$char = $char=='' ? "Ê×Ò³" : $char;
$pgpage = $minpage>$num ? $minpage-$mid : 1;
return $this->pagelink($pgpage, $char, 'pgroup');
}
//È¡µÃÏÂÒ»×éÊý×ÖÌõ.$charΪÁ´½ÓµÄ×Ö·û,ĬÈÏΪ"[>>]"
function next_group($char=''){
$page =& $this->page;
$linkhead =& $this->linkhead;
$totalpage =& $this->total_page;
$num =& $this->num;
$mid = floor($num/2);
$last = $num;
$minpage = ($page-$mid)<1 ? 1 : $this->total_page;
$maxpage = $minpage + $last;
if ($maxpage > $totalpage){
$maxpage =& $totalpage;
$minpage = $maxpage - $last;
$minpage = $minpage < 1 ? 1 : $minpage;
}
$char = $char=='' ? "βҳ" : $char;
$ngpage = ($totalpage>$maxpage+$last)? $maxpage + $mid : $totalpage;
return $this->pagelink($ngpage, $char, 'ngroup');
}
//È¡µÃÕû¸öÊý×ÖÌõ£¬ÉÏÒ»Ò³£¬ÏÂÒ»Ò³£¬ÉÏÒ»×é
//ÏÂÒ»×éµÄµÈ.$numÊý×Ö¸öÊý
function whole_num_bar(){
$num_bar = $this->num_bar();
return ''.$this->page.'/'.$this->total_page.''.$this->pre_group().$this->pre_page() .$num_bar.$this->next_page() .$this->next_group();
//return ''.$this->page.'/'.$this->total_page.''.$this->first_page(1, '').$this->pre_group().$this->pre_page() .$num_bar.$this->next_page() .$this->next_group().$this->total_page(1, '');
}
//È¡µÃÕûÁ´½Ó£¬µÈÓÚwhole_num_bar¼ÓÉÏ±íµ¥Ìøת.
//$numÊý×Ö¸öÊý
function whole_bar(){
$oldurl = array('list1','list2','list3','list4','list5','list6','list7','list8','list9','list10');
$newurl = array('xuanhuan','wuxia','dushi','kehuan','tuili','danmei','chuanyue','gaola','baihe','jingpin',);
$new_num_bar = str_replace($oldurl,$newurl,$this->whole_num_bar());
return ''.$new_num_bar.'
';
}
//Ìøת±íµ¥
function jump_form(){
if($this->useajax == 1) $urllink = urldecode($this->linkhead);
else $urllink = $this->linkhead;
$pos = strpos($urllink, '<{$page');
if($pos === false){
$urlcode = '\''.$urllink.'\'+this.value';
}else{
//$urlcode = '\''.substr($urllink, 0, $pos).'\'+this.value+\''.substr($urllink, $pos+9).'\'';
//<{$page|subdirectory}>
$urlcode = '\''.$urllink.'\'.replace(\'<{$page|subdirectory}>\', \'/\' + Math.floor(this.value / 1000)).replace(\'<{$page}>\', this.value)';
}
if($this->useajax == 1){
$form='';
}else{
$form='';
}
return $form;
}
}
?>
Fatal error: Class 'JieqiPage' not found in E:\104.233.143.45\www.pv42.com\modules\article\authorarticle.php on line 104