adding address book block
[squirrelmail.git] / plugins / change_password / options.php
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 * @version $Id$
10 * @package plugins
11 * @subpackage change_password
12 */
13
14 /** @ignore */
15 define('SM_PATH','../../');
16
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');
22
23 /* the form was submitted, go for it */
24 if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST)) {
25
26 /* perform basic checks */
27 $Messages = cpw_check_input();
28
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
37 do_hook('change_password_init');
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>
55 <?php echo addForm($_SERVER['PHP_SELF'], 'POST'); ?>
56 <table>
57 <tr>
58 <th align="right"><?php echo _("Current Password:")?></th>
59 <td><?php echo addPwField('cpw_curpass'); ?></td>
60 </tr>
61 <tr>
62 <th align="right"><?php echo _("New Password:")?></th>
63 <td><?php echo addPwField('cpw_newpass'); ?></td>
64 </tr>
65 <tr>
66 <th align=right><?php echo _("Verify New Password:")?></th>
67 <td><?php echo addPwField('cpw_verify'); ?></td>
68 </tr>
69 <tr>
70 <td align="center" colspan="2">
71 <?php echo addSubmit(_("Change Password"), 'cpw_go'); ?></td>
72 </tr>
73 </table>
74 </form>
75 </td></tr>
76 </tr></table>
77 </body></html>