that bait file wasn't really effective.
[specialops2.git] / index.php
blob834b58acfb8fbc4bc0d8d69c54e406d35d7ed5f2
1 <?php
2 // $Id$
4 $prefetch = array('`boardlist_layout`');
5 require 'con.php';
7 $page->title = 'Board List';
9 $user->userheader();
11 switch ( $user->boardlist_layout ) {
12 case 0:
13 new boardlist_default; break;
14 case 1:
15 new boardlist_so1; break;
16 default:
17 throw new OutOfBoundsException('user->boardlist_layout is out of valid range');
20 $list = $DB->query('SELECT `userid`, `alias` FROM `users`
21 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600
22 ORDER BY `last_active_date` ASC LIMIT 30');
24 if ( 30 == $list->num_rows )
25 list($count) = $DB->query('SELECT COUNT(*) FROM `users`
26 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600')->fetch_row();
27 else
28 $count = $list->num_rows;
31 $onlinestring = ( $count == 1 ?
32 'There is <a href="userlist?online">%d user online</a>: ' :
33 'There are <a href="userlist?online">%d users online</a>: ' );
36 <h2 id="boardlist-stats">Statistics <small><a href="stuff">(more)</a></small></h2>
37 <ul class="content" id="boardlist-foot">
38 <li><?php printf($onlinestring, $count);
40 if ( $count > 0 ) {
41 $list = $user->fillnamecache($list);
42 echo implode(', ', $list);
45 echo
46 '</li>
47 <li>Current Time: ',$user->fdate(time()),'</li>
48 </ul>',"\n";
50 $page->pagefooter();