From 91feef607687b1262a949835cffd850cdd819846 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Wed, 1 Jun 2011 12:30:31 -0700 Subject: Started the account page. --- htdocs/moderate/account.php | 22 ++++++++++ htdocs/moderate/changepassword.php | 88 -------------------------------------- 2 files changed, 22 insertions(+), 88 deletions(-) create mode 100644 htdocs/moderate/account.php delete mode 100644 htdocs/moderate/changepassword.php diff --git a/htdocs/moderate/account.php b/htdocs/moderate/account.php new file mode 100644 index 0000000..5fc87db --- /dev/null +++ b/htdocs/moderate/account.php @@ -0,0 +1,22 @@ + + * + */ + +require_once('../src/base.inc.php'); + +require_once('src/header.inc.php'); + +echo "

Your Account

"; + + + + +require_once('src/footer.inc.php'); + +?> diff --git a/htdocs/moderate/changepassword.php b/htdocs/moderate/changepassword.php deleted file mode 100644 index 646af94..0000000 --- a/htdocs/moderate/changepassword.php +++ /dev/null @@ -1,88 +0,0 @@ - 0) { - $errors = array(); - - if (!isset($_POST['oldpassword']) or $_POST['oldpassword'] == '') { - $errors[] = "Old Password is a required field."; - } - - if (!isset($_POST['newpassword']) or $_POST['newpassword'] == '') { - $errors[] = "New Password is a required field."; - } - - if (!isset($_POST['newpassword2']) or $_POST['newpassword2'] == '') { - $errors[] = "Confirm New Password is a required field."; - } - - if (count($errors) == 0) { - if ($_POST['newpassword'] != $_POST['newpassword2']) { - $errors[] = "New password must match Confirm New Password"; - } - - $user = getAccount($_SESSION['currentUser']['id']); - - if (sha1($_POST['oldpassword']) != $user['password']) { - $errors[] = "Old Password does not match your current password."; - - } else { - // Update the password - updatePassword($_SESSION['currentUser']['id'], $_POST['newpassword']); - - header("Location: index.php"); - } - } - - - if (count($errors) > 0) { - $form['errors'] = ""; - } -} - -require_once('src/header.inc.php'); - -?> - -

Change Password

- - - -
- -
- -
- - -
- -
- - -
- -
- -
- -
- - -- cgit v1.2.3