view pages/visitors.inc.php @ 1001:ffacd904fd1f

Update copyrights.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 15 Jan 2015 10:31:00 +0200
parents 1702a5e0b9c3
children 7e497188e4c6
line wrap: on
line source

<?
//
// FAPWeb - Simple Web-based Demoparty Management System
// Attendee list page
// (C) Copyright 2012-2015 Tecnic Software productions (TNSP)
//
if (stCheckRegistrationAvailable())
  echo stGetSetting("visitorsPageRegLink");

echo
  "\n".
  "<div class=\"visitorInfo\">Total of <b>".$numAttendees.
  "</b> people registered to attend";

if ($maxAttendeesHard > 0)
 echo " (<b>".$maxAttendeesHard."</b> max)";

echo
  ".</div>\n".
  " <table class=\"attendees\">\n".
  "  <tr>\n".
  "   <th class=\"name\">Name</th>\n".
  "   <th class=\"groups\">Group(s)</th>\n".
  "   <th class=\"regtime\">Registered</th>\n".
  "   <th class=\"oneliner\">Oneliner</th>\n".
  "  </tr>\n";

if (($res = stExecSQL("SELECT * FROM attendees ORDER BY regtime DESC")) !== FALSE)
{
  $index = $numAttendees;
  $row = 0;
  foreach ($res as $item)
  {
    // Check hard limit first
    if ($maxAttendeesHard > 0)
      $over = $index > $maxAttendeesHard;
    else
    // Then check soft limit
    if ($maxAttendeesSoft > 0)
      $over = $index > $maxAttendeesSoft;

    stPrintAttendee($item, $row++, TRUE, FALSE, FALSE, $over ? " overbooked" : "");
    $index--;
  }
}

echo " </table>\n";
?>