diff register.inc.php @ 103:c6b9041078ec

Add hard limit option for attendees, and add feature of using "0" to disable hard and soft limit completely.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 21 Oct 2013 14:52:06 +0300
parents 1fccb8f031ed
children aeebfedb5709
line wrap: on
line diff
--- a/register.inc.php	Mon Oct 21 13:45:11 2013 +0300
+++ b/register.inc.php	Mon Oct 21 14:52:06 2013 +0300
@@ -81,13 +81,26 @@
   return $res;
 }
 
+stCheckRegistrationAvailable();
+
 // Check if registration is enabled
 if (!stChkSetting("allowRegister"))
 {
 ?>
 <h1>Sorry, registration disabled!</h1>
 <p>
-Registration to the event is not available at this time.
+Registration to the event is not enabled at this time.
+</p>
+<?
+}
+else
+if ($maxAttendeesHard > 0 && $numAttendees >= $maxAttendeesHard)
+{
+?>
+<h1>Sorry, registration disabled!</h1>
+<p>
+Registration to the event is not available at this time due to
+number of attendees limit having been reached. <b>:(</b>
 </p>
 <?
 }