view attendees.inc.php @ 73:c70c2650f790

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 17 Oct 2013 15:01:48 +0300
parents 76c3b89d7b11
children c6b9041078ec
line wrap: on
line source

<?
if (stChkSetting("allowRegister"))
{
?>
<div class="reglink">
To register, use <a href="register">this form</a>.
</div>
<?
}

//echo "<h1>Current attendees</h1>\n";
$maxAttendees = stGetSetting("maxAttendees");
$numAttendees = 0;
if (($res = $db->query("SELECT COUNT(*) FROM attendees")) !== FALSE)
  $numAttendees = $res->fetchColumn();

echo "<p>Total of <b>".$numAttendees.
 "</b> people registered to attend (<b>".
 $maxAttendees."</b> max).</p>\n";

?>
<table class="attendees">
 <tr>
  <th class="name">Name</th>
  <th class="groups">Group(s)</th>
  <th class="regtime">Registered</th>
  <th class="oneliner">Oneliner</th>
 </tr>
<?
$index = $numAttendees;
$row = 0;
if (($res = stExecSQL("SELECT * FROM attendees ORDER BY regtime DESC")) !== FALSE)
{
  foreach ($res as $item)
  {
    stPrintAttendee($item, $row++, FALSE, ($index > $maxAttendees) ? " overbooked" : "");
    $index--;
  }
}
?>
</table>