?> <div class="contents"> <h2>Change Password</h2> <?php if (isset($_POST['change_password'])) { $curPass = $_POST['current_password']; $newPass = $_POST['new_password']; $retypePass = $_POST['retype_password']; if ($curPass != null && $newPass != null && $retypePass != null) { if (!\Fr\LS::login("admin", $curPass, false, false)) { echo ser("Login Failed", "Couldn't login to your account to change password."); } else { if ($newPass !== $retypePass) { echo ser("Passwords Doesn't match"), "The passwords you entered didn't match. Try again.</p></p>"; } else { $changePass = \Fr\LS::changePassword($newPass); if ($changePass === true) { echo sss("Password Changed Successfully", "Your password was updated."); } } } } else { echo "<p><h2>Password Fields was blank</h2><p>Form fields were left blank</p></p>"; } } ?> <form action="<?php echo \Lobby::u(); ?> " method='POST'> <label>
<title>Change Password</title> </head> <body> <?php if (isset($_POST['change_password'])) { if (isset($_POST['current_password']) && $_POST['current_password'] != "" && isset($_POST['new_password']) && $_POST['new_password'] != "" && isset($_POST['retype_password']) && $_POST['retype_password'] != "" && isset($_POST['current_password']) && $_POST['current_password'] != "") { $curpass = $_POST['current_password']; $new_password = $_POST['new_password']; $retype_password = $_POST['retype_password']; if ($new_password != $retype_password) { echo "<p><h2>Passwords Doesn't match</h2><p>The passwords you entered didn't match. Try again.</p></p>"; } else { if (\Fr\LS::login(\Fr\LS::getUser("username"), "", false, false) == false) { echo "<h2>Current Password Wrong!</h2><p>The password you entered for your account is wrong.</p>"; } else { $change_password = \Fr\LS::changePassword($new_password); if ($change_password === true) { echo "<h2>Password Changed Successfully</h2>"; } } } } else { echo "<p><h2>Password Fields was blank</h2><p>Form fields were left blank</p></p>"; } } ?> <form action="<?php echo \Fr\LS::curPageURL(); ?> " method='POST'> <label>
<?php \Fr\LS::init(); ?> <!DOCTYPE html> <html> <head> <?php $OP->head("Change Password - Manage Account"); ?> </head> <body> <?php include "{$docRoot}/inc/header.php"; ?> <div class="wrapper"> <div class="content"> <h2>Change Password</h2> <div style="margin:0px auto;width: 60%;"> <?php $status = \Fr\LS::changePassword(); if ($status == "changePasswordForm") { echo "<p>If you have created account with Facebook or Google, leave the current password blank</p>"; } ?> </div> </div> </div> </body> </html>