$notificationMessage="The password reset form somehow got submitted without some essential information.<br>Please try filling it out again.";
break;
case"loginfailed":
$notificationMessage="We couldn't log you in because your email or password was incorrect.<br>";
$_SESSION['loginfailures']+=1;
if($_SESSION['loginfailures']<10){
$notificationMessage.="This is your <strong>".ordinal($_SESSION['loginfailures'])."</strong> failed attempt.<br>After 10 failures, you will not be able to log in for 1 hour.<br>Please try again.";
}else{
$_SESSION['loginlockouttime']=time();
$notificationMessage.="Since you failed to log in successfully 10 times, you may not try again for 1 hour.";
}
break;
case"emaildoesnotexist":
$notificationMessage="The email address you entered doesn't have an account.<br>Would you like to <span class='clickable' onclick='ShowInfo(\"loginForm\")'>create an account</span>?";
break;
case"emailinvalid":
$notificationMessage="The email address you entered didn't work.<br>Please try another.";
break;
case"resetlinkfailed":
$notificationMessage="The reset link used is not valid. Please make sure you have copied it correctly.";
break;
case"resetlinkinvalid":
$notificationMessage="The reset link used is not valid. Please make sure you have copied it correctly.";
break;
case"couldnotresetpassword":
$notificationMessage="Your password could not be reset at this time. Please try again later.<br>If you remember your old password, you may still use it to log in.";
break;
case"passwordresetinvalid":
$notificationMessage="Something went wrong in the password reset process. Please try again.";
break;
case"newpasswordblank":
$notificationMessage="All the necessary information did not make it through for your password reset. Please try again.";
break;
case"couldnotupdatesettings":
$notificationMessage="Could not update your account settings. Please try again.";
break;
case"accountsettingsinvalid":
$notificationMessage="The email address you entered was either not valid or is already in use by another user. Please choose a different email address if you want to update your account email.";
break;
case"createdaccountsuccessfully":
$notificationMessage="Your account was created successfully!<br>Please log in using the email address and password you used to create it and you can start accessing your dictionaries anywhere!";
break;
case"resetemailsent":
$notificationMessage="The password reset link has been sent to the email you specified.<br>If you do not see it in your inbox, please check your junk mail box just in case!<br>Be sure to use the link before the end of today or else you will need to request a new one.";
if(query("UPDATE `users` SET `email`='".$_POST['email']."', `public_name`='".htmlspecialchars($public_name,ENT_QUOTES)."', `allow_email`=".(($_POST['allowemails']!="on")?0:1)." WHERE `id`=".$current_user.";")){