options.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * options.php - Change Password HTML page
  4. *
  5. * Copyright (c) 2004 The SquirrelMail Project Team
  6. * Licensed under the GNU GPL. For full terms see the file COPYING.
  7. *
  8. * @version $Id$
  9. * @package plugins
  10. * @subpackage change_password
  11. */
  12. /** @ignore */
  13. define('SM_PATH','../../');
  14. require_once (SM_PATH . 'include/validate.php');
  15. require_once (SM_PATH . 'functions/page_header.php');
  16. require_once (SM_PATH . 'plugins/change_password/functions.php');
  17. require_once (SM_PATH . 'plugins/change_password/config.php');
  18. require_once (SM_PATH . 'functions/forms.php');
  19. /* the form was submitted, go for it */
  20. if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST)) {
  21. /* perform basic checks */
  22. $Messages = cpw_check_input();
  23. /* if no errors, go ahead with the actual change */
  24. if(count($Messages) == 0) {
  25. $Messages = cpw_do_change();
  26. }
  27. }
  28. displayPageHeader($color, 'None');
  29. do_hook('change_password_init');
  30. ?>
  31. <br />
  32. <table align="center" cellpadding="2" cellspacing="2" border="0">
  33. <tr><td bgcolor="<?php echo $color[0] ?>">
  34. <center><b><?php echo _("Change Password") ?></b></center>
  35. </td><?php
  36. if (isset($Messages) && count($Messages) > 0) {
  37. echo "<tr><td>\n";
  38. foreach ($Messages as $line) {
  39. echo htmlspecialchars($line) . "<br />\n";
  40. }
  41. echo "</td></tr>\n";
  42. }
  43. ?><tr><td>
  44. <?php echo addForm($_SERVER['PHP_SELF'], 'POST'); ?>
  45. <table>
  46. <tr>
  47. <th align="right"><?php echo _("Current Password:")?></th>
  48. <td><?php echo addPwField('cpw_curpass'); ?></td>
  49. </tr>
  50. <tr>
  51. <th align="right"><?php echo _("New Password:")?></th>
  52. <td><?php echo addPwField('cpw_newpass'); ?></td>
  53. </tr>
  54. <tr>
  55. <th align=right><?php echo _("Verify New Password:")?></th>
  56. <td><?php echo addPwField('cpw_verify'); ?></td>
  57. </tr>
  58. <tr>
  59. <td align="center" colspan="2">
  60. <?php echo addSubmit(_("Change Password"), 'cpw_go'); ?></td>
  61. </tr>
  62. </table>
  63. </form>
  64. </td></tr>
  65. </tr></table>
  66. </body></html>