5 * @author Anthony Parsons (xmpp:ant@specialops.ath.cx)
6 * @license file://COPYING
10 $prefetch = array('`boardlist_layout`');
15 $onlinelist = $DB->query('SELECT `userid`, `alias` FROM `users` FORCE INDEX(`last_active_date`)
16 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600
17 ORDER BY `last_active_date` ASC LIMIT 30');
18 $onlineusers = $user->fillnamecache($onlinelist);
20 switch ( $user->boardlist_layout
) {
21 case Boardlist_Default
::ID
:
22 $bl = new Boardlist_Default
; break;
23 case Boardlist_SO1
::ID
:
24 $bl = new Boardlist_SO1
;
27 echo '<div id="boardlist" class="',get_class($bl),"\">\n";
31 if ( 30 === $onlinelist->num_rows
)
32 list($count) = $DB->query('SELECT COUNT(*) FROM `users`
33 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600')->fetch_row();
35 $count = $onlinelist->num_rows
;
37 $onlines = ( 1 === $count ?
38 'There is <a href="userlist?online">one user online</a>' :
39 'There are <a href="userlist?online">%d users online</a>' );
42 <div id
="boardlist-stats">
44 <p
><?php
printf($onlines, $count);
45 echo ( 0 < $count ) ?
': '.implode(', ', $onlineusers) : '.';
47 <p
><a href
="stuff">Stats Page
</a
></p
>
48 <p
>Page load time
: <?php
echo $user->fdate(time()) ?
></p
>