diff --git a/src/system/archive/archives.class.php b/src/system/archive/archives.class.php index 7a92d4d1..9754679f 100755 --- a/src/system/archive/archives.class.php +++ b/src/system/archive/archives.class.php @@ -761,12 +761,12 @@ class Archives $revalue = ''; foreach ($this->SplitTitles as $k => $v) { if ($i == 1) { - $revalue .= "$v"; + $revalue .= "{$v}"; } else { if ($PageNo == $i) { $revalue .= "$v"; } else { - $revalue .= "$v"; + $revalue .= "{$v}"; } } $i++; @@ -775,12 +775,12 @@ class Archives $revalue = ""; for ($fl = 1; $fl <= $totalpage; $fl++) { if ($fl == $this->PageNo) { - $optionlist .= ""; + $optionlist .= ""; } else { - $optionlist .= ""; + $optionlist .= ""; } } $optionlist .= ""; @@ -688,33 +688,19 @@ class FreeList } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; - if (preg_match('#info#i', $listitem)) { - $plist .= $maininfo.' '; - } - if (preg_match('#index#i', $listitem)) { - $plist .= $indexpage.' '; - } - if (preg_match('#pre#i', $listitem)) { - $plist .= $prepage.' '; - } - if (preg_match('#pageno#i', $listitem)) { - $plist .= $listdd.' '; - } - if (preg_match('#next#i', $listitem)) { - $plist .= $nextpage.' '; - } - if (preg_match('#end#i', $listitem)) { - $plist .= $endpage.' '; - } - if (preg_match('#option#i', $listitem)) { - $plist .= $optionlist; - } + if (preg_match('/index/i', $listitem)) $plist .= $indexpage; + if (preg_match('/pre/i', $listitem)) $plist .= $prepage; + if (preg_match('/pageno/i', $listitem)) $plist .= $listdd; + if (preg_match('/next/i', $listitem)) $plist .= $nextpage; + if (preg_match('/end/i', $listitem)) $plist .= $endpage; + if (preg_match('/option/i', $listitem)) $plist .= $optionlist; + if (preg_match('/info/i', $listitem)) $plist .= $maininfo; return $plist; } /** @@ -736,27 +722,32 @@ class FreeList } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $purl = $this->GetCurUrl(); - $geturl = "lid=".$this->FreeID."&TotalResult=".$this->TotalResult."&"; - $hidenform = ""; - $hidenform .= ""; - $purl .= "?".$geturl; + //开启伪静态对规则替换 + if ($cfg_rewrite == 'Y') { + $purl = str_replace("/apps", "", $purl); + $nowurls = preg_replace("/", ".php?", $purl); + $nowurls = explode("?", $nowurls); + $purl = $nowurls[0]; + } + $geturl = "tid={$this->TypeID}&TotalResult={$this->TotalResult}&"; + $purl .= '?'.$geturl; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页"; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页"; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -773,18 +764,25 @@ class FreeList } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } - $plist = "
    $hidenform"; - $plist .= $maininfo.$indexpage.$prepage.$listdd.$nextpage.$endpage; - if ($totalpage > $total_list) { - $plist .= ""; - $plist .= ""; + $plist = ''; + if (preg_match('/index/i', $listitem)) $plist .= $indexpage; + if (preg_match('/pre/i', $listitem)) $plist .= $prepage; + if (preg_match('/pageno/i', $listitem)) $plist .= $listdd; + if (preg_match('/next/i', $listitem)) $plist .= $nextpage; + if (preg_match('/end/i', $listitem)) $plist .= $endpage; + if (preg_match('/option/i', $listitem)) $plist .= $optionlist; + if (preg_match('/info/i', $listitem)) $plist .= $maininfo; + //伪静态栏目分页 + if ($cfg_rewrite == 'Y') { + $plist = str_replace("?tid=", "", $plist); + $plist = preg_replace("/&pageno=(\d+)/i", "-\\1", $plist); + $plist = preg_replace("/&TotalResult=(\d+)/i", "", $plist);//去掉分页数值 } - $plist .= "
    "; return $plist; } /** diff --git a/src/system/archive/listview.class.php b/src/system/archive/listview.class.php index 22f88137..2b1adf90 100755 --- a/src/system/archive/listview.class.php +++ b/src/system/archive/listview.class.php @@ -986,13 +986,13 @@ class ListView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); //获得上页和首页的链接 @@ -1018,9 +1018,9 @@ class ListView $optionlist = "
  • "; @@ -1041,9 +1041,9 @@ class ListView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; @@ -1075,12 +1075,12 @@ class ListView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $purl = $this->GetCurUrl(); //开启伪静态对规则替换 if ($cfg_rewrite == 'Y') { @@ -1089,19 +1089,19 @@ class ListView $nowurls = explode("?", $nowurls); $purl = $nowurls[0]; } - $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; + $geturl = "tid={$this->TypeID}&TotalResult={$this->TotalResult}&"; $purl .= '?'.$geturl; $optionlist = ''; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -1122,9 +1122,9 @@ class ListView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; diff --git a/src/system/archive/searchview.class.php b/src/system/archive/searchview.class.php index 51be3876..44c0c4e6 100755 --- a/src/system/archive/searchview.class.php +++ b/src/system/archive/searchview.class.php @@ -635,10 +635,10 @@ class SearchView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); $oldkeyword = (empty($oldkeyword) ? $this->Keyword : $oldkeyword); @@ -646,7 +646,7 @@ class SearchView if ($this->TotalResult > $this->SearchMaxRc) { $totalpage = ceil($this->SearchMaxRc / $this->pagesize); } - $infos = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $infos = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $geturl = ""; //$geturl = "keyword=".urlencode($oldkeyword)."&searchtype=".$this->SearchType; //$geturl .= "&channeltype=".$this->ChannelType."&orderby=".$this->OrderBy; @@ -655,14 +655,14 @@ class SearchView $purl .= "?".$geturl; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -683,18 +683,18 @@ class SearchView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; - $plist .= preg_match('/info/i', $listitem)? $infos : ""; - $plist .= preg_match('/index/i', $listitem)? $indexpage : ""; - $plist .= preg_match('/pre/i', $listitem)? $prepage : ""; - $plist .= preg_match('/pageno/i', $listitem)? $listdd : ""; - $plist .= preg_match('/next/i', $listitem)? $nextpage : ""; - $plist .= preg_match('/end/i', $listitem)? $endpage : ""; + $plist .= preg_match('/info/i', $listitem) ? $infos : ""; + $plist .= preg_match('/index/i', $listitem) ? $indexpage : ""; + $plist .= preg_match('/pre/i', $listitem) ? $prepage : ""; + $plist .= preg_match('/pageno/i', $listitem) ? $listdd : ""; + $plist .= preg_match('/next/i', $listitem) ? $nextpage : ""; + $plist .= preg_match('/end/i', $listitem) ? $endpage : ""; return $plist; } /** diff --git a/src/system/archive/sglistview.class.php b/src/system/archive/sglistview.class.php index bf4b1030..4376bb0e 100755 --- a/src/system/archive/sglistview.class.php +++ b/src/system/archive/sglistview.class.php @@ -880,13 +880,13 @@ class SgListView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); //获得上页和首页的链接 @@ -922,9 +922,9 @@ class SgListView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; @@ -958,12 +958,12 @@ class SgListView $list_len = 3; } $totalpage = ceil($this->TotalResult / $this->pagesize); - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); //开启伪静态对规则替换 @@ -973,19 +973,19 @@ class SgListView $nowurls = explode("?", $nowurls); $purl = $nowurls[0]; } - $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; + $geturl = "tid={$this->TypeID}&TotalResult={$this->TotalResult}&"; $purl .= '?'.$geturl; $optionlist = ''; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -1006,9 +1006,9 @@ class SgListView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = ''; diff --git a/src/system/archive/specview.class.php b/src/system/archive/specview.class.php index 847f402e..9d2da810 100755 --- a/src/system/archive/specview.class.php +++ b/src/system/archive/specview.class.php @@ -437,23 +437,23 @@ class SpecView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); $tnamerule = "spec_"; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -474,9 +474,9 @@ class SpecView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; @@ -501,26 +501,26 @@ class SpecView } $totalpage = ceil($this->TotalResult / $this->pagesize); if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } $purl = $this->GetCurUrl(); $geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; - $hidenform = ""; - $hidenform .= ""; + //$hidenform = ""; + //$hidenform .= ""; $purl .= "?".$geturl; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -541,9 +541,9 @@ class SpecView } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; diff --git a/src/system/archive/taglist.class.php b/src/system/archive/taglist.class.php index ff06cfc3..f3d4a248 100755 --- a/src/system/archive/taglist.class.php +++ b/src/system/archive/taglist.class.php @@ -411,23 +411,23 @@ class TagList } $totalpage = $this->TotalPage; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $purl = $this->tagsDir.'/'.$this->TagInfos['id']; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -540,26 +540,26 @@ class TagList } $totalpage = $this->TotalPage; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "
  • 1页".$this->TotalResult."条
  • "; + return "
  • 1页{$this->TotalResult}条
  • "; } if ($this->TotalResult == 0) { - return "
  • 0页".$this->TotalResult."条
  • "; + return "
  • 0页{$this->TotalResult}条
  • "; } - $maininfo = "
  • {$totalpage}页".$this->TotalResult."条
  • "; + $maininfo = "
  • {$totalpage}页{$this->TotalResult}条
  • "; $purl = $this->GetCurUrl(); //开启伪静态对规则替换 if ($cfg_rewrite == 'Y') $purl = "/tags/"; $purl .= "?/".urlencode($this->Tag); //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { $endpage = "
  • 末页
  • "; } @@ -580,9 +580,9 @@ class TagList } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • {$j}
  • "; } } $plist = '';