Hi, Khách!
![]() | ![]() ![]() ![]() ![]() |
Đây là mod phân trang Ngoài Trang chủ cho johncms như trang 123...9
Đây
Mở: pages/mainmenu.php tìm
<?php
$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 )) {
?>
Copy code
$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 )) {
?>
Copy code
thêm vào trước
<?php
$tong = mysql_result ( mysql_query ( "SELECT COUNT(*) FROM `forum` WHERE `type` = 't' and kedit='0' AND `close`!='1'" ), 0 );
?>
Copy code
$tong = mysql_result ( mysql_query ( "SELECT COUNT(*) FROM `forum` WHERE `type` = 't' and kedit='0' AND `close`!='1'" ), 0 );
?>
Copy code
tìm tiếp
thay thành
tìm tiếp
thêm vào sau đó
<?php
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>' ;
?>
Copy code
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>' ;
?>
Copy code
Thế là OK, chúc bạn thành công

Trực Tuyến:
Khách: 1