打开include/html.class.php文件,找到第53行:
$arrchildid = subcat('phpcms',$catid);
前面添加如下代码:
if($page == 0) $page = 1;
打开admin/html.inc.php文件,找到61行至80行:
- if($CATEGORY[$catid]['child'])
- {
- $pages = 1;
- $html->category($catid);
- }
- else
- {
- $offset = $pagesize*($page-1);
- if($page == 1)
- {
- $contents = cache_count("SELECT COUNT(*) AS `count` FROM `".DB_PRE."content` WHERE catid=$catid AND status=99");
- $total = ceil($contents/$PHPCMS['pagesize'])+1;
- $pages = ceil($total/$pagesize);
- }
- $max = min($offset+$pagesize, $total);
- for($i=$offset; $i<$max; $i++)
- {
- $html->category($catid, $i);
- }
- }
- //改为:
- $offset = $pagesize*($page-1);
- if($page == 1)
- {
- $condition=get_sql_catid($catid);
- $contents = cache_count("SELECT COUNT(*) AS `count` FROM `".DB_PRE."content` WHERE status=99 $condition");
- $total = ceil($contents/$PHPCMS['pagesize'])+1;
- $pages = ceil($total/$pagesize);
- }
- $max = min($offset+$pagesize, $total);
- for($i=$offset; $i<$max; $i++)
- { //Vevb.com
- $html->category($catid, $i);
- }
新闻热点
疑难解答