Updating strings
[squirrelmail.git] / plugins / change_password / options.php
1 <?php
2
3 /**
4 * options.php - Change Password HTML page
5 *
6 * Copyright (c) 2004-2005 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 // 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');
26 }
27
28 /* the form was submitted, go for it */
29 if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST)) {
30
31 /* perform basic checks */
32 $Messages = cpw_check_input();
33
34 /* if no errors, go ahead with the actual change */
35 if(count($Messages) == 0) {
36 $Messages = cpw_do_change();
37 }
38 }
39
40 displayPageHeader($color, 'None');
41
42 do_hook('change_password_init');
43 ?>
44
45 <br />
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>
49 </td><?php
50
51 if (isset($Messages) && count($Messages) > 0) {
52 echo "<tr><td>\n";
53 foreach ($Messages as $line) {
54 echo htmlspecialchars($line) . "<br />\n";
55 }
56 echo "</td></tr>\n";
57 }
58
59 ?><tr><td>
60 <?php echo addForm($_SERVER['PHP_SELF'], 'post'); ?>
61 <table>
62 <tr>
63 <th align="right"><?php echo _("Current Password:")?></th>
64 <td><?php echo addPwField('cpw_curpass'); ?></td>
65 </tr>
66 <tr>
67 <th align="right"><?php echo _("New Password:")?></th>
68 <td><?php echo addPwField('cpw_newpass'); ?></td>
69 </tr>
70 <tr>
71 <th align=right><?php echo _("Verify New Password:")?></th>
72 <td><?php echo addPwField('cpw_verify'); ?></td>
73 </tr>
74 <tr>
75 <td align="center" colspan="2">
76 <?php echo addSubmit(_("Change Password"), 'cpw_go'); ?></td>
77 </tr>
78 </table>
79 </form>
80 </td></tr>
81 </tr></table>
82 </body></html>