Too many changes to all list here, biggest ones:
[specialops2.git] / index.php
blob1063af9f37939b4c637454be15425bae66ba5c0c
1 <?php
2 // $Id$
4 $prefetch = array('`boardlist_layout`');
5 require 'con.php';
7 $page->title = 'Board List';
8 unset($page->nav['Board List']);
10 $user->userheader();
12 switch ( $user->boardlist_layout ) {
13 case 0:
14 new boardlist_default; break;
15 case 1:
16 new boardlist_so1; break;
19 $list = $DB->query('SELECT `userid`, `alias` FROM `users`
20 WHERE `last_active_date` > UNIX_TIMESTAMP() - 600 ORDER BY `alias` ASC');
21 $count = $list->num_rows;
23 $onlinestring = ( $count == 1 ?
24 'There is <a href="userlist?show=online">%d user online</a>' :
25 'There are <a href="userlist?show=online">%d users online</a>' );
27 echo
28 '<h2 id="boardlist-stats">Statistics</h2>
29 <h3><a href="stuff">(more)</a></h3>
30 <ul class="content" id="boardlist-foot">
31 <li>',sprintf($onlinestring, $count);
33 if ( $count < 30 && $count > 0 ) {
34 $firstuser = $list->fetch_row();
35 echo ': ',$user->namelink($firstuser[0], $firstuser[1]);
37 while ( $nextuser = $list->fetch_row() )
38 echo ', ',$user->namelink($nextuser[0], $nextuser[1]);
40 else echo '.';
42 echo "</li>\n",
43 '<li>Current Time: ',$user->fdate(time()),"</li>\n",
44 "</ul>\n";
46 $page->pagefooter();