From 024cd25fa6b766a88384825455d1244d904b7a2a Mon Sep 17 00:00:00 2001 From: justin Date: Tue, 13 Jul 2010 03:33:58 +0000 Subject: [PATCH] added warning when registrations have started (issue 255) --- config/index.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/config/index.php b/config/index.php index 786f1c1..238f216 100644 --- a/config/index.php +++ b/config/index.php @@ -31,6 +31,25 @@ ,"configuration" ); +// Display a warning about changing settings if registrations have started + $dates = array("regopen"); + if($conference['type']!='scienceolympics') { + $dates []= "judgeregopen"; + } + $ok=true; + foreach($dates as $date) { + if($config['dates'][$date] && $config['dates'][$date]!="0000-00-00 00:00:00") { + $q=mysql_query("SELECT (NOW()<'".$config['dates'][$date]."') AS test"); + $r=mysql_fetch_object($q); + $ok=$ok & $r->test; + } + } + if(!$ok) { + echo "
"; + echo "
Warning: Registrations have begun. You should not change any configuration settings.
"; + echo "
"; + } + if($conference['type']=='scienceolympics') { echo ""; echo " ";