• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

想修改PHPCMS分页的URL 有好人吗?该怎么解决

php 搞代码 3年前 (2022-01-25) 14次浏览 已收录 0个评论

想修改PHPCMS分页的URL 有好人吗?

PHP code

<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->function pages($num, $curr_page, $perpage = 20, $urlrule = '', $array = array(), $catid = 0){    global $PHPCMS;    if($PHPCMS['pagemode'] && $num > $perpage)    {        $url = load('url.class.php');        $multipage = '';        if($num > $perpage)        {            $page = 11;            $offset = 4;            $pages = ceil($num / $perpage);            $from = $curr_page - $offset;            $to = $curr_page + $offset;            $more = 0;            if($page >= $pages)            {                $from = 2;                $to = $pages-1;            }            else            {                if($from = $pages)                {                    $from = $pages-($page-2);                    $to = $pages-1;                }                $more = 1;            }            if($urlrule == '') $urlrule = url_par('page={$page}');            $multipage .= '总数:<b>'.$num.'</b>  ';            if($curr_page>0)            {                $multipage .= $catid ? 'category($catid, $curr_page-1, 1, 1).'">上一页' : '上一页';                                if($cur<strong>)本文来(源gaodai#ma#com搞@@代~&码*网2</strong><pre>搞代gaodaima码

r_page==1) { $multipage .= ‘1 ‘; } elseif($curr_page>6 && $more) { $multipage .= $catid ? ‘category($catid, 1, 1, 1).'”>1..’ : ‘1..’; } else { $multipage .= $catid ? ‘category($catid, 1, 1, 1).'”>1’ : ‘1 ‘; } } for($i = $from; $i ‘.$i.’ ‘ : ”.$i.’ ‘; } else { $multipage .= ‘ ‘.$i.’ ‘; } } if($curr_page<$pages) { if($curr_page’.$pages.’ category($catid, $curr_page+1, 1).'”>下一页’ : ‘..’.$pages.’ 下一页’; } else { $multipage .= $catid ? ‘category($catid, $pages, 1, 1).'”>’.$pages.’ category($catid, $curr_page+1, 1, 1).'”>下一页’ : ”.$pages.’ 下一页’; } } elseif($curr_page==$pages) { $multipage .= ‘ ‘.$pages.’下一页’; } } return $multipage; } else { $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); } else { $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\”;”); return $url; }}


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:想修改PHPCMS分页的URL 有好人吗?该怎么解决
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址