Liste les derniers membres inscrits sur un site geeklog. Sélectionner le nombre de membres à afficher en modifiant la variable $numToShow.
function phpblock_whos_new ()
{
global $_CONF,$_TABLES;
// Set the number of new members to show
$numToShow = 5;
$result = DB_query("SELECT uid,username,photo FROM {$_TABLES['users']} WHERE status <> 0 ORDER BY regdate DESC limit $numToShow");
$nrows = DB_numRows($result);
for ($i = 1; $i <= $nrows; $i++) {
$A = DB_fetchArray($result);
$retval .= '<a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '">' . $A['username'] .
'</a>';
if (!empty($A['photo']) AND $_CONF['allow_user_photo'] == 1) {
$retval .= ' <a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '"><img src="
' . $_CONF['layout_url'] . '/images/smallcamera.gif" border="0"></a>';
}
$retval .= '<br>';
}
return $retval;
}