1
bennie
how can i put navigation to the page?
  • 2004/4/8 8:31

  • bennie

  • Just popping in

  • Posts: 40

  • Since: 2003/7/3 1


Hey all,

i'm trying to modify a page i got from the brazilianpack, i try to make a sort of usergroup overview. the thing is, when i've got more than 10 users in a group i would like to show only 10 on the first page and than link to the next 10. in the same way the XOOPS modules (forum and news) work. can any body help me?

here is the code:

// by Fernando Santos (topet05) 11/02/2004

function ExibeGrupos ($groupName,$number)
{
global $xoopsUser;
$connect =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();
$result = $connect->query("SELECT u.uid, u.uname, u.email, u.user_viewemail, u.user_avatar, u.user_occ,
g.name AS groupname FROM ".$connect->prefix("groups_users_link")." l LEFT JOIN "
.$connect->prefix("users")." u ON l.uid=u.uid LEFT JOIN ".$connect->prefix("groups").
" g ON l.groupid=g.groupid WHERE g.name='".$groupName."' ORDER BY uname limit ".$number."");

if ($connect->getRowsNum($result) > 0) {
echo '

';
echo '';
$user_group = 0;
while ($user_profile = $connect->fetchArray($result)) {
if ($user_group == 0){
echo'';
$user_group = 1;
}
if ($xoopsUser != '') {
echo'';
}else{
//if annonimous user
if ($user_profile['user_viewemail']) {
echo'';

}else{
echo'';
// end if annonimous user
}
}
}
echo'
'.$myts->htmlSpecialChars($user_profile['groupname']).'

'.$myts->htmlspecialchars($user_profile['uname']).'
'.$myts->htmlSpecialChars($user_profile['user_occ']).'

'.$myts->htmlspecialchars($user_profile['uname']).'
'.$myts->htmlSpecialChars($user_profile['user_occ']).'E-mail deze gebruiker


'.$myts->htmlspecialchars($user_profile['uname']).'
'.$myts->htmlSpecialChars($user_profile['user_occ']).'Helaas Kunt u met deze gebruiker geen contact opnemen!
';

}else{
echo 'O grupo selecionado não existe ou não contém nenhum membro.';
}
}

?>

You can see the code working at
HDCF

help wil be much apreciated,

thanks Ben

Login

Who's Online

350 user(s) are online (208 user(s) are browsing Support Forums)


Members: 0


Guests: 350


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits