added warning when registrations have started (issue 255)

This commit is contained in:
justin 2010-07-13 03:33:58 +00:00
parent 7c918c0167
commit 024cd25fa6

View File

@ -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 "<br />";
echo "<div class='error'>Warning: Registrations have begun. You should not change any configuration settings.</div>";
echo "<br />";
}
if($conference['type']=='scienceolympics') {
echo "<table class=\"adminconfigtable\">";
echo " <tr>";