6 switch ( $_SERVER['QUERY_STRING'] ) {
8 $page->title
= 'Online Users';
9 $where = 'WHERE `last_active_date` > UNIX_TIMESTAMP() - 600';
12 $page->title
= 'User List';
20 <col
/><col
/><col
/><col
/>
31 $q = $DB->query('SELECT `users`.`userid`, `alias`, `points`, `last_active_date`, COUNT(`messageid`) AS `msgs`
33 NATURAL LEFT JOIN `messages`
35 GROUP BY `userid` ASC');
37 $a = 1; // CSS class on alternating rows
39 while ( $row = $q->fetch_assoc() ) {
40 // This looks much nicer when rendered. Really.
41 printf("<tr class=\"content c%d\">\n\t<td>%s</td>\n\t<td>%d</td>\n\t<td>%d</td>\n\t<td>%s</td>\n</tr>\n",
43 $user->namelink($row['userid'], $row['alias']),
46 $row['userid'] == $user->userid ?
$user->fdate(time()).' (Now)' : $user->fdate($row['last_active_date'])