Use form funcs in cpw plugin
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Mar 2004 11:51:50 +0000 (11:51 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Mar 2004 11:51:50 +0000 (11:51 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6980 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/change_password/options.php

index 809aea71803a1b77e829491842859f3f3a040926..04a75440e6dc6c7912d4c139acc9ee1520f01ceb 100644 (file)
 
 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)) {
@@ -50,23 +51,23 @@ 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>