Changed new word for Envelope Options
[squirrelmail.git] / src / read_body.php
index 7dcc7ae31cf0819933de4031f729944847c000fa..2138e904e7355647e88233ed404dcac66f6dd317 100644 (file)
@@ -364,14 +364,13 @@ function formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message,
       }                 
    }
 
-/* BOOKMARK */
    $s  = '<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0"';
    $s .=       ' ALIGN="center" BGCOLOR="' . $color[0] . '">';
    foreach ($env as $key => $val) {
      if ($val) {      
         $s .= '<TR>';
-        $s .=   html_tag('TD', '<B>' . $key . ':&nbsp;&nbsp;</B>', 'RIGHT', '', 'VALIGN="MIDDLE" WIDTH="20%"') . "\n";
-        $s .=   html_tag('TD', $val, 'left', '', 'VALIGN="MIDDLE" WIDTH="80%"') . "\n";
+        $s .=   html_tag('TD', '<B>' . $key . ':&nbsp;&nbsp;</B>', 'RIGHT', '', 'VALIGN="TOP" WIDTH="20%"') . "\n";
+        $s .=   html_tag('TD', $val, 'left', '', 'VALIGN="TOP" WIDTH="80%"') . "\n";
         $s .= '</TR>';
      }
    }
@@ -471,8 +470,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
       }
    }      
 
-   $s .= '</small></td><td align="right" width="33%"><small>';
-
+   $s .= '</small></td><td align="right" width="33%" nowrap><small>';
    $comp_action_uri = $comp_uri . '&amp;action=forward';
    if ($compose_new_win == '1') {
       $s .= '<a href="javascript:void(0)" '. 
@@ -482,6 +480,17 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
    }
    $s .= $topbar_delimiter;
 
+   $comp_action_uri = $comp_uri . '&amp;action=forward_as_attachment';
+   if ($compose_new_win == '1') {
+      $s .= '<a href="javascript:void(0)" '. 
+            'onclick="comp_in_new(\''.$comp_action_uri.'\')">'._("Forward as attachment").'</a>';
+   } else {
+      $s .= '<a href="'.$comp_action_uri.'">'._("Forward as attachment").'</a>';
+   }
+   $s .= $topbar_delimiter;
+
+
+
    $comp_action_uri = decodeHeader($comp_uri . '&amp;action=reply');
    if ($compose_new_win == '1') {
       $s .= '<a href="javascript:void(0)" '. 
@@ -508,19 +517,21 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
    $urlMailbox = urlencode($mailbox);
    $url = $base_uri.'src/view_header.php?'.$QUERY_STRING;
 
-/* BOOKMARK */
    $s  = "<TR>\n";
-   $s .= '<TD VALIGN="MIDDLE" ALIGN="RIGHT"><B>' . _("Other") . ":&nbsp;&nbsp;</B></TD>\n";
-   $s .= '<TD VALIGN="MIDDLE" ALIGN="LEFT"><SMALL>';
+   $s .= '<TD VALIGN="MIDDLE" ALIGN="RIGHT" WIDTH="20%"><B>' . _("Options") . ":&nbsp;&nbsp;</B></TD>\n";
+   $s .= '<TD VALIGN="MIDDLE" ALIGN="LEFT" WIDTH="80%"><SMALL>';
    $s .= '<a href="'.$url.'">'.("View Full Header").'</a>';
 
    /* Output the printer friendly link if we are in subtle mode. */
    $s .= '&nbsp;|&nbsp;';
    $s .= printer_friendly_link($mailbox, $passed_id, $passed_ent_id, $color);
-   $s .= "</SMALL></TD>\n";
-   $s .= "</TR>\n";
    echo $s;
    do_hook("read_body_header_right");
+   $s = "</SMALL></TD>\n";   
+   $s .= "</TR>\n";
+   echo $s;
+
+
 }
 
 
@@ -618,21 +629,46 @@ $msgs[$passed_id]['FLAG_SEEN'] = true;
  
 $messagebody = ''; 
 $ent_ar = $message->findDisplayEntity(array());
-for ($i = 0; $i < count($ent_ar); $i++) {
+$cnt = count($ent_ar);
+for ($i = 0; $i < $cnt; $i++) {
    $messagebody .= formatBody($imapConnection, $message, $color, $wrap_at, $ent_ar[$i], $passed_id, $mailbox);
-   $messagebody .= '<hr noshade size=1>';
+   if ($i != $cnt-1) {
+       $messagebody .= '<hr noshade size=1>';
+   }
 }
 
 displayPageHeader($color, $mailbox);
 do_hook('read_body_top');
 formatMenuBar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response);
 formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee);
-echo '<table width="100%" cellpadding="3" cellspacing="3" align="center"'.
-      ' border="0" bgcolor="'.$color[4].'">';
-echo '<tr><td>'.$messagebody.'</td></tr>';      
-echo '<tr><td>'.formatAttachments($message,$ent_ar,$mailbox, $passed_id).'</td></tr>';      
+echo '<table width="100%" cellpadding="0" cellspacing="5" align="center" border="0">';
+echo '   <tr><td>';
+echo '   <table width="100%" cellpadding="1" cellspacing="0" align="center"'.' border="0" bgcolor="'.$color[9].'">';
+echo '      <tr><td>';
+echo '      <table width="100%" cellpadding="3" cellspacing="0" align="center" border="0">';
+echo '          <tr bgcolor="'.$color[4].'"><td>'.$messagebody. '</td></tr>';      
+echo '      </table></td></tr>';
+echo '   </table>';
+echo '   </td></tr>';
+
+$attachmentsdisplay = formatAttachments($message,$ent_ar,$mailbox, $passed_id);
+if ($attachmentsdisplay) {
+   echo '   <tr><td>';
+   echo '   <table width="100%" cellpadding="1" cellspacing="0" align="center"'.' border="0" bgcolor="'.$color[9].'">';
+   echo '      <tr><td>';
+   echo '      <table width="100%" cellpadding="1" cellspacing="0" align="center" border="0" bgcolor="'.$color[4].'">';
+   echo '         <tr><td ALIGN="left" bgcolor="'.$color[9].'"><b>';
+   echo           _("Attachments").':</b></td></tr><tr><td>';
+   echo '          <table width="100%" cellpadding="2" cellspacing="2" align="center"'.' border="0" bgcolor="'.$color[12].'">';
+   echo             $attachmentsdisplay;
+   echo '         </td></tr></table></table></td></tr>';
+   echo '      </table></td></tr>';
+   echo '   </table>';
+   echo '   </td></tr>';
+}
 echo '</table>';
 
+
 /* show attached images inline -- if pref'fed so */
 if (($attachment_common_show_images) &&
     is_array($attachment_common_show_images_list)) {