Copyright (C) 2005 James Grant Copyright (C) 2007 David 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. */ ?> prepare("SELECT password FROM users WHERE id='{$_SESSION['users_id']}' AND password='$pass'"); $q->execute(); if($q->rowCount()) message_push(error(i18n("You cannot choose the same password again. Please choose a different password"))); else if(!$_POST['pass1']) message_push(error(i18n("New Password is required"))); else if($_POST['pass1'] != $_POST['pass2']) message_push(error(i18n("Passwords do not match"))); else if(user_valid_password($_POST['pass1']) == false) message_push(error(i18n("The password contains invalid characters or is not long enough"))); else { user_set_password($_SESSION['users_id'], $pass); unset($_SESSION['password_expired']); message_push(happy(i18n('Your password has been successfully updated'))); header("location: $back_link"); exit; } } send_header("{$user_what[$type]} - Change Password", array("{$user_what[$type]} Registration" => "{$type}_main.php") ,"change_password" ); if(get_value_from_array($_SESSION, 'password_expired') == true) { echo i18n('Your password has expired. You must choose a new password now.'); } echo "
\n"; 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 "
"; echo "
"; echo "
".i18n('Passwords must be be between 6 and 32 characters, and may NOT contain any quote or a backslash.')."
"; send_footer(); ?>