From 0077cb99704fe863cf731fc5cab792af2ede96c2 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sun, 17 Apr 2011 20:13:07 -0400 Subject: Backporting retarded amount of changes outside of version control --- admin/settings/functions.php | 152 +++++++++++++++++++++---------------------- 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'admin/settings/functions.php') diff --git a/admin/settings/functions.php b/admin/settings/functions.php index 1e3ada4..74155fa 100644 --- a/admin/settings/functions.php +++ b/admin/settings/functions.php @@ -1,77 +1,77 @@ -. - */ - -/** - * Note to anyone feeling the need to edit this file... - * You MUST declare $db as global inside your functions in order access MySQL from here. - */ - - -function changePassword(){ -echo ""; - global $db; - - if(isset($_POST['processed'])) - { - $password = $_POST['password']; - $confirm = $_POST['confirm']; - - if($password != $confirm){ - ReportError("The passwords you entered did not match."); - PageRedirect(3, "?op=settings&change=password"); - return; - }else if(strlen($password)<6){ - ReportError("The password you entered is less than 6 characters."); - PageRedirect(3, "?op=settings&change=password"); - return; - } - $newpassword = crypt(md5($password),'iamnotadirtywhorebitch'); - $username = $_SESSION['username']; - $db->Query("UPDATE `bayonet_users` SET `password` = '$newpassword' WHERE `username` = '$username' LIMIT 1"); - - echo "Your password has successfully been changed."; - PageRedirect(3,"?op=settings"); - return; - } -?> -
-
-

Change Your Password

- - - - - - - - - - - - -
Password: - - - -
Password Strength:
-
Minimum of 6 Characters
Confirm Password:
-
-
-. + */ + +/** + * Note to anyone feeling the need to edit this file... + * You MUST declare $db as global inside your functions in order access MySQL from here. + */ + + +function changePassword(){ +echo ""; + global $db; + + if(isset($_POST['processed'])) + { + $password = $_POST['password']; + $confirm = $_POST['confirm']; + + if($password != $confirm){ + ReportError("The passwords you entered did not match."); + PageRedirect(3, "?op=settings&change=password"); + return; + }else if(strlen($password)<6){ + ReportError("The password you entered is less than 6 characters."); + PageRedirect(3, "?op=settings&change=password"); + return; + } + $newpassword = crypt(md5($password),'iamnotadirtywhorebitch'); + $username = $_SESSION['username']; + $db->Query("UPDATE `bayonet_users` SET `password` = '$newpassword' WHERE `username` = '$username' LIMIT 1"); + + echo "Your password has successfully been changed."; + PageRedirect(3,"?op=settings"); + return; + } +?> +
+
+

Change Your Password

+ + + + + + + + + + + + +
Password: + + + +
Password Strength:
+
Minimum of 6 Characters
Confirm Password:
+
+
+