annotate pages/visitors.inc.php @ 1096:bbc0a3d0b51e

Major renaming / refactor of site messages. Some that were previously modifiable from admin interface are now "hardcoded" in the configuration file. Having these settings made modifiable from there made no sense and just took space in the UI.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 27 Jan 2017 22:15:06 +0200
parents 7e497188e4c6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1075
7e497188e4c6 Use long tags.
Matti Hamalainen <ccr@tnsp.org>
parents: 1001
diff changeset
1 <?php
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
1001
ffacd904fd1f Update copyrights.
Matti Hamalainen <ccr@tnsp.org>
parents: 659
diff changeset
5 // (C) Copyright 2012-2015 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())
1096
bbc0a3d0b51e Major renaming / refactor of site messages. Some that were previously
Matti Hamalainen <ccr@tnsp.org>
parents: 1075
diff changeset
8 echo stGetSetting("msgVisitorsPageRegLink");
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9
658
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
10 echo
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
11 "\n".
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
12 "<div class=\"visitorInfo\">Total of <b>".$numAttendees.
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
13 "</b> people registered to attend";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
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
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
18 echo
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
19 ".</div>\n".
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
20 " <table class=\"attendees\">\n".
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
21 " <tr>\n".
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
22 " <th class=\"name\">Name</th>\n".
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
23 " <th class=\"groups\">Group(s)</th>\n".
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
24 " <th class=\"regtime\">Registered</th>\n".
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
25 " <th class=\"oneliner\">Oneliner</th>\n".
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
26 " </tr>\n";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 if (($res = stExecSQL("SELECT * FROM attendees ORDER BY regtime DESC")) !== FALSE)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 {
137
57de66a604c5 Cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
30 $index = $numAttendees;
57de66a604c5 Cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 136
diff changeset
31 $row = 0;
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 foreach ($res as $item)
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 {
213
682a926fd6fb Add some comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 205
diff changeset
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
682a926fd6fb Add some comments.
Matti Hamalainen <ccr@tnsp.org>
parents: 205
diff changeset
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
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 $index--;
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 }
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 }
658
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
46
987f8307ce4f Cleanups, cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 589
diff changeset
47 echo " </table>\n";
0
8019b357cc03 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 ?>