1) ? $lang_index['registered users'] : $lang_index['registered users']).', '.$stats['totaltopics'].' '.(($stats['totaltopics'] <> 1) ? $lang_index['topics'] : $lang_index['topic']).' '.$lang_index['and'].' '.$stats['totalposts'].' '.(($stats['totalposts'] <> 1) ? $lang_index['posts'] : $lang_index['post']) ?>.
.
query('SELECT user_id, ident, logged FROM '.$db->prefix.'online ORDER BY ident');
if (!$result) {
throw new Exception('Unable to fetch online list: ' . $db->error());
}
while ($cur_user_online = $result->fetch_array(MYSQLI_ASSOC)) {
if ($cur_user_online['user_id'] > 0) {
$users[] = ''.htmlspecialchars($cur_user_online['ident']).'';
} else {
$num_guests++;
}
}
$num_users = count($users);
echo "\t\t\t\t\t\t".' '.$lang_index['Currently serving'].' '.$num_users.' '.(($num_users != 1) ? $lang_index['registered users'] : $lang_index['registered user']).' '.$lang_index['and'].' '.$num_guests.' '.(($num_guests != 1) ? $lang_index['guests'] : $lang_index['guest']).'.';
if ($num_users) {
echo '
'."\n\t\t\t\t\t\t".implode(', ', $users)."\n";
} else {
echo "\n";
}
}
?>
|
|
|