Better support for malformed/absent dates and headerlines ending in only "\n".
[squirrelmail.git] / plugins / change_password / options.php
1 <?php
2
3 define('SM_PATH','../../');
4
5 include_once (SM_PATH . 'include/validate.php');
6 include_once (SM_PATH . 'functions/page_header.php');
7 include_once (SM_PATH . 'plugins/change_password/functions.php');
8 include_once (SM_PATH . 'plugins/change_password/config.php');
9
10 /* the form was submitted, go for it */
11 if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST)) {
12 /* perform basic checks */
13 $Messages = cpw_check_input();
14 /* if no errors, go ahead with the actual change */
15 if(count($Messages) == 0) {
16 $Messages = cpw_do_change();
17 }
18 }
19
20 displayPageHeader($color, 'None');
21
22 do_hook('change_password_init');
23 ?>
24
25 <br />
26 <table align="center" cellpadding="2" cellspacing="2" border="0">
27 <tr><td bgcolor="<?php echo $color[0] ?>">
28 <center><b><?php echo _("Change Password") ?></b></center>
29 </td><?php
30
31 if (isset($Messages) && count($Messages) > 0) {
32 echo "<tr><td>\n";
33 foreach ($Messages as $line) {
34 echo htmlspecialchars($line) . "<br />\n";
35 }
36 echo "</td></tr>\n";
37 }
38
39 ?><tr><td>
40 <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
41 <table>
42 <tr>
43 <th align="right"><?php echo _("Current Password:")?></th>
44 <td><input type="password" name="cpw_curpass" value="" size="20" /></td>
45 </tr>
46 <tr>
47 <th align="right"><?php echo _("New Password:")?></th>
48 <td><input type="password" name="cpw_newpass" value="" size="20" /></td>
49 </tr>
50 <tr>
51 <th align=right><?php echo _("Verify New Password:")?></th>
52 <td><input type="password" name="cpw_verify" value="" size="20" /></td>
53 </tr>
54 <tr>
55 <td align="center" colspan="2">
56 <input type="submit" name="cpw_go" value="<?php echo _("Change Password") ?>" /></td>
57 </tr>
58 </table>
59 </form>
60 </td></tr>
61 </tr></table>
62 </body></html>