Use forms.php functions.
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 26 Apr 2004 14:15:20 +0000 (14:15 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 26 Apr 2004 14:15:20 +0000 (14:15 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7258 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/listcommands/mailout.php
plugins/message_details/message_details_top.php

index 986879b9a954e4ccf040407e6d114ef960393aa7..db305b5c0435505fb972847e235add6361a77230 100644 (file)
@@ -19,6 +19,7 @@ include_once(SM_PATH . 'functions/page_header.php');
 include_once(SM_PATH . 'include/load_prefs.php');
 include_once(SM_PATH . 'functions/html.php');
 require_once(SM_PATH . 'functions/identity.php');
 include_once(SM_PATH . 'include/load_prefs.php');
 include_once(SM_PATH . 'functions/html.php');
 require_once(SM_PATH . 'functions/identity.php');
+require_once(SM_PATH . 'functions/forms.php');
 
 displayPageHeader($color, $mailbox);
 
 
 displayPageHeader($color, $mailbox);
 
@@ -50,7 +51,7 @@ case 'unsubscribe':
 
 printf( $out_string, htmlspecialchars($send_to) );
 
 
 printf( $out_string, htmlspecialchars($send_to) );
 
-echo '<form method="post" action="../../src/compose.php">';
+echo addForm('../../src/compose.php', 'POST');
 
 
 $idents = get_identities();
 
 
 $idents = get_identities();
@@ -71,10 +72,11 @@ if (count($idents) > 1) {
 }
 
 echo '<br />'
 }
 
 echo '<br />'
-. '<input type="hidden" name="send_to" value="' . htmlspecialchars($send_to) . '">'
-. '<input type="hidden" name="subject" value="' . htmlspecialchars($subject) . '">'
-. '<input type="hidden" name="body" value="' . htmlspecialchars($body) . '">'
-. '<input type="hidden" name="mailbox" value="' . htmlspecialchars($mailbox) . '">'
-. '<input type="submit" name="send" value="' . _("Send Mail") . '"><br /><br /></center>'
+. addHidden('send_to', $send_to)
+. addHidden('subject', $subject)
+. addHidden('body', $body)
+. addHidden('mailbox', $mailbox)
+. addSubmit(_("Send Mail"), 'send')
+. '<br /><br /></center>'
 . '</form></td></tr></table></p></body></html>';
 ?>
 . '</form></td></tr></table></p></body></html>';
 ?>
index e2808f0ecbaae1f5433fa46b0529309ef08a213c..6a5fe430e36ed7ebaec299dd7e7a241dc2bad2de 100644 (file)
@@ -19,6 +19,7 @@ define('SM_PATH','../../');
 require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/strings.php');
 require_once(SM_PATH . 'config/config.php');
 require_once(SM_PATH . 'include/validate.php');
 require_once(SM_PATH . 'functions/strings.php');
 require_once(SM_PATH . 'config/config.php');
+require_once(SM_PATH . 'functions/forms.php');
 
 displayHtmlHeader( _("Message Details"),
              "<script language=\"javascript\">\n".
 
 displayHtmlHeader( _("Message Details"),
              "<script language=\"javascript\">\n".
@@ -35,14 +36,14 @@ sqgetGlobalVar('mailbox', $mailbox, SQ_GET);
 
 echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
      '<center><b>' .
 
 echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
      '<center><b>' .
-     '<form action="' . SM_PATH . 'src/download.php" method="GET">' .     
+     addForm(SM_PATH . 'src/download.php', 'GET').
+     addHidden('mailbox', $mailbox).
+     addHidden('passed_id', $passed_id).
+     addHidden('ent_id', '0').
+     addHidden('absolute_dl', 'true').
      '<input type="button" value="' . _("Print") . '" onClick="printPopup()" />&nbsp;&nbsp;'.
      '<input type="button" value="' . _("Close Window") . '" onClick="window.parent.close()" />&nbsp;&nbsp;'.
      '<input type="button" value="' . _("Print") . '" onClick="printPopup()" />&nbsp;&nbsp;'.
      '<input type="button" value="' . _("Close Window") . '" onClick="window.parent.close()" />&nbsp;&nbsp;'.
-     '<input type="submit" value="' . _("Save Message") . '" /> '.
-     '<input type="hidden" name="mailbox" value="' . urlencode($mailbox) . '" />' .
-     '<input type="hidden" name="passed_id" value="' . urlencode($passed_id) . '" />' .
-     '<input type="hidden" name="ent_id" value="0" />' .
-     '<input type="hidden" name="absolute_dl" value="true" />' .
+     addSubmit(_("Save Message")).
      '</form>'.
      '</b>'.
      '</body>'.
      '</form>'.
      '</b>'.
      '</body>'.