4 * options.php - Change Password HTML page
6 * Copyright (c) 2004 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
11 * @subpackage change_password
14 define('SM_PATH','../../');
16 require_once (SM_PATH
. 'include/validate.php');
17 require_once (SM_PATH
. 'functions/page_header.php');
18 require_once (SM_PATH
. 'plugins/change_password/functions.php');
19 require_once (SM_PATH
. 'plugins/change_password/config.php');
20 require_once (SM_PATH
. 'functions/forms.php');
22 /* the form was submitted, go for it */
23 if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST
)) {
25 /* perform basic checks */
26 $Messages = cpw_check_input();
28 /* if no errors, go ahead with the actual change */
29 if(count($Messages) == 0) {
30 $Messages = cpw_do_change();
34 displayPageHeader($color, 'None');
36 do_hook('change_password_init');
40 <table align
="center" cellpadding
="2" cellspacing
="2" border
="0">
41 <tr
><td bgcolor
="<?php echo $color[0] ?>">
42 <center
><b
><?php
echo _("Change Password") ?
></b
></center
>
45 if (isset($Messages) && count($Messages) > 0) {
47 foreach ($Messages as $line) {
48 echo htmlspecialchars($line) . "<br />\n";
54 <?php
echo addForm($_SERVER['PHP_SELF'], 'POST'); ?
>
57 <th align
="right"><?php
echo _("Current Password:")?
></th
>
58 <td
><?php
echo addPwField('cpw_curpass'); ?
></td
>
61 <th align
="right"><?php
echo _("New Password:")?
></th
>
62 <td
><?php
echo addPwField('cpw_newpass'); ?
></td
>
65 <th align
=right
><?php
echo _("Verify New Password:")?
></th
>
66 <td
><?php
echo addPwField('cpw_verify'); ?
></td
>
69 <td align
="center" colspan
="2">
70 <?php
echo addSubmit(_("Change Password"), 'cpw_go'); ?
></td
>