forked from science-ation/science-ation
NEW FEATURE: Judge Registration Type
Judge registration type can now be one of: Open - Anyone can register as a judge Single Password - A password is selected by the committee and is given to any potential judges. The judge must enter this judge registration password before they will be allowed to create an account Invite - Judges must be invited by the committee, judges will not be allowed to create new accounts.
This commit is contained in:
parent
6eb1a39d0b
commit
5df07701a0
@ -132,24 +132,83 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
echo i18n("Please choose a password in order to create your judges account");
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"new\">";
|
||||
echo "<table>";
|
||||
echo "<tr><td>";
|
||||
echo i18n("Enter Password:");
|
||||
echo "</td><td>";
|
||||
echo "<input type=\"password\" size=\"10\" name=\"pass1\">";
|
||||
echo "</td></tr>";
|
||||
echo "<tr><td>";
|
||||
echo i18n("Confirm Password:");
|
||||
echo "</td><td>";
|
||||
echo "<input type=\"password\" size=\"10\" name=\"pass2\">";
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
echo "<br />";
|
||||
echo "<input type=\"submit\" value=\"".i18n("Create Account")."\">";
|
||||
$allownew=true;
|
||||
|
||||
if($config['judge_registration_type']=="invite")
|
||||
{
|
||||
$allownew=false;
|
||||
|
||||
echo i18n("Judge registration is by invite only. You can not create a new account. If you have been invited already, you need to use the same email address that you were invited with. If you need an invitation, please contact the science fair committee.");
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
echo "<a href=\"register_judges.php\">Back to Judges Registration</a>";
|
||||
|
||||
}
|
||||
else if($config['judge_registration_type']=="singlepassword")
|
||||
{
|
||||
$showsinglepasswordform=true;
|
||||
if($_POST['singlepassword'])
|
||||
{
|
||||
if($_POST['singlepassword']==$config['judge_registration_singlepassword'])
|
||||
{
|
||||
$allownew=true;
|
||||
$showsinglepasswordform=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo error(i18n("Invalid registration password, please try again"));
|
||||
$allownew=false;
|
||||
}
|
||||
}
|
||||
|
||||
if($showsinglepasswordform)
|
||||
{
|
||||
echo i18n("Judge registration is protected by a password. You must know the <b>judge registration password</b> in order to create an account.");
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"login\">";
|
||||
echo i18n("Email Address:")." ".$_SESSION['email']."<br />";
|
||||
echo i18n("Judge Registration Password:");
|
||||
echo "<input type=\"text\" size=\"10\" name=\"singlepassword\">";
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
echo "<input type=\"submit\" value=\"Submit\">";
|
||||
echo "</form>";
|
||||
$allownew=false;
|
||||
}
|
||||
}
|
||||
else if($config['judge_registration_type']=="open")
|
||||
{
|
||||
//thats fine, continue on and create them the account.
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo error(i18n("There is an error with the SFIAB configuration. judge_registration_type is not defined. Contact the fair organizers to get this fixed."));
|
||||
$allownew=false;
|
||||
}
|
||||
|
||||
if($allownew)
|
||||
{
|
||||
echo i18n("Please choose a password in order to create your judges account");
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"new\">";
|
||||
echo "<table>";
|
||||
echo "<tr><td>";
|
||||
echo i18n("Choose Password:");
|
||||
echo "</td><td>";
|
||||
echo "<input type=\"password\" size=\"10\" name=\"pass1\">";
|
||||
echo "</td></tr>";
|
||||
echo "<tr><td>";
|
||||
echo i18n("Confirm Password:");
|
||||
echo "</td><td>";
|
||||
echo "<input type=\"password\" size=\"10\" name=\"pass2\">";
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
echo "<br />";
|
||||
echo "<input type=\"submit\" value=\"".i18n("Create Account")."\">";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</form>";
|
||||
@ -164,10 +223,22 @@
|
||||
//this will return 1 if its between the dates, 0 otherwise.
|
||||
if($r->datecheck==1)
|
||||
{
|
||||
if($config['judge_registration_type']=="invite")
|
||||
{
|
||||
echo i18n("Judge registration is by invitation only. In order to register you must have your account created for you by the science fair committee. Once your account is created you'll be invited via email to login and complete your judge registration information");
|
||||
echo "<br />";
|
||||
echo "<br />";
|
||||
|
||||
echo i18n("Please enter your email address to :");
|
||||
echo "<ul>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo i18n("Please enter your email address to :");
|
||||
echo "<ul>";
|
||||
echo "<li>".i18n("Begin a new registration")."</li>";
|
||||
}
|
||||
|
||||
echo i18n("Please enter your email address to :");
|
||||
echo "<ul>";
|
||||
echo "<li>".i18n("Begin a new registration")."</li>";
|
||||
echo "<li>".i18n("Login to your account")."</li>";
|
||||
echo "</ul>";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user