Replacing tabs with spaces, trimming white space at EOL and newline at EOF
[squirrelmail.git] / plugins / change_password / options.php
index c1ee8c7e6c2a1098df7c86d2b9c5d5f2fdcc98fe..4f254b0eca6d152254daa0a0c3806e6dcba26a19 100644 (file)
@@ -1,16 +1,31 @@
 <?php
 
+/**
+ * options.php - Change Password HTML page
+ *
+ * Copyright (c) 2004 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * @version $Id$
+ * @package plugins
+ * @subpackage change_password
+ */
+
+/** @ignore */
 define('SM_PATH','../../');
 
-include_once (SM_PATH . 'include/validate.php');
-include_once (SM_PATH . 'functions/page_header.php');
-include_once (SM_PATH . 'plugins/change_password/functions.php');
-include_once (SM_PATH . 'plugins/change_password/config.php');
+require_once (SM_PATH . 'include/validate.php');
+require_once (SM_PATH . 'functions/page_header.php');
+require_once (SM_PATH . 'plugins/change_password/functions.php');
+require_once (SM_PATH . 'plugins/change_password/config.php');
+require_once (SM_PATH . 'functions/forms.php');
 
 /* the form was submitted, go for it */
 if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST)) {
+
     /* perform basic checks */
     $Messages = cpw_check_input();
+
     /* if no errors, go ahead with the actual change */
     if(count($Messages) == 0) {
         $Messages = cpw_do_change();
@@ -37,26 +52,26 @@ if (isset($Messages) && count($Messages) > 0) {
 }
 
 ?><tr><td>
-    <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
+    <?php echo addForm($_SERVER['PHP_SELF'], 'POST'); ?>
     <table>
       <tr>
         <th align="right"><?php echo _("Current Password:")?></th>
-        <td><input type="password" name="cpw_curpass" value="" size="20" /></td>
+        <td><?php echo addPwField('cpw_curpass'); ?></td>
       </tr>
       <tr>
         <th align="right"><?php echo _("New Password:")?></th>
-        <td><input type="password" name="cpw_newpass" value="" size="20" /></td>
+        <td><?php echo addPwField('cpw_newpass'); ?></td>
       </tr>
       <tr>
         <th align=right><?php echo _("Verify New Password:")?></th>
-        <td><input type="password" name="cpw_verify" value="" size="20" /></td>
+        <td><?php echo addPwField('cpw_verify'); ?></td>
       </tr>
       <tr>
         <td align="center" colspan="2">
-        <input type="submit" name="cpw_go" value="<?php echo _("Change Password") ?>" /></td>
+        <?php echo addSubmit(_("Change Password"), 'cpw_go'); ?></td>
       </tr>
     </table>
     </form>
 </td></tr>
 </tr></table>
-</body></html>
+</body></html>
\ No newline at end of file