Wapsite đang trong quá trình nâng cấp các bạn hãy chờ đợi nhé. Cảm ơn !
19/10/2015 - 20:36


Share Code Phân Trang Chủ đề Ngoài Trang Chủ Cho Johncms



Giới thiệu đây là mod phân trang chủ đề ngoài index, chăc các bạn hiểu rồi.
Mở: pages/mainmenu.php tìm

$req = mysql_query
( "SELECT * FROM `forum`
WHERE `type` = 't' and
kedit='0' AND `close`!='1'
AND `refid`!='200' ORDER BY
`time` DESC LIMIT $start ,
$kmess " );
while ( $arr =
mysql_fetch_array ( $req )) {

thêm vào trước

$tong = mysql_result
( mysql_query ( "SELECT
COUNT(*) FROM `forum`
WHERE `type` = 't' and
kedit='0' AND `close`!='1'" ),
0 );

tìm tiếp

ORDER BY ` time ` DESC LIMIT
10 ");

thay thành

ORDER BY ` time ` DESC LIMIT
$start , $kmess ");

tìm tiếp

echo '</div>' ;
$i ;
}

thêm vào sau đó

if ( $tong > $kmess ){echo
'<div class="menu">' .
functions ::
display_pagination
( 'index.php?' , $start ,
$tong , $kmess ) . '</div>' ;}
echo '<p><form
action="index.php?id=' .
$id . '" method="post">' .
'<input type="text"
name="page"size="2"/>' .
'<input type="submit"
value="' . $lng [ 'to_page' ] . '
>>"/>' .
'</form></p>' ;


Facebook Google Plus Twitter
Chuyển Qua GD Mobile
C-STAT
XtGem Forum catalog