@@ -22,7 +22,7 @@ |
||
| 22 | 22 | <li><a href="myticketbyresolver.php" target="contentFrame">My Resolution</a></li> |
| 23 | 23 | <li><a href="myticketwaitforclosed.php" target="contentFrame">Waiting for Close</a></li> |
| 24 | 24 | <li><a href="ticketlistuser.php" target="contentFrame">View All Opened Tickets</a></li> |
| 25 | - <?php endif;?> |
|
| 25 | + <?php endif; ?> |
|
| 26 | 26 | </ul> |
| 27 | 27 | </div> |
| 28 | 28 | </body> |
@@ -4,16 +4,16 @@ discard block |
||
| 4 | 4 | $user = $users->userdata($_SESSION['loginid']); |
| 5 | 5 | $userid = $user['id']; |
| 6 | 6 | if (isset($_POST['submit'])) {
|
| 7 | - $oldpassword = sha1($_POST['oldpassword']); |
|
| 8 | - $userpassword = $user['password']; |
|
| 9 | - if ($oldpassword != $userpassword) {
|
|
| 10 | - $errors[] = 'The old password does not match!'; |
|
| 11 | - } else {
|
|
| 12 | - $newpassword1 = $_POST['newpassword1']; |
|
| 13 | - $users->changepwd($userid, $newpassword1); |
|
| 14 | - $users->log_users($_SESSION['loginid'], 'Change the old password'); |
|
| 15 | - header('Location: changepwd.php?success');
|
|
| 16 | - } |
|
| 7 | + $oldpassword = sha1($_POST['oldpassword']); |
|
| 8 | + $userpassword = $user['password']; |
|
| 9 | + if ($oldpassword != $userpassword) {
|
|
| 10 | + $errors[] = 'The old password does not match!'; |
|
| 11 | + } else {
|
|
| 12 | + $newpassword1 = $_POST['newpassword1']; |
|
| 13 | + $users->changepwd($userid, $newpassword1); |
|
| 14 | + $users->log_users($_SESSION['loginid'], 'Change the old password'); |
|
| 15 | + header('Location: changepwd.php?success');
|
|
| 16 | + } |
|
| 17 | 17 | } |
| 18 | 18 | ?> |
| 19 | 19 | <!DOCTYPE HTML> |
@@ -73,12 +73,12 @@ discard block |
||
| 73 | 73 | </form> |
| 74 | 74 | <br/> |
| 75 | 75 | <?php |
| 76 | - if (empty($errors) === false) {
|
|
| 77 | - echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>';
|
|
| 78 | - } |
|
| 79 | - if (isset($_GET['success']) && empty($_GET['success'])) {
|
|
| 80 | - echo 'Your password has been changed. Please logout and relogin with the new password.'; |
|
| 81 | - } |
|
| 82 | - ?> |
|
| 76 | + if (empty($errors) === false) {
|
|
| 77 | + echo '<p class=errormsg>'.implode('</p><p class=errormsg>', $errors).'</p>';
|
|
| 78 | + } |
|
| 79 | + if (isset($_GET['success']) && empty($_GET['success'])) {
|
|
| 80 | + echo 'Your password has been changed. Please logout and relogin with the new password.'; |
|
| 81 | + } |
|
| 82 | + ?> |
|
| 83 | 83 | </body> |
| 84 | 84 | </html> |
| 85 | 85 | \ No newline at end of file |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | $userpassword = $user['password']; |
| 9 | 9 | if ($oldpassword != $userpassword) {
|
| 10 | 10 | $errors[] = 'The old password does not match!'; |
| 11 | - } else {
|
|
| 11 | + }else {
|
|
| 12 | 12 | $newpassword1 = $_POST['newpassword1']; |
| 13 | 13 | $users->changepwd($userid, $newpassword1); |
| 14 | 14 | $users->log_users($_SESSION['loginid'], 'Change the old password'); |