/tamplate/default/news_category.html.php 34行 这个是view
<!--{if $_SBLOCK[newlist_multipage]}--> $_SBLOCK[newlist_multipage] <!--{/if}-->
/function/block.func.php 195行从 //multi 开始查询count(*),得到分页参数,再调用分页函数
//multi $listcount = 1; if(!empty($paramarr[‘perpage‘])) { $listcount = $_SGLOBAL[‘db‘]->result($_SGLOBAL[‘db‘]->query(‘SELECT COUNT(*) FROM ‘.tname(‘spaceitems‘).‘ i ‘.$sql[‘where‘]), 0); if($listcount) { $urlarr = $_SGET; unset($urlarr[‘page‘]); $theblockarr[‘multipage‘] = multi($listcount, $paramarr[‘perpage‘], $_SGET[‘page‘], $urlarr, 0); } }
$paramarr[‘perpage‘] 每页多少记录 ; $listcount 总记录数
/function/common.func.php 1717行 multi函数 返回带样式的html分页
//生成分页URL地址集合 function multi($num, $perpage, $curpage, $mpurl, $phpurl=1) { global $_SHTML, $lang, $_SGLOBAL; if(($curpage-1)*$perpage > $num) showmessage(‘start_listcount_error‘); $maxpages = $_SGLOBAL[‘maxpages‘]; $multipage = $a_name = ‘‘; ...... ...... $multipage .= ($to < $pages && $curpage < $maxpages ? ‘<a href="‘.$url2.‘" target="_self">...‘.$realpages.‘</a>‘ : ‘‘). ($curpage < $pages ? ‘<a class="next" href="‘.$url.‘">‘.$lang[‘next_page‘].‘</a>‘ : ‘‘). ($pages > $page ? ‘‘ : ‘‘); $multipage .= ‘</div></div>‘; } return $multipage; }
需要改样式就从这里动
时间: 2024-10-05 17:53:54