Mercurial > hg > fapweb
annotate pages/visitors.inc.php @ 659:1702a5e0b9c3
Add new settings for certain HTML pieces.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 05 Nov 2014 15:16:56 +0200 |
parents | 987f8307ce4f |
children | ffacd904fd1f |
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()) |
659
1702a5e0b9c3
Add new settings for certain HTML pieces.
Matti Hamalainen <ccr@tnsp.org>
parents:
658
diff
changeset
|
8 echo stGetSetting("visitorsPageRegLink"); |
0 | 9 |
658 | 10 echo |
11 "\n". | |
12 "<div class=\"visitorInfo\">Total of <b>".$numAttendees. | |
13 "</b> people registered to attend"; | |
0 | 14 |
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
|
15 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
|
16 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
|
17 |
658 | 18 echo |
19 ".</div>\n". | |
20 " <table class=\"attendees\">\n". | |
21 " <tr>\n". | |
22 " <th class=\"name\">Name</th>\n". | |
23 " <th class=\"groups\">Group(s)</th>\n". | |
24 " <th class=\"regtime\">Registered</th>\n". | |
25 " <th class=\"oneliner\">Oneliner</th>\n". | |
26 " </tr>\n"; | |
0 | 27 |
28 if (($res = stExecSQL("SELECT * FROM attendees ORDER BY regtime DESC")) !== FALSE) | |
29 { | |
137 | 30 $index = $numAttendees; |
31 $row = 0; | |
0 | 32 foreach ($res as $item) |
33 { | |
213 | 34 // Check hard limit first |
196
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
35 if ($maxAttendeesHard > 0) |
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
36 $over = $index > $maxAttendeesHard; |
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
37 else |
213 | 38 // Then check soft limit |
196
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
39 if ($maxAttendeesSoft > 0) |
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
40 $over = $index > $maxAttendeesSoft; |
ef26d16b836e
Fix maximum attendee / overbooking limit handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
137
diff
changeset
|
41 |
205
77d33161f8be
More work on admin interface.
Matti Hamalainen <ccr@tnsp.org>
parents:
196
diff
changeset
|
42 stPrintAttendee($item, $row++, TRUE, FALSE, FALSE, $over ? " overbooked" : ""); |
0 | 43 $index--; |
44 } | |
45 } | |
658 | 46 |
47 echo " </table>\n"; | |
0 | 48 ?> |