Apparently not.
[specialops2.git] / index.php
blobf5a8bef37002cc46bfdd390936d997a9fdd7510f
1 <?php
2 /**
3 * Board List
5 * @author Anthony Parsons (xmpp:ant@specialops.ath.cx)
6 * @license file://COPYING
7 * @version $Id$
8 */
10 $prefetch = array('`boardlist_layout`');
11 require 'conf.php';
13 $user->userheader();
16 $onlinelist = $DB->query('SELECT `userid`, `alias` FROM `users` FORCE INDEX(`last_active_date`)
17 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600
18 ORDER BY `last_active_date` ASC LIMIT 30');
19 $onlineusers = $user->fillnamecache($onlinelist);
22 switch ( $user->boardlist_layout ) {
23 case boardlist_default::ID:
24 new boardlist_default; break;
25 case boardlist_so1::ID:
26 new boardlist_so1;
30 if ( 30 === $onlinelist->num_rows )
31 list($count) = $DB->query('SELECT COUNT(*) FROM `users`
32 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600')->fetch_row();
33 else
34 $count = $onlinelist->num_rows;
36 $onlines = ( 1 === $count ?
37 'There is <a href="userlist?online">one user online</a>: ' :
38 'There are <a href="userlist?online">%d users online</a>: ' );
41 <h2 id="boardlist-stats">Statistics</h2>
42 <p><?php printf($onlines, $count);
44 if ( 0 < $count ) {
45 echo implode(', ', $onlineusers);
48 echo '</p>
49 <p>Current Time: ',$user->fdate(time()),'</p>
50 <p><a href="stuff">More stats</a></p>';
52 $page->pagefooter();