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.

prefs.php 931B

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