想修正PHPCMS分页のURL 有好人吗?
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> 関数ページ($num, $curr_page, $perpage = 20, $urlrule = '', $array = array(), $catid = 0) { グローバル $PHPCMS; if($PHPCMS['pagemode'] && $num > $perpage) { $url =load('url.class.php'); $multipage = ''; if($num > $perpage) { $ページ = 11; $オフセット = 4; $pages = ceil($num / $perpage); $from = $curr_page - $offset; $to = $curr_page + $offset; $more = 0; if($ページ >= $ページ) { $from = 2; $to = $ページ-1; } それ以外 { if($from = $pages) { $from = $pages-($page-2); $to = $ページ-1; } $more = 1; } if($urlrule == '') $urlrule = url_par('page={$page}'); $multipage .= '总数:<b>'.$num.'</b> '; if($curr_page>0) { $multipage .= $catid ? '<a href="'.$url->category($catid, $curr_page-1, 1, 1).'">上一页</a>' : '<a href="'.pageurl($urlrule, $curr_page-1, $array).'">上一页</a>'; if($curr_page==1) { $multipage .= '<u><b>1</b></u> '; } elseif($curr_page>6 && $more) { $multipage .= $catid ? '<a href="'.$url->category($catid, 1, 1, 1).'">1</a>..' : '<a href="'.pageurl( $urlrule, 1, $array).'">1</a>..'; } それ以外 { $multipage .= $catid ? '<a href="'.$url->category($catid, 1, 1, 1).'">1</a>' : '<a href="'.pageurl($urlrule, 1, $array).'">1</a> '; } } for($i = $from; $i '; } } $multipage を返します。 } それ以外 { $total = $num; $page = $curr_page; if($num category($catid, 1, 1, 1); $prepage = $url->category($catid, $prepage, 1, 1); $nextpage = $url->category($catid, $nextpage, 1, 1); $lastpage = $url->category($catid, $pages, 1, 1); $urlpre = $url->category($catid, '', 1, 1); } それ以外 { $firstpage = pageurl($urlrule, 1, $array); $prepage = pageurl($urlrule, $prepage, $array); $nextpage = pageurl($urlrule, $nextpage, $array); $lastpage = pageurl($urlrule, $pages, $array); $urlpre = pageurl($urlrule, '', $array); } $data = str_replace('"', '"', $PHPCMS['pageshtml']); eval("$url = "$data";"); $url を返します。 } } <div class="clear"></div>