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