forked from science-ation/science-ation
Show different messages if we're BEFORE the registration open VS after registration close.
Also do now display any sort of login (email) box if we're before registration open, but do show it if we're after registration close so they can still login and view info or apply for special awards
This commit is contained in:
parent
e6ed1c35b0
commit
794cbe7c84
@ -24,7 +24,9 @@
|
||||
<?
|
||||
require("common.inc.php");
|
||||
|
||||
$q=mysql_query("SELECT (NOW()>'".$config['dates']['regopen']."' AND NOW()<'".$config['dates']['regclose']."') AS datecheck");
|
||||
$q=mysql_query("SELECT (NOW()>'".$config['dates']['regopen']."' AND NOW()<'".$config['dates']['regclose']."') AS datecheck,
|
||||
NOW()<'".$config['dates']['regopen']."' AS datecheckbefore,
|
||||
NOW()>'".$config['dates']['regclose']."' AS datecheckafter");
|
||||
$datecheck=mysql_fetch_object($q);
|
||||
|
||||
if($_POST['action']=="new")
|
||||
@ -300,7 +302,10 @@
|
||||
{
|
||||
if($datecheck->datecheck==0)
|
||||
{
|
||||
echo error(i18n("Registration is closed. You can not create a new account"));
|
||||
if($datecheck->datecheckbefore)
|
||||
echo error(i18n("Registration is not open yet. You can not create a new account"));
|
||||
else if($datecheck->datecheckafter)
|
||||
echo error(i18n("Registration is now closed. You can not create a new account"));
|
||||
$showform=false;
|
||||
echo "<A href=\"register_participants.php\">Back to Participant Registration Login Page</a>";
|
||||
|
||||
@ -368,9 +373,14 @@
|
||||
|
||||
//this will return 1 if its between the dates, 0 otherwise.
|
||||
if($datecheck->datecheck==0)
|
||||
{
|
||||
if($datecheck->datecheckbefore)
|
||||
echo notice(i18n("Registration for the %1 %2 is not open yet. Registration will open on %3.",array($config['FAIRYEAR'],$config['fairname'],$config['dates']['regopen']),array("fair year","fair name","registration open date")));
|
||||
else if($datecheck->datecheckafter)
|
||||
{
|
||||
echo notice(i18n("Registration for the %1 %2 is now closed. Existing registrants can login and view (read only) their information, as well as apply for special awards (if applicable).",array($config['FAIRYEAR'],$config['fairname']),array("fair year","fair name")));
|
||||
echo i18n("Please enter your email address to login");
|
||||
}
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
$buttontext=i18n("Login");
|
||||
@ -403,6 +413,9 @@
|
||||
$buttontext=i18n("Begin");
|
||||
}
|
||||
|
||||
//only show the email login box if registration is open, or we're past the registration deadline (so they can login and view / apply for special awards). if we're before the registration deadline then they cant create an account or login anwyays so no point in showing the box
|
||||
if(!$datecheck->datecheckbefore)
|
||||
{
|
||||
?>
|
||||
<form method="post" action="register_participants.php">
|
||||
<input type="hidden" name="action" value="login" />
|
||||
@ -411,5 +424,6 @@
|
||||
</form>
|
||||
<?
|
||||
}
|
||||
}
|
||||
send_footer();
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user