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