Fixes for mysql 5.0.15 breaking stuff
[specialops2.git] / index.php
blob904265ebc5a5560bedb42a64c271c6595f7aad38
1 <?php
2 // $Id$
4 require 'con.php';
6 $page->title = 'Board List';
7 unset($page->nav['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 case 2:
17 new boardlist_so2; break;
20 $list = $DB->query('SELECT `userid`, `alias` FROM `users`
21 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600 ORDER BY `alias` ASC');
22 $count = $list->num_rows;
24 $onlinestring = ( $count == 1 ?
25 'There is <a href="userlist?show=online">%d user online</a>' :
26 'There are <a href="userlist?show=online">%d users online</a>' );
28 echo
29 '<h2 id="boardlist-stats">Statistics</h2>
30 <h3><a href="stuff">(more)</a></h3>
31 <ul class="content" id="boardlist-foot">
32 <li>',sprintf($onlinestring, $count);
34 if ( $count < 30 && $count > 0 ) {
35 $firstuser = $list->fetch_row();
36 echo ': ',$user->namelink($firstuser[0], $firstuser[1]);
38 while ( $nextuser = $list->fetch_row() )
39 echo ', ',$user->namelink($nextuser[0], $nextuser[1]);
41 else echo '.';
43 echo "</li>\n",
44 '<li>Current Time: ',$user->fdate(time()),"</li>\n",
45 "</ul>\n";
47 $page->pagefooter();