Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

changepass.php 986B

123456789101112131415161718192021222324252627282930313233343536
  1. <?PHP
  2. require_once('lib/dashboard.php');
  3. require_once('lib/account.php');
  4. define('TITLE', 'Change password');
  5. addDashboardItem('Useful links', 'Account overview', '');
  6. addDashboardItem('Useful links', 'My account', 'account');
  7. if (isset($_POST['curpass']) && isset($_POST['pass1']) && isset($_POST['pass2'])) {
  8. if ($_POST['pass1'] == $_POST['pass2']) {
  9. if (md5(USER.$_POST['curpass']) == PASS) {
  10. if (($error = validPass($_POST['pass1'])) === true) {
  11. changePass(UID, $_POST['pass1']);
  12. logger::log('Changed password.',logger::information);
  13. define('MESSAGE', 'Password updated.');
  14. } else {
  15. define('MESSAGE', $error);
  16. }
  17. } else {
  18. define('MESSAGE', 'Incorrect password. Please enter your current password.');
  19. }
  20. } else {
  21. define('MESSAGE', 'Your passwords do not match. Please re-enter your new password.');
  22. }
  23. }
  24. require_once('lib/header.php');
  25. require_once('pages/pass.php');
  26. require_once('lib/footer.php');
  27. ?>