Copyright (C) 2005 James Grant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ?> << ".i18n("Back to Judges Registration Summary")."
"; echo "
"; } if($_POST['action']=="save") { //first, lets see if they choosed the same password again (bad bad bad) $q=mysql_query("SELECT password FROM judges WHERE id='".$_SESSION['judges_id']."' AND email='".$_SESSION['email']."' AND password='".$_POST['pass1']."'"); if(mysql_num_rows($q)) { echo error(i18n("You cannot choose the same password again. Please choose a different password")); } //now make sure their password is good else if(!$_POST['pass1']) { echo error(i18n("New Password is required")); } else if(!$_POST['pass2']) { echo error(i18n("Confirm New Password is required")); } else if($_POST['pass1'] != $_POST['pass2']) { echo error(i18n("Passwords do not match")); } else { if($config['judges_password_expiry_days']>0) $ex="passwordexpiry=DATE_ADD(CURDATE(),INTERVAL ".$config['judges_password_expiry_days']." DAY)"; else $ex="passwordexpiry=NULL"; mysql_query("UPDATE judges SET password='".$_POST['pass1']."', $ex WHERE id='".$_SESSION['judges_id']."' AND email='".$_SESSION['email']."'"); echo happy(i18n("Password successfully changed")); if($_SESSION['judges_password_expired']) { unset($_SESSION['judges_password_expired']); echo "<< ".i18n("Back to Judges Registration Summary")."
"; echo "
"; send_footer(); exit; } } } else { if($_SESSION['judges_password_expired']) echo error(i18n("Your password has expired. You must choose a new password now")); } echo "
\n"; echo "\n"; echo "
"; echo ""; echo ""; echo ""; echo "
"; echo i18n("Enter New Password:"); echo ""; echo ""; echo "
"; echo i18n("Confirm New Password:"); echo ""; echo ""; echo "
"; echo "\n"; echo "
"; if(!$_SESSION['judges_password_expired']) { echo "
"; echo "<< ".i18n("Back to Judges Registration Summary")."
"; } send_footer(); ?>