Mercurial > hg > fapweb
annotate pages/visitors.inc.php @ 658:987f8307ce4f
Cleanups, cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 05 Nov 2014 15:16:22 +0200 |
parents | ae89d6433d97 |
children | 1702a5e0b9c3 |
rev | line source |
---|---|
0 | 1 <? |
136
aeebfedb5709
Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
103
diff
changeset
|
2 // |
571
ce11ea112a65
Change the header blurb a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
565
diff
changeset
|
3 // FAPWeb - Simple Web-based Demoparty Management System |
136
aeebfedb5709
Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
103
diff
changeset
|
4 // Attendee list page |
565 | 5 // (C) Copyright 2012-2014 Tecnic Software productions (TNSP) |
136
aeebfedb5709
Add some copyright headers.
Matti Hamalainen <ccr@tnsp.org>
parents:
103
diff
changeset
|
6 // |
103
c6b9041078ec
Add hard limit option for attendees, and add feature of using "0" to disable
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
7 if (stCheckRegistrationAvailable()) |
0 | 8 { |
9 ?> | |
10 <div class="reglink"> | |
11 To register, use <a href="register">this form</a>. | |
12 </div> | |
13 <? | |
14 } | |
15 | |
658 | 16 echo |
17 "\n". | |
18 "<div class=\"visitorInfo\">Total of <b>".$numAttendees. | |
19 "</b> people registered to attend"; | |
0 | 20 |
103
c6b9041078ec
Add hard limit option for attendees, and add feature of using "0" to disable
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
21 if ($maxAttendeesHard > 0) |
c6b9041078ec
Add hard limit option for attendees, and add feature of using "0" to disable
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
22 echo " (<b>".$maxAttendeesHard."</b> max)"; |
c6b9041078ec
Add hard limit option for attendees, and add feature of using "0" to disable
Matti Hamalainen <ccr@tnsp.org>
parents:
5
diff
changeset
|
23 |
658 | 24 echo |
25 ".</div>\n". | |
26 " <table class=\"attendees\">\n". | |
27 " <tr>\n". | |
28 " <th class=\"name\">Name</th>\n". | |
29 " <th class=\"groups\">Group(s)</th>\n". | |
30 " <th class=\"regtime\">Registered</th>\n". | |
31 " <th class=\"oneliner\">Oneliner</th>\n". | |
32 " </tr>\n"; | |
0 | 33 |
34 if (($res = stExecSQL("SELECT * FROM attendees ORDER BY regtime DESC")) !== FALSE) | |
35 { | |
137 | 36 $index = $numAttendees; |
37 $row = 0; | |
0 | 38 foreach ($res as $item) |
39 { | |
213 | 40 // Check hard limit first |
196
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
41 if ($maxAttendeesHard > 0) |
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
42 $over = $index > $maxAttendeesHard; |
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
43 else |
213 | 44 // Then check soft limit |
196
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
45 if ($maxAttendeesSoft > 0) |
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
46 $over = $index > $maxAttendeesSoft; |
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
47 |
205
77d33161f8be
More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
196
diff
changeset
|
48 stPrintAttendee($item, $row++, TRUE, FALSE, FALSE, $over ? " overbooked" : ""); |
0 | 49 $index--; |
50 } | |
51 } | |
658 | 52 |
53 echo " </table>\n"; | |
0 | 54 ?> |