Use form functions in mailbox_display
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 19 Apr 2004 20:52:35 +0000 (20:52 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 19 Apr 2004 20:52:35 +0000 (20:52 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7178 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php

index 4df1e22d955a73d50bf92d6bb7a97092ce1bc8be..b7185e0c5246cd7fe9871e739fd022fa343169cc 100644 (file)
@@ -20,6 +20,7 @@ require_once(SM_PATH . 'class/html.class.php');
 require_once(SM_PATH . 'functions/imap_mailbox.php');
 require_once(SM_PATH . 'functions/imap_messages.php');
 require_once(SM_PATH . 'functions/mime.php');
+require_once(SM_PATH . 'functions/forms.php');
 
 /**
  * default value for page_selector_max
@@ -228,7 +229,6 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox,
     if (!isset($hlt_color)) {
         $hlt_color = $color_string;
     }
-    $checked = ($checkall == 1) ? ' checked' : '';
     $col = 0;
     $msg['SUBJECT'] = str_replace('&nbsp;', ' ', decodeHeader($msg['SUBJECT']));
     $subject = processSubject($msg['SUBJECT'], $indent_array[$msg['ID']]);
@@ -237,7 +237,7 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox,
             switch ($index_order_part) {
             case 1: /* checkbox */
                 echo html_tag( 'td',
-                               "<input type=\"checkbox\" name=\"msg[$t]\" value=\"".$msg['ID']."\"$checked />",
+                              addCheckBox("msg[$t]", $checkall, $msg['ID']), 
                                'center',
                                $hlt_color );
                 break;
@@ -889,10 +889,10 @@ function mail_message_listing_beginning ($imapConnection,
         $location = $php_self;
     }
 
-    $moveFields = '<input type="hidden" name="msg" value="'.htmlspecialchars($msg).'" />' .
-                         '<input type="hidden" name="mailbox" value="'.htmlspecialchars($mailbox).'" />' .
-                         '<input type="hidden" name="startMessage" value="'.htmlspecialchars($start_msg).'" />'.
-                  '<input type="hidden" name="location" value="'.$location.'" />';
+    $moveFields = addHidden('msg', $msg).
+                  addHidden('mailbox', $mailbox).
+                 addHidden('startMessage', $start_msg).
+                 addHidden('location', $location);
 
     /* build thread sorting links */
     if ($allow_thread_sort == TRUE) {
@@ -1591,4 +1591,4 @@ function handleAsSent($mailbox) {
     return $handleAsSent_result;
 }
 
-?>
\ No newline at end of file
+?>