Reduced the gfh2 background image contrast a bit since it was hard to read text with it.
[specialops2.git] / index.php
blob9f66786d344732d85c0d2cccbbe375becfe18489
1 <?php
2 // $Id$
4 $prefetch = array('`boardlist_layout`');
5 require 'con.php';
7 $user->userheader();
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:
20 new boardlist_so1;
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();
27 else
28 $count = $onlinelist->num_rows;
30 $onlinestring = ( $count === 1 ?
31 'There is <a href="userlist?online">one user online</a>: ' :
32 'There are <a href="userlist?online">%d users online</a>: ' );
35 <h2 id="boardlist-stats">Statistics</h2>
36 <p><?php printf($onlinestring, $count);
38 if ( $count > 0 )
39 echo implode(', ', $onlineusers);
41 echo '</p>
42 <p>Current Time: ',$user->fdate(time()),'</p>
43 <p><a href="stuff">More stats</a></p>';
45 $page->pagefooter();