From 2c8de693e6380c83b68eff4bf647422cde79548d Mon Sep 17 00:00:00 2001 From: Jeremy Tan Date: Mon, 28 Oct 2013 21:03:55 +0800 Subject: [PATCH] remove old stuff --- .../public_html/users/original/account.php | 32 --- .../users/original/activate-account.php | 66 ----- .../users/original/admin_configuration.php | 237 ---------------- .../public_html/users/original/admin_page.php | 160 ----------- .../users/original/admin_pages.php | 96 ------- .../users/original/admin_permission.php | 220 --------------- .../users/original/admin_permissions.php | 94 ------- .../users/original/admin_upload_users.php | 126 --------- .../public_html/users/original/admin_user.php | 265 ------------------ .../users/original/admin_users.php | 82 ------ .../public_html/users/original/index.php | 47 ---- .../public_html/users/original/left-nav.php | 44 --- .../public_html/users/original/login.php | 127 --------- .../public_html/users/original/logout.php | 35 --- .../public_html/users/original/register.php | 144 ---------- .../users/original/resend-activation.php | 166 ----------- .../users/original/user_settings.php | 152 ---------- 17 files changed, 2093 deletions(-) delete mode 100644 testing/MCTXWeb/public_html/users/original/account.php delete mode 100644 testing/MCTXWeb/public_html/users/original/activate-account.php delete mode 100644 testing/MCTXWeb/public_html/users/original/admin_configuration.php delete mode 100644 testing/MCTXWeb/public_html/users/original/admin_page.php delete mode 100644 testing/MCTXWeb/public_html/users/original/admin_pages.php delete mode 100644 testing/MCTXWeb/public_html/users/original/admin_permission.php delete mode 100644 testing/MCTXWeb/public_html/users/original/admin_permissions.php delete mode 100644 testing/MCTXWeb/public_html/users/original/admin_upload_users.php delete mode 100644 testing/MCTXWeb/public_html/users/original/admin_user.php delete mode 100644 testing/MCTXWeb/public_html/users/original/admin_users.php delete mode 100644 testing/MCTXWeb/public_html/users/original/index.php delete mode 100644 testing/MCTXWeb/public_html/users/original/left-nav.php delete mode 100644 testing/MCTXWeb/public_html/users/original/login.php delete mode 100644 testing/MCTXWeb/public_html/users/original/logout.php delete mode 100644 testing/MCTXWeb/public_html/users/original/register.php delete mode 100644 testing/MCTXWeb/public_html/users/original/resend-activation.php delete mode 100644 testing/MCTXWeb/public_html/users/original/user_settings.php diff --git a/testing/MCTXWeb/public_html/users/original/account.php b/testing/MCTXWeb/public_html/users/original/account.php deleted file mode 100644 index 3f93126..0000000 --- a/testing/MCTXWeb/public_html/users/original/account.php +++ /dev/null @@ -1,32 +0,0 @@ - -
-
-
-

UserCake

-

Account

-
"; - -include("left-nav.php"); - -echo " -
-
-Hey, $loggedInUser->displayname. This is an example secure page designed to demonstrate some of the basic features of UserCake. Just so you know, your title at the moment is $loggedInUser->title, and that can be changed in the admin panel. You registered this account on " . date("M d, Y", $loggedInUser->signupTimeStamp()) . ". -
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/activate-account.php b/testing/MCTXWeb/public_html/users/original/activate-account.php deleted file mode 100644 index 33bbd15..0000000 --- a/testing/MCTXWeb/public_html/users/original/activate-account.php +++ /dev/null @@ -1,66 +0,0 @@ - -
-
-
-

UserCake

-

Activate Account

- -
"; - -include("left-nav.php"); - -echo " -
-
"; - -echo resultBlock($errors,$successes); - -echo " -
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/admin_configuration.php b/testing/MCTXWeb/public_html/users/original/admin_configuration.php deleted file mode 100644 index 01fa76a..0000000 --- a/testing/MCTXWeb/public_html/users/original/admin_configuration.php +++ /dev/null @@ -1,237 +0,0 @@ - 72 OR $newResend_activation_threshold < 0) - { - $errors[] = lang("CONFIG_ACTIVATION_RESEND_RANGE",array(0,72)); - } - else if (count($errors) == 0) { - $cfgId[] = 5; - $cfgValue[5] = $newResend_activation_threshold; - $resend_activation_threshold = $newResend_activation_threshold; - } - } - - //Validate new language selection - if ($newSettings[6] != $language) { - $newLanguage = $newSettings[6]; - if(minMaxRange(1,150,$language)) - { - $errors[] = lang("CONFIG_LANGUAGE_CHAR_LIMIT",array(1,150)); - } - elseif (!file_exists($newLanguage)) { - $errors[] = lang("CONFIG_LANGUAGE_INVALID",array($newLanguage)); - } - else if (count($errors) == 0) { - $cfgId[] = 6; - $cfgValue[6] = $newLanguage; - $language = $newLanguage; - } - } - - //Validate new template selection - if ($newSettings[7] != $template) { - $newTemplate = $newSettings[7]; - if(minMaxRange(1,150,$template)) - { - $errors[] = lang("CONFIG_TEMPLATE_CHAR_LIMIT",array(1,150)); - } - elseif (!file_exists($newTemplate)) { - $errors[] = lang("CONFIG_TEMPLATE_INVALID",array($newTemplate)); - } - else if (count($errors) == 0) { - $cfgId[] = 7; - $cfgValue[7] = $newTemplate; - $template = $newTemplate; - } - } - - //Update configuration table with new settings - if (count($errors) == 0 AND count($cfgId) > 0) { - updateConfig($cfgId, $cfgValue); - $successes[] = lang("CONFIG_UPDATE_SUCCESSFUL"); - } -} - -$languages = getLanguageFiles(); //Retrieve list of language files -$templates = getTemplateFiles(); //Retrieve list of template files -$permissionData = fetchAllPermissions(); //Retrieve list of all permission levels -require_once("models/header.php"); - -echo " - -
-
-
-

UserCake

-

Admin Configuration

-
"; - -include("left-nav.php"); - -echo " -
-
"; - -echo resultBlock($errors,$successes); - -echo " -
-
-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- -"; -} -else { - echo " - - - "; -} - -echo "

-

- - -

- -
-
-
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/admin_page.php b/testing/MCTXWeb/public_html/users/original/admin_page.php deleted file mode 100644 index 7d1815d..0000000 --- a/testing/MCTXWeb/public_html/users/original/admin_page.php +++ /dev/null @@ -1,160 +0,0 @@ - -
-
-
-

UserCake

-

Admin Page

-
"; - -include("left-nav.php"); - -echo " -
-
"; - -echo resultBlock($errors,$successes); - -echo " -
- - - - -
-

Page Information

-
-

- -".$pageDetails['id']." -

-

- -".$pageDetails['page']." -

-

-"; - -//Display private checkbox -if ($pageDetails['private'] == 1){ - echo ""; -} -else { - echo ""; -} - -echo " -

-
-

Page Access

-
-

-Remove Access:"; - -//Display list of permission levels with access -foreach ($permissionData as $v1) { - if(isset($pagePermissions[$v1['id']])){ - echo "
".$v1['name']; - } -} - -echo" -

Add Access:"; - -//Display list of permission levels without access -foreach ($permissionData as $v1) { - if(!isset($pagePermissions[$v1['id']])){ - echo "
".$v1['name']; - } -} - -echo" -

-
-
-

- - -

-
-
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/admin_pages.php b/testing/MCTXWeb/public_html/users/original/admin_pages.php deleted file mode 100644 index 6918367..0000000 --- a/testing/MCTXWeb/public_html/users/original/admin_pages.php +++ /dev/null @@ -1,96 +0,0 @@ - 0) { - createPages($creations) ; -} - -if (count($dbpages) > 0){ - //Check if DB contains pages that don't exist - foreach ($dbpages as $page){ - if(!isset($pages[$page['page']])){ - $deletions[] = $page['id']; - } - } -} - -//Delete pages from DB if not found -if (count($deletions) > 0) { - deletePages($deletions); -} - -//Update DB pages -$dbpages = fetchAllPages(); - -require_once("models/header.php"); - -echo " - -
-
-
-

UserCake

-

Admin Pages

-
"; - -include("left-nav.php"); - -echo " -
-
- -"; - -//Display list of pages -foreach ($dbpages as $page){ - echo " - - - - - "; -} - -echo " -
IdPageAccess
- ".$page['id']." - - ".$page['page']." - "; - - //Show public/private setting of page - if($page['private'] == 0){ - echo "Public"; - } - else { - echo "Private"; - } - - echo " -
-
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/admin_permission.php b/testing/MCTXWeb/public_html/users/original/admin_permission.php deleted file mode 100644 index 38ef238..0000000 --- a/testing/MCTXWeb/public_html/users/original/admin_permission.php +++ /dev/null @@ -1,220 +0,0 @@ - -
-
-
-

UserCake

-

Admin Permissions

-
"; - -include("left-nav.php"); - -echo " -
-
"; - -echo resultBlock($errors,$successes); - -echo " -
- - - - -
-

Permission Information

-
-

- -".$permissionDetails['id']." -

-

- - -

- - -

-
-

Permission Membership

-
-

-Remove Members:"; - -//List users with permission level -foreach ($userData as $v1) { - if(isset($permissionUsers[$v1['id']])){ - echo "
".$v1['display_name']; - } -} - -echo" -

Add Members:"; - -//List users without permission level -foreach ($userData as $v1) { - if(!isset($permissionUsers[$v1['id']])){ - echo "
".$v1['display_name']; - } -} - -echo" -

-
-
-

Permission Access

-
-

-Public Access:"; - -//List public pages -foreach ($pageData as $v1) { - if($v1['private'] != 1){ - echo "
".$v1['page']; - } -} - -echo" -

-

-Remove Access:"; - -//List pages accessible to permission level -foreach ($pageData as $v1) { - if(isset($pagePermissions[$v1['id']]) AND $v1['private'] == 1){ - echo "
".$v1['page']; - } -} - -echo" -

Add Access:"; - -//List pages inaccessible to permission level -foreach ($pageData as $v1) { - if(!isset($pagePermissions[$v1['id']]) AND $v1['private'] == 1){ - echo "
".$v1['page']; - } -} - -echo" -

-
-
-

- - -

-
-
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/admin_permissions.php b/testing/MCTXWeb/public_html/users/original/admin_permissions.php deleted file mode 100644 index 9a58249..0000000 --- a/testing/MCTXWeb/public_html/users/original/admin_permissions.php +++ /dev/null @@ -1,94 +0,0 @@ - -
-
-
-

UserCake

-

Admin Permissions

-
"; - -include("left-nav.php"); - -echo " -
-
"; - -echo resultBlock($errors,$successes); - -echo " -
- - - -"; - -//List each permission level -foreach ($permissionData as $v1) { - echo " - - - - "; -} - -echo " -
DeletePermission Name
".$v1['name']."
-

- - -

- -
-
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/admin_upload_users.php b/testing/MCTXWeb/public_html/users/original/admin_upload_users.php deleted file mode 100644 index 53c71ce..0000000 --- a/testing/MCTXWeb/public_html/users/original/admin_upload_users.php +++ /dev/null @@ -1,126 +0,0 @@ -status) - { - if($user->username_taken) $errors[] = lang("ACCOUNT_USERNAME_IN_USE",array($username)); - if($user->displayname_taken) $errors[] = lang("ACCOUNT_DISPLAYNAME_IN_USE",array($displayname)); - if($user->email_taken) $errors[] = lang("ACCOUNT_EMAIL_IN_USE",array($email)); - } - else - { - //Attempt to add the user to the database, carry out finishing tasks like emailing the user (if required) - if(!$user->userCakeAddUser()) - { - if($user->mail_failure) $errors[] = lang("MAIL_ERROR"); - if($user->sql_failure) $errors[] = lang("SQL_ERROR"); - } - } - } - if(count($errors) == 0) - { - $successes[] = $user->success; - } - - echo resultBlock($errors,$successes); - } - - - - - - } - - -} - -if ($show_form) -{ - /* I can't get fucking file uploads to fucking work with fucking nginx - echo "

Please provide a CSV file of usernames and email addresses.

-

Click here for an example file.

-
Upload
-
- - -
"; - */ - echo " - -
-

Action to take on adding users:

-

Keep existing users and add these users

-

Purge existing users and add these users

- - - -

Enter or copy/paste user information below (resize the text area if necessary):

-

-

- -
"; -} - -?> - diff --git a/testing/MCTXWeb/public_html/users/original/admin_user.php b/testing/MCTXWeb/public_html/users/original/admin_user.php deleted file mode 100644 index 2d0e656..0000000 --- a/testing/MCTXWeb/public_html/users/original/admin_user.php +++ /dev/null @@ -1,265 +0,0 @@ - -
-
-
-

UserCake

-

Admin User

-
"; - -include("left-nav.php"); - -echo " -
-
"; - -echo resultBlock($errors,$successes); - -echo " -
- - - -
-

User Information

-
-

- -".$userdetails['id']." -

-

- -".$userdetails['user_name']." -

-

- - -

-

- - -

-

-"; - -//Display activation link, if account inactive -if ($userdetails['active'] == '1'){ - echo "Yes"; -} -else{ - echo "No -

-

- - - "; -} - -echo " -

-

- - -

-

- -".date("j M, Y", $userdetails['sign_up_stamp'])." -

-

-"; - -//Last sign in, interpretation -if ($userdetails['last_sign_in_stamp'] == '0'){ - echo "Never"; -} -else { - echo date("j M, Y", $userdetails['last_sign_in_stamp']); -} - -echo " -

-

- - -

-

- - -

-
-
-

Permission Membership

-
-

Remove Permission:"; - -//List of permission levels user is apart of -foreach ($permissionData as $v1) { - if(isset($userPermission[$v1['id']])){ - echo "
".$v1['name']; - } -} - -//List of permission levels user is not apart of -echo "

Add Permission:"; -foreach ($permissionData as $v1) { - if(!isset($userPermission[$v1['id']])){ - echo "
".$v1['name']; - } -} - -echo" -

-
-
-
-
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/admin_users.php b/testing/MCTXWeb/public_html/users/original/admin_users.php deleted file mode 100644 index e0ec8e0..0000000 --- a/testing/MCTXWeb/public_html/users/original/admin_users.php +++ /dev/null @@ -1,82 +0,0 @@ - -
-
-
-

UserCake

-

Admin Users

-
"; - -include("left-nav.php"); - -echo " -
-
"; - -echo resultBlock($errors,$successes); - -echo " -
- - - -"; - -//Cycle through users -foreach ($userData as $v1) { - echo " - - - - - - - "; -} - -echo " -
DeleteUsernameDisplay NameTitleLast Sign In
".$v1['user_name']."".$v1['display_name']."".$v1['title']." - "; - - //Interprety last login - if ($v1['last_sign_in_stamp'] == '0'){ - echo "Never"; - } - else { - echo date("j M, Y", $v1['last_sign_in_stamp']); - } - echo " -
- -
-
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/index.php b/testing/MCTXWeb/public_html/users/original/index.php deleted file mode 100644 index 63d11fb..0000000 --- a/testing/MCTXWeb/public_html/users/original/index.php +++ /dev/null @@ -1,47 +0,0 @@ - -
-
-
-

UserCake

-

2.00

-
"; -include("left-nav.php"); - -echo " -
-
-

Thank you for downloading UserCake. 100% Free and Opensource.

-

Copyright (c) 2009-2012

-

Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the 'Software'), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions:

-

The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software.

-

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.

-
-
-
- -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/left-nav.php b/testing/MCTXWeb/public_html/users/original/left-nav.php deleted file mode 100644 index b6f053e..0000000 --- a/testing/MCTXWeb/public_html/users/original/left-nav.php +++ /dev/null @@ -1,44 +0,0 @@ - -
  • Account Home
  • -
  • User Settings
  • -
  • Logout
  • - "; - - //Links for permission level 2 (default admin) - if ($loggedInUser->checkPermission(array(2))){ - echo " - "; - } -} -//Links for users not logged in -else { - echo " - "; -} - -?> diff --git a/testing/MCTXWeb/public_html/users/original/login.php b/testing/MCTXWeb/public_html/users/original/login.php deleted file mode 100644 index 2c45d1f..0000000 --- a/testing/MCTXWeb/public_html/users/original/login.php +++ /dev/null @@ -1,127 +0,0 @@ -email = $userdetails["email"]; - $loggedInUser->user_id = $userdetails["id"]; - $loggedInUser->hash_pw = $userdetails["password"]; - $loggedInUser->title = $userdetails["title"]; - $loggedInUser->displayname = $userdetails["display_name"]; - $loggedInUser->username = $userdetails["user_name"]; - - //Update last sign in - $loggedInUser->updateLastSignIn(); - $_SESSION["userCakeUser"] = $loggedInUser; - - //Redirect to user account page - header("Location: account.php"); - die(); - } - } - } - } -} - -require_once("models/header.php"); - -echo " - -
    -
    -
    -

    UserCake

    -

    Login

    -
    "; - -include("left-nav.php"); - -echo " -
    -
    "; - -echo resultBlock($errors,$successes); - -echo " -
    -
    -

    - - -

    -

    - - -

    -

    - - -

    -
    -
    -
    -
    -
    - -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/logout.php b/testing/MCTXWeb/public_html/users/original/logout.php deleted file mode 100644 index 728a294..0000000 --- a/testing/MCTXWeb/public_html/users/original/logout.php +++ /dev/null @@ -1,35 +0,0 @@ -userLogOut(); -} - -if(!empty($websiteUrl)) -{ - $add_http = ""; - - if(strpos($websiteUrl,"http://") === false) - { - $add_http = "http://"; - } - - header("Location: ".$add_http.$websiteUrl); - die(); -} -else -{ - header("Location: http://".$_SERVER['HTTP_HOST']); - die(); -} - -?> - diff --git a/testing/MCTXWeb/public_html/users/original/register.php b/testing/MCTXWeb/public_html/users/original/register.php deleted file mode 100644 index 32f1ae1..0000000 --- a/testing/MCTXWeb/public_html/users/original/register.php +++ /dev/null @@ -1,144 +0,0 @@ -status) - { - if($user->username_taken) $errors[] = lang("ACCOUNT_USERNAME_IN_USE",array($username)); - if($user->displayname_taken) $errors[] = lang("ACCOUNT_DISPLAYNAME_IN_USE",array($displayname)); - if($user->email_taken) $errors[] = lang("ACCOUNT_EMAIL_IN_USE",array($email)); - } - else - { - //Attempt to add the user to the database, carry out finishing tasks like emailing the user (if required) - if(!$user->userCakeAddUser()) - { - if($user->mail_failure) $errors[] = lang("MAIL_ERROR"); - if($user->sql_failure) $errors[] = lang("SQL_ERROR"); - } - } - } - if(count($errors) == 0) { - $successes[] = $user->success; - } -} - -require_once("models/header.php"); -echo " - -
    -
    -
    -

    UserCake

    -

    Register

    - -
    "; -include("left-nav.php"); -echo " -
    - -
    "; - -echo resultBlock($errors,$successes); - -echo " -
    -
    - -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    - - -

    -
    - -
    -
    -
    - -"; -?> diff --git a/testing/MCTXWeb/public_html/users/original/resend-activation.php b/testing/MCTXWeb/public_html/users/original/resend-activation.php deleted file mode 100644 index acbee1b..0000000 --- a/testing/MCTXWeb/public_html/users/original/resend-activation.php +++ /dev/null @@ -1,166 +0,0 @@ - array("#ACTIVATION-URL","#USERNAME#"), - "subjectStrs" => array($activation_url,$userdetails["display_name"]) - ); - - if(!$mail->newTemplateMsg("resend-activation.txt",$hooks)) - { - $errors[] = lang("MAIL_TEMPLATE_BUILD_ERROR"); - } - else - { - if(!$mail->sendMail($userdetails["email"],"Activate your ".$websiteName." Account")) - { - $errors[] = lang("MAIL_ERROR"); - } - else - { - //Success, user details have been updated in the db now mail this information out. - $successes[] = lang("ACCOUNT_NEW_ACTIVATION_SENT"); - } - } - } - } - } - } - } -} - -//Prevent the user visiting the logged in page if he/she is already logged in -if(isUserLoggedIn()) { header("Location: account.php"); die(); } - -require_once("models/header.php"); - -echo " - -
    -
    -
    -

    UserCake

    -

    Resend Activation

    -
    "; - -include("left-nav.php"); - -echo " -
    -
    "; - -echo resultBlock($errors,$successes); - -echo "
    "; - -//Show disabled if email activation not required -if(!$emailActivation) -{ - echo lang("FEATURE_DISABLED"); -} -else -{ - echo "
    -

    - - -

    -

    - - -

    -

    - - -

    -
    "; -} - -echo " -
    -
    -
    -
    - -"; - -?> diff --git a/testing/MCTXWeb/public_html/users/original/user_settings.php b/testing/MCTXWeb/public_html/users/original/user_settings.php deleted file mode 100644 index 12603d0..0000000 --- a/testing/MCTXWeb/public_html/users/original/user_settings.php +++ /dev/null @@ -1,152 +0,0 @@ -hash_pw); - - if (trim($password) == ""){ - $errors[] = lang("ACCOUNT_SPECIFY_PASSWORD"); - } - else if($entered_pass != $loggedInUser->hash_pw) - { - //No match - $errors[] = lang("ACCOUNT_PASSWORD_INVALID"); - } - if($email != $loggedInUser->email) - { - if(trim($email) == "") - { - $errors[] = lang("ACCOUNT_SPECIFY_EMAIL"); - } - else if(!isValidEmail($email)) - { - $errors[] = lang("ACCOUNT_INVALID_EMAIL"); - } - else if(emailExists($email)) - { - $errors[] = lang("ACCOUNT_EMAIL_IN_USE", array($email)); - } - - //End data validation - if(count($errors) == 0) - { - $loggedInUser->updateEmail($email); - $successes[] = lang("ACCOUNT_EMAIL_UPDATED"); - } - } - - if ($password_new != "" OR $password_confirm != "") - { - if(trim($password_new) == "") - { - $errors[] = lang("ACCOUNT_SPECIFY_NEW_PASSWORD"); - } - else if(trim($password_confirm) == "") - { - $errors[] = lang("ACCOUNT_SPECIFY_CONFIRM_PASSWORD"); - } - else if(minMaxRange(8,50,$password_new)) - { - $errors[] = lang("ACCOUNT_NEW_PASSWORD_LENGTH",array(8,50)); - } - else if($password_new != $password_confirm) - { - $errors[] = lang("ACCOUNT_PASS_MISMATCH"); - } - - //End data validation - if(count($errors) == 0) - { - //Also prevent updating if someone attempts to update with the same password - $entered_pass_new = generateHash($password_new,$loggedInUser->hash_pw); - - if($entered_pass_new == $loggedInUser->hash_pw) - { - //Don't update, this fool is trying to update with the same password ¬¬ - $errors[] = lang("ACCOUNT_PASSWORD_NOTHING_TO_UPDATE"); - } - else - { - //This function will create the new hash and update the hash_pw property. - $loggedInUser->updatePassword($password_new); - $successes[] = lang("ACCOUNT_PASSWORD_UPDATED"); - } - } - } - if(count($errors) == 0 AND count($successes) == 0){ - $errors[] = lang("NOTHING_TO_UPDATE"); - } -} - -require_once("models/header.php"); -echo " - -
    -
    -
    -

    UserCake

    -

    User Settings

    -
    "; -include("left-nav.php"); - -echo " -
    -
    "; - -echo resultBlock($errors,$successes); - -echo " -
    -
    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -
    -
    -
    -
    -
    - -"; - -?> -- 2.20.1