4 * options.php - Change Password HTML page
6 * Copyright (c) 2004-2005 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
11 * @subpackage change_password
15 define('SM_PATH','../../');
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');
23 // you must load backend configuration here in order to get working change_password_init hook.
24 if (file_exists(SM_PATH
. 'plugins/change_password/backend/'.$cpw_backend.'.php')) {
25 include_once(SM_PATH
. 'plugins/change_password/backend/'.$cpw_backend.'.php');
28 /* the form was submitted, go for it */
29 if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST
)) {
31 /* perform basic checks */
32 $Messages = cpw_check_input();
34 /* if no errors, go ahead with the actual change */
35 if(count($Messages) == 0) {
36 $Messages = cpw_do_change();
40 displayPageHeader($color, 'None');
42 do_hook('change_password_init');
46 <table align
="center" cellpadding
="2" cellspacing
="2" border
="0">
47 <tr
><td bgcolor
="<?php echo $color[0] ?>">
48 <center
><b
><?php
echo _("Change Password") ?
></b
></center
>
51 if (isset($Messages) && count($Messages) > 0) {
53 foreach ($Messages as $line) {
54 echo htmlspecialchars($line) . "<br />\n";
60 <?php
echo addForm($_SERVER['PHP_SELF'], 'post'); ?
>
63 <th align
="right"><?php
echo _("Current Password:")?
></th
>
64 <td
><?php
echo addPwField('cpw_curpass'); ?
></td
>
67 <th align
="right"><?php
echo _("New Password:")?
></th
>
68 <td
><?php
echo addPwField('cpw_newpass'); ?
></td
>
71 <th align
=right
><?php
echo _("Verify New Password:")?
></th
>
72 <td
><?php
echo addPwField('cpw_verify'); ?
></td
>
75 <td align
="center" colspan
="2">
76 <?php
echo addSubmit(_("Change Password"), 'cpw_go'); ?
></td
>