";
- echo "";
- echo "";
-
- for ($i=1; $i <= count($index_order); $i++) {
- switch ($index_order[$i]) {
- case 1: # checkbox
- echo " | ";
- break;
- case 2: # from
- if ($mailbox == $sent_folder)
- echo " ". _("To") ."";
- else
- echo " | ". _("From") ."";
-
- if ($sort == 2)
- echo " ![](\"../images/up_pointer.gif\") | \n";
- else if ($sort == 3)
- echo " \n";
- else
- echo " \n";
- break;
- case 3: # date
- echo " ". _("Date") ."";
- if ($sort == 0)
- echo " ![](\"../images/up_pointer.gif\") | \n";
- else if ($sort == 1)
- echo " \n";
- else
- echo " \n";
- break;
- case 4: # subject
- echo " ". _("Subject") ."\n";
- if ($sort == 4)
- echo " ![](\"../images/up_pointer.gif\") | \n";
- else if ($sort == 5)
- echo " \n";
- else
- echo " \n";
- break;
- case 5: # flags
- echo " | \n";
- break;
- case 6: # size
- echo " " . _("Size")." | \n";
- break;
- }
- }
- echo " ";
-
- while ($j < count($msgs)) {
- printMessageInfo($imapConnection, $msgs[$j]["ID"], 0, $j, $mailbox, "", 0, $search_where, $search_what);
+ }
+ $msgs[$i] = $messages[$j];
+
+ $i++;
+ $j++;
+ }
+ $numMessages = $i;
+
+ /* There's gotta be messages in the array for it to sort them. */
+
+ if (count($messagelist) > 0) {
+ $j=0;
+ if (!isset ($msg)) {
+ $msg = '';
+ }
+
+ mail_message_listing_beginning( $imapConnection,
+ "move_messages.php?msg=$msg&mailbox=$urlMailbox&pos=$pos&where=" . urlencode($search_where) . "&what=".urlencode($search_what),
+ $mailbox,
+ -1,
+ '' . _("Found") . ' ' . count($messagelist) . ' ' . _("messages") . '',
+ get_selectall_link($start_msg, $sort) );
+
+
+ while ($j < count($msgs)) {
+ printMessageInfo($imapConnection, $msgs[$j]["ID"], 0, $j, $mailbox, '', 0, $search_where, $search_what);
$j++;
- }
- echo " ";
- echo " |