view 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
line wrap: on
line source

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

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";
?>