4 $prefetch = array('`boardlist_layout`');
10 $onlinelist = $DB->query('SELECT `userid`, `alias` FROM `users` FORCE INDEX(`last_active_date`)
11 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600
12 ORDER BY `last_active_date` ASC LIMIT 30');
13 $onlineusers = $user->fillnamecache($onlinelist);
16 switch ( $user->boardlist_layout
) {
17 case boardlist_default
::ID
:
18 new boardlist_default
; break;
19 case boardlist_so1
::ID
:
24 if ( 30 === $onlinelist->num_rows
)
25 list($count) = $DB->query('SELECT COUNT(*) FROM `users`
26 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600')->fetch_row();
28 $count = $onlinelist->num_rows
;
30 $onlines = ( 1 === $count ?
31 'There is <a href="userlist?online">one user active</a>: ' :
32 'There are <a href="userlist?online">%d users active</a>: ' );
35 <h2 id
="boardlist-stats">Statistics
</h2
>
36 <p
><?php
printf($onlines, $count);
39 echo implode(', ', $onlineusers);
43 <p>Current Time: ',$user->fdate(time()),'</p>
44 <p><a href="stuff">More stats</a></p>';