forked from science-ation/science-ation
- Don't bother the mysql server with a date check, we can do that ourselves.
- Add a condition for judge registration not yet being open.
This commit is contained in:
parent
50dbdbf599
commit
95a3816068
@ -244,11 +244,16 @@
|
||||
{
|
||||
//Lets check the date - if we are AFTER 'judgeregopen' and BEFORE 'judgeregclose' then we can login
|
||||
//otherwise, registration is closed - no logins!
|
||||
|
||||
$q=mysql_query("SELECT (NOW()>'".$config['dates']['judgeregopen']."' AND NOW()<'".$config['dates']['judgeregclose']."') AS datecheck");
|
||||
$r=mysql_fetch_object($q);
|
||||
//this will return 1 if its between the dates, 0 otherwise.
|
||||
if($r->datecheck==1)
|
||||
$now = date('Y-m-d H:i:s');
|
||||
if($now < $config['dates']['judgeregopen'])
|
||||
{
|
||||
echo i18n("Judges registration for the %1 %2 has not yet opened",array($config['FAIRYEAR'],$config['fairname']),array("Fair year","Fair name"));
|
||||
}
|
||||
else if($now > $config['dates']['judgeregclose'])
|
||||
{
|
||||
echo i18n("Judges registration for the %1 %2 is now closed",array($config['FAIRYEAR'],$config['fairname']),array("Fair year","Fair name"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if($config['judge_registration_type']=="invite")
|
||||
{
|
||||
@ -279,10 +284,6 @@
|
||||
<?
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo i18n("Judges registration for the %1 %2 is now closed",array($config['FAIRYEAR'],$config['fairname']),array("Fair year","Fair name"));
|
||||
}
|
||||
}
|
||||
send_footer();
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user