Use form functions on login.php
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Mar 2004 11:47:15 +0000 (11:47 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Mar 2004 11:47:15 +0000 (11:47 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6979 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/login.php

index f124cceffd643560d7527d6b57527291683c1745..0c17a2641c25651fe6cba03c4f56cc203fa8155f 100644 (file)
@@ -26,6 +26,7 @@ require_once(SM_PATH . 'functions/page_header.php');
 require_once(SM_PATH . 'functions/html.php');
 require_once(SM_PATH . 'functions/global.php');
 require_once(SM_PATH . 'functions/imap_general.php');
 require_once(SM_PATH . 'functions/html.php');
 require_once(SM_PATH . 'functions/global.php');
 require_once(SM_PATH . 'functions/imap_general.php');
+require_once(SM_PATH . 'functions/forms.php');
 
 /**
  * $squirrelmail_language is set by a cookie when the user selects
 
 /**
  * $squirrelmail_language is set by a cookie when the user selects
@@ -120,7 +121,7 @@ if (isset($org_logo) && $org_logo) {
 }
 
 if(sqgetGlobalVar('mailto', $mailto)) {
 }
 
 if(sqgetGlobalVar('mailto', $mailto)) {
-    $rcptaddress = '<input type="hidden" name="mailto" value="' . urlencode($mailto) . '" />' . "\n";
+    $rcptaddress = addHidden('mailto', $mailto);
 } else {
     $rcptaddress = '';
 }
 } else {
     $rcptaddress = '';
 }
@@ -150,7 +151,7 @@ echo html_tag( 'table',
                                     _("Name:") ,
                                 'right', '', 'width="30%"' ) .
                                 html_tag( 'td',
                                     _("Name:") ,
                                 'right', '', 'width="30%"' ) .
                                 html_tag( 'td',
-                                    '<input type="text" name="' . $username_form_name .'" value="' . $loginname_value .'" />' ,
+                                   addInput($username_form_name, $loginname_value),
                                 'left', '', 'width="*"' )
                                 ) . "\n" .
                             html_tag( 'tr',
                                 'left', '', 'width="*"' )
                                 ) . "\n" .
                             html_tag( 'tr',
@@ -158,10 +159,10 @@ echo html_tag( 'table',
                                     _("Password:") ,
                                 'right', '', 'width="30%"' ) .
                                 html_tag( 'td',
                                     _("Password:") ,
                                 'right', '', 'width="30%"' ) .
                                 html_tag( 'td',
-                                    '<input type="password" name="' . $password_form_name . '" />' . "\n" .
-                                    '<input type="hidden" name="js_autodetect_results" value="'.SMPREF_JS_OFF.'" />' . "\n" .
+                                   addPwField($password_form_name).
+                                   addHidden('js_autodetect_results', SMPREF_JS_OFF).
                                     $rcptaddress .
                                     $rcptaddress .
-                                    '<input type="hidden" name="just_logged_in" value="1" />' . "\n",
+                                   addHidden('just_logged_in', '1'),
                                 'left', '', 'width="*"' )
                             ) ,
                         'center', $color[4], 'border="0" width="100%"' ) ,
                                 'left', '', 'width="*"' )
                             ) ,
                         'center', $color[4], 'border="0" width="100%"' ) ,
@@ -169,7 +170,7 @@ echo html_tag( 'table',
                 ) . 
                 html_tag( 'tr',
                     html_tag( 'td',
                 ) . 
                 html_tag( 'tr',
                     html_tag( 'td',
-                        '<center><input type="submit" value="' . _("Login") . '" /></center>',
+                        '<center>'. addSubmit(_("Login")) .'</center>',
                     'left' )
                 ),
             '', $color[4], 'border="0" width="350"' ) . '</center>',
                     'left' )
                 ),
             '', $color[4], 'border="0" width="350"' ) . '</center>',