forked from science-ation/science-ation
Dont allow submitting the forms after the registration is closed
This commit is contained in:
parent
c3896013c1
commit
570d7714dc
@ -33,6 +33,17 @@ function registrationFormsReceived($reg_id="")
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
function registrationDeadlinePassed()
|
||||
{
|
||||
global $config;
|
||||
$q=mysql_query("SELECT (NOW()<'".$config['dates']['regclose']."') AS datecheck");
|
||||
$datecheck=mysql_fetch_object($q);
|
||||
if($datecheck->datecheck==1)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
function studentStatus($reg_id="")
|
||||
|
@ -75,6 +75,10 @@ echo mysql_error();
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms once they have been received by the fair"));
|
||||
}
|
||||
else if(registrationDeadlinePassed())
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms after registration deadline"));
|
||||
}
|
||||
else
|
||||
{
|
||||
//first, lets make sure this emergency contact really does belong to them
|
||||
|
@ -67,6 +67,10 @@ if($_POST['action']=="save")
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms once they have been received by the fair"));
|
||||
}
|
||||
else if(registrationDeadlinePassed())
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms after registration deadline"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$x=1;
|
||||
|
@ -75,6 +75,10 @@ echo mysql_error();
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms once they have been received by the fair"));
|
||||
}
|
||||
else if(registrationDeadlinePassed())
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms after registration deadline"));
|
||||
}
|
||||
else
|
||||
{
|
||||
//first, lets make sure this project really does belong to them
|
||||
|
@ -66,6 +66,10 @@ echo mysql_error();
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms once they have been received by the fair"));
|
||||
}
|
||||
else if(registrationDeadlinePassed())
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms after registration deadline"));
|
||||
}
|
||||
else
|
||||
{
|
||||
//first we will delete all their old answer, its easier to delete and re-insert in this case then it would be to find the corresponding answers and update them
|
||||
|
@ -67,6 +67,10 @@ if($_POST['action']=="save")
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms once they have been received by the fair"));
|
||||
}
|
||||
else if(registrationDeadlinePassed())
|
||||
{
|
||||
echo error(i18n("Cannot make changes to forms after registration deadline"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$x=1;
|
||||
|
Loading…
Reference in New Issue
Block a user