MichelSwiss
Hi Sammie :-)

Please forget about line numbers... I have edited so many thing in the script and added so many mods...

In the file viewFriends.php, function getFriendList( $id )

after:

$id = (int)$id;

I added:

/***** pagination ****/
$sCountSQL = "SELECT count(*) FROM `FriendList`
LEFT JOIN `Profiles` ON (`Profiles`.`ID` = `FriendList`.`Profile` AND `FriendList`.`ID` = '$id' OR `Profiles`.`ID` = `FriendList`.`ID` AND `FriendList`.`Profile` = '$id')
WHERE see more (`FriendList`.`Profile` = '$id' OR `FriendList`.`ID` = '$id') AND `FriendList`.`Check` = '1' ";

$iTotalNum = db_value( $sCountSQL );
if( !$iTotalNum ) {
return MsgBox(_t( '_Sorry, nothing found' ));
}

$iPerPage = (int)$_GET['per_page'];
if( !$iPerPage )
$iPerPage = 21;

$iTotalPages = ceil( $iTotalNum / $iPerPage );

$iCurPage = (int)$_GET['page'];

if( $iCurPage > $iTotalPages )
$iCurPage = $iTotalPages;

if( $iCurPage < 1 )
$iCurPage = 1;

$sLimitFrom = ( $iCurPage - 1 ) * $iPerPage;
$sqlLimit = "LIMIT {$sLimitFrom}, {$iPerPage}";

/***** pagination ****/

Hope that will help you ;-)
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.056311845779419