Removed extra SMALL tags, they were already incased in a
[squirrelmail.git] / src / read_body.php
index 0f3b214435d44059221170fc5a932cffd562a688..bc4a6aba079f9221876a30aec7edf0b179e7a22d 100644 (file)
@@ -90,10 +90,9 @@ function findPreviousMessage($numMessages, $passed_id) {
     if ($thread_sort_messages || $allow_server_sort ) {
         foreach($server_sort_array as $key=>$value) {
             if ($passed_id == $value) {
-                if ($key == 0) {
-                    break;
+                if ($key != 0) {
+                    $result = $server_sort_array[$key - 1];
                 }
-                $result = $server_sort_array[$key - 1];
                 break;
             }
         }
@@ -623,18 +622,18 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
     // Start form for reply/reply all/forward.. 
     $target = '';
     $on_click='';
-    $method='method="get" ';
+    $method='method="post" ';
     if ($compose_new_win == '1') {
         if ( $javascript_on ) {
           $on_click=' onclick="comp_in_new_form(\''.$comp_uri.'\', this, this.form)"';
           $comp_uri = 'javascript:void(0)';
+          $method='method="get" ';
         } else {
           $target = 'target="_blank"';
-          $method='method="post" ';
         }
     }
 
-    $menu_row .= "\n".'<form name="composeForm" action="'.$comp_uri.'" '.$method.$target.'><small>'."\n";
+    $menu_row .= "\n".'<form name="composeForm" action="'.$comp_uri.'" '.$method.$target.' style="display: inline">'."\n";
 
     // If Draft folder - create Resume link
     if (($mailbox == $draft_folder) && ($save_as_draft)) {
@@ -653,13 +652,13 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
     $menu_row .= getButton('SUBMIT', 'smaction_reply_all', _("Reply All"), $on_click) ."\n";
     $menu_row .= getButton('SUBMIT', 'smaction_forward', _("Forward"), $on_click);
     if ($enable_forward_as_attachment)
-        $menu_row .= '<input type="checkbox" name="smaction_attache">' . _("Attachment") ."\n";
+        $menu_row .= '<input type="checkbox" name="smaction_attache">' . _("As Attachment") .'&nbsp;&nbsp;'."\n";
 
-    $menu_row .= '</form>'.'&nbsp;&nbsp;'."\n";
+    $menu_row .= '</form>&nbsp;';
 
     // Form for deletion
     $delete_url = $base_uri . 'src/delete_message.php?mailbox=' . $urlMailbox;
-    $menu_row .= '<form action="'.$delete_url.'" method="post" style="display: inline"><small>';
+    $menu_row .= '<form action="'.$delete_url.'" method="post" style="display: inline">';
 
     if (!(isset($passed_ent_id) && $passed_ent_id)) {
         $menu_row .= '<input type="hidden" name="message" value="'.$passed_id.'" />';
@@ -677,7 +676,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
     else
       $menu_row .= getButton('SUBMIT', 'delete', _("Delete"), '', FALSE) . "\n"; // delete button is disabled
 
-    $menu_row .= '</form>' . "\n";
+    $menu_row .= '</form>';
 
 
     // Add top move link
@@ -688,13 +687,16 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
 
         // Set subsequent location based on whether or not there is a 'next' message.
         if ( isset($next) && $next >= 0 ) {
-          $location = $base_uri . 'src/read_body.php?passed_id='.$next.'&';
+            $location = $base_uri . 'src/read_body.php?passed_id='.$next.'&';
+        } elseif (isset($prev) && $prev >= 0) {
+            $location = $base_uri . 'src/read_body.php?passed_id='.$prev.'&';
         } else {
-          $location = $base_uri . 'src/right_main.php?';
+            $location = $base_uri . 'src/right_main.php?';
         }
 
-        $menu_row .= '<form action="'.$base_uri.'src/move_messages.php?'.$current_box.'" method="post">'.
+        $menu_row .= '<form action="'.$base_uri.'src/move_messages.php?'.$current_box.'" method="post" style="display: inline">'.
               '<small><input type="hidden" name="show_more" value="0" />'.
+              '<input type="hidden" name="dmn" value="1" />'.
               '<input type="hidden" name="location" value="'.$location.$current_box.'" />'.
               '<input type="hidden" name="msg[0]" value="'.$passed_id.'" />'._("Move to:") .
               '<select name="targetMailbox" style="padding: 0px; margin: 0px">';