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
|
//Lets check the date - if we are AFTER 'judgeregopen' and BEFORE 'judgeregclose' then we can login
|
||||||
//otherwise, registration is closed - no logins!
|
//otherwise, registration is closed - no logins!
|
||||||
|
$now = date('Y-m-d H:i:s');
|
||||||
$q=mysql_query("SELECT (NOW()>'".$config['dates']['judgeregopen']."' AND NOW()<'".$config['dates']['judgeregclose']."') AS datecheck");
|
if($now < $config['dates']['judgeregopen'])
|
||||||
$r=mysql_fetch_object($q);
|
{
|
||||||
//this will return 1 if its between the dates, 0 otherwise.
|
echo i18n("Judges registration for the %1 %2 has not yet opened",array($config['FAIRYEAR'],$config['fairname']),array("Fair year","Fair name"));
|
||||||
if($r->datecheck==1)
|
}
|
||||||
|
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")
|
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();
|
send_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user