Mercurial > hg > fapweb
comparison attendees.inc.php @ 0:8019b357cc03
Initial import.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 04 Dec 2012 19:07:18 +0200 |
parents | |
children | 76c3b89d7b11 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:8019b357cc03 |
---|---|
1 <? | |
2 if (stChkSetting("allowRegister")) | |
3 { | |
4 ?> | |
5 <div class="reglink"> | |
6 To register, use <a href="register">this form</a>. | |
7 </div> | |
8 <? | |
9 } | |
10 | |
11 //echo "<h1>Current attendees</h1>\n"; | |
12 $maxAttendees = stGetSetting("maxAttendees", 20); | |
13 $numAttendees = 0; | |
14 if (($res = $db->query("SELECT COUNT(*) FROM attendees")) !== FALSE) | |
15 $numAttendees = $res->fetchColumn(); | |
16 | |
17 echo "<p>Total of <b>".$numAttendees. | |
18 "</b> people registered to attend (<b>". | |
19 $maxAttendees."</b> max).</p>\n"; | |
20 | |
21 ?> | |
22 <table class="attendees"> | |
23 <tr> | |
24 <th class="name">Name</th> | |
25 <th class="groups">Group(s)</th> | |
26 <th class="regtime">Registered</th> | |
27 <th class="oneliner">Oneliner</th> | |
28 </tr> | |
29 <? | |
30 $index = $numAttendees; | |
31 $row = 0; | |
32 if (($res = stExecSQL("SELECT * FROM attendees ORDER BY regtime DESC")) !== FALSE) | |
33 { | |
34 foreach ($res as $item) | |
35 { | |
36 stPrintAttendee($item, $row++, FALSE, ($index > $maxAttendees) ? " overbooked" : ""); | |
37 $index--; | |
38 } | |
39 } | |
40 ?> | |
41 </table> |