瀏覽代碼

Lots of small user interface fixes. Added user option to enable/disable "forward as attachment".

thomppj 23 年之前
父節點
當前提交
80df84b2fc

+ 3 - 1
functions/mailbox_display.php

@@ -448,12 +448,14 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
                                   $msg_cnt_str, $paginator_str, $start_msg);
                                   $msg_cnt_str, $paginator_str, $start_msg);
 
 
   
   
+  echo '<table bgcolor="' . $color[0] . '" border="0" width="100%" cellpadding="1" cellspacing="0"><tr><td>';
   printHeader($mailbox, $srt, $color, !$thread_sort_messages);
   printHeader($mailbox, $srt, $color, !$thread_sort_messages);
 
 
   displayMessageArray($imapConnection, $num_msgs, $start_msg, 
   displayMessageArray($imapConnection, $num_msgs, $start_msg, 
 		      $msort, $mailbox, $sort, $color, $show_num,0,0);
 		      $msort, $mailbox, $sort, $color, $show_num,0,0);
 
 
   mail_message_listing_end($num_msgs, $paginator_str, $msg_cnt_str, $color); 
   mail_message_listing_end($num_msgs, $paginator_str, $msg_cnt_str, $color); 
+  echo '</td></tr></table>';
 		      
 		      
   /**
   /**
    * TODO: Switch to using $_SESSION[] whenever we ditch the 4.0.x series.
    * TODO: Switch to using $_SESSION[] whenever we ditch the 4.0.x series.
@@ -801,7 +803,7 @@ function mail_message_listing_end($num_msgs, $paginator_str, $msg_cnt_str, $colo
 
 
 function printHeader($mailbox, $sort, $color, $showsort=true) {
 function printHeader($mailbox, $sort, $color, $showsort=true) {
   global $index_order;
   global $index_order;
-    echo html_tag( 'table' ,'' , '', $color[9], 'border="0" width="100%" cellpadding="1"  cellspacing="1"' );
+    echo html_tag( 'table' ,'' , '', $color[4], 'border="0" width="100%" cellpadding="1" cellspacing="0"' );
     echo html_tag( 'tr' ,'' , 'center', $color[5] );
     echo html_tag( 'tr' ,'' , 'center', $color[5] );
     for ($i=1; $i <= count($index_order); $i++) {
     for ($i=1; $i <= count($index_order); $i++) {
         switch ($index_order[$i]) {
         switch ($index_order[$i]) {

+ 1 - 1
functions/options.php

@@ -289,7 +289,7 @@ class SquirrelOption {
     }
     }
 
 
     function changed() {
     function changed() {
-        return ($this->value !== $this->new_value);
+        return ($this->value != $this->new_value);
     }
     }
 }
 }
 
 

+ 1 - 1
functions/page_header.php

@@ -235,7 +235,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
             '<a href="http://www.squirrelmail.org/" target="_blank">SquirrelMail</a>');
             '<a href="http://www.squirrelmail.org/" target="_blank">SquirrelMail</a>');
     echo "</td>\n".
     echo "</td>\n".
         "   </tr>\n".
         "   </tr>\n".
-        "</table>\n\n";
+        "</table><br>\n\n";
 }
 }
 
 
 /* blatently copied/truncated/modified from the above function */
 /* blatently copied/truncated/modified from the above function */

+ 2 - 2
plugins/administrator/options.php

@@ -181,7 +181,7 @@ if ( isset( $switch ) ) {
 }
 }
 
 
 echo "<form action=options.php method=post name=options>" .
 echo "<form action=options.php method=post name=options>" .
-    "<br><center><table width=95% bgcolor=\"$color[5]\"><tr><td>".
+    "<center><table width=95% bgcolor=\"$color[5]\"><tr><td>".
     "<table width=100% cellspacing=0 bgcolor=\"$color[4]\">" ,
     "<table width=100% cellspacing=0 bgcolor=\"$color[4]\">" ,
     "<tr bgcolor=\"$color[5]\"><th colspan=2>" . _("Configuration Administrator") . "</th></tr>";
     "<tr bgcolor=\"$color[5]\"><th colspan=2>" . _("Configuration Administrator") . "</th></tr>";
 
 
@@ -511,4 +511,4 @@ if( $fp = @fopen( $cfgfile, 'w' ) ) {
          '</font>';
          '</font>';
 }
 }
 
 
-?>
+?>

+ 1 - 2
plugins/filters/options.php

@@ -64,8 +64,7 @@
    $filters = load_filters();
    $filters = load_filters();
    $filters_user_scan = getPref($data_dir, $username, 'filters_user_scan');
    $filters_user_scan = getPref($data_dir, $username, 'filters_user_scan');
 
 
-   echo '<br>' .
-        html_tag( 'table',
+   echo html_tag( 'table',
             html_tag( 'tr',
             html_tag( 'tr',
                 html_tag( 'td',
                 html_tag( 'td',
                     '<center><b>' . _("Options") . ' -  ' . _("Message Filtering") . '</b></center>' ,
                     '<center><b>' . _("Options") . ' -  ' . _("Message Filtering") . '</b></center>' ,

+ 1 - 2
plugins/newmail/newmail_opt.php

@@ -32,8 +32,7 @@
     // Set $allowsound to false if you don't want sound files available
     // Set $allowsound to false if you don't want sound files available
     $allowsound = "true";
     $allowsound = "true";
 
 
-    echo '<br>' .
-         html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) . "\n" .
+    echo html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="1" cellspacing="0"' ) . "\n" .
              html_tag( 'tr', "\n" .
              html_tag( 'tr', "\n" .
                  html_tag( 'td', '<b>' . _("Options") . ' - ' . _("New Mail Notification") . '</b>', 'center', $color[0] )
                  html_tag( 'td', '<b>' . _("Options") . ' - ' . _("New Mail Notification") . '</b>', 'center', $color[0] )
              ) . "\n" .
              ) . "\n" .

+ 1 - 2
plugins/translate/options.php

@@ -89,8 +89,7 @@
     }
     }
 
 
 ?>
 ?>
-   <br>
-   <table width="100%" align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
+   <table width="95%" align=center border=0 cellpadding=1 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
       <center><b><?php echo _("Options") . ' - '. _("Translator"); ?></b></center>
       <center><b><?php echo _("Options") . ' - '. _("Translator"); ?></b></center>
    </td></tr></table>
    </td></tr></table>
 
 

+ 7 - 5
src/compose.php

@@ -758,7 +758,7 @@ function showInputForm ($session, $values=false) {
     if ($mail_sent == 'yes') {
     if ($mail_sent == 'yes') {
         echo '<BR><CENTER><B>'. _("Your Message has been sent").'</CENTER></B>';
         echo '<BR><CENTER><B>'. _("Your Message has been sent").'</CENTER></B>';
     }
     }
-    echo '<TABLE WIDTH="100%" ALIGN=center CELLSPACING=0 BORDER=0>' . "\n";
+    echo '<TABLE ALIGN=center CELLSPACING=0 BORDER=0>' . "\n";
     if ($compose_new_win == '1') {
     if ($compose_new_win == '1') {
         echo '<TABLE ALIGN=CENTER BGCOLOR="'.$color[0].'" WIDTH="100%" BORDER=0>'."\n";
         echo '<TABLE ALIGN=CENTER BGCOLOR="'.$color[0].'" WIDTH="100%" BORDER=0>'."\n";
         echo '   <TR><TD></TD><TD ALIGN="RIGHT"><INPUT TYPE="BUTTON" NAME="Close" onClick="return self.close()" VALUE='._("Close").'></TD></TR>'."\n";
         echo '   <TR><TD></TD><TD ALIGN="RIGHT"><INPUT TYPE="BUTTON" NAME="Close" onClick="return self.close()" VALUE='._("Close").'></TD></TR>'."\n";
@@ -864,8 +864,10 @@ function showInputForm ($session, $values=false) {
     if ($location_of_buttons == 'bottom') {
     if ($location_of_buttons == 'bottom') {
         showComposeButtonRow();
         showComposeButtonRow();
     } else {
     } else {
-        echo '   <TR><TD COLSPAN=2 ALIGN=LEFT>';
-        echo ' &nbsp; <INPUT TYPE=SUBMIT NAME=send VALUE="' . _("Send") . '"></TD></TR>' . "\n";
+        echo '   <TR><TD COLSPAN=2 ALIGN=RIGHT>';
+        echo '     <INPUT TYPE=SUBMIT NAME=send VALUE="' . _("Send") . '">';
+        echo '     &nbsp;&nbsp;&nbsp;&nbsp;<BR><BR>';
+        echo '   </TD></TR>' . "\n";
     }
     }
 
 
     /* This code is for attachments */
     /* This code is for attachments */
@@ -948,7 +950,7 @@ function showComposeButtonRow() {
         if ($mdn_user_support) {
         if ($mdn_user_support) {
             echo "\n\t". _("Receipt") .': '.
             echo "\n\t". _("Receipt") .': '.
             '<input type="checkbox" name="request_mdn" value=1'.
             '<input type="checkbox" name="request_mdn" value=1'.
-		($request_mdn=='1'?' checked':'') .'>'. _("On read").
+		($request_mdn=='1'?' checked':'') .'>'. _("On Read").
             ' <input type="checkbox" name="request_dr" value=1'.
             ' <input type="checkbox" name="request_dr" value=1'.
 		($request_dr=='1'?' checked':'') .'>'. _("On Delivery");
 		($request_dr=='1'?' checked':'') .'>'. _("On Delivery");
         }
         }
@@ -968,12 +970,12 @@ function showComposeButtonRow() {
         echo "      <input type=submit name=\"html_addr_search\" value=\"".
         echo "      <input type=submit name=\"html_addr_search\" value=\"".
                               _("Addresses")."\">";
                               _("Addresses")."\">";
     }
     }
-    echo "\n    <INPUT TYPE=SUBMIT NAME=send VALUE=\"". _("Send") . "\">\n";
 
 
     if ($save_as_draft) {
     if ($save_as_draft) {
         echo '<input type="submit" name ="draft" value="' . _("Save Draft") . "\">\n";
         echo '<input type="submit" name ="draft" value="' . _("Save Draft") . "\">\n";
     }
     }
 
 
+    echo "\n    <INPUT TYPE=SUBMIT NAME=send VALUE=\"". _("Send") . "\">\n";
     do_hook('compose_button_row');
     do_hook('compose_button_row');
 
 
     echo "   </TD></TR>\n\n";
     echo "   </TD></TR>\n\n";

+ 1 - 1
src/folders.php

@@ -23,7 +23,7 @@ require_once('../functions/html.php');
 displayPageHeader($color, 'None');
 displayPageHeader($color, 'None');
 
 
 echo '<br>' .
 echo '<br>' .
-    html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="2" cellspacing="0" border="0"' ) .
+    html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="1" cellspacing="0" border="0"' ) .
         html_tag( 'tr' ) .
         html_tag( 'tr' ) .
             html_tag( 'td', '', 'center' ) . '<b>' . _("Folders") . '</b>' .
             html_tag( 'td', '', 'center' ) . '<b>' . _("Folders") . '</b>' .
                 html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="5" cellspacing="0" border="0"' ) .
                 html_tag( 'table', '', 'center', '', 'width="100%" cellpadding="5" cellspacing="0" border="0"' ) .

+ 2 - 3
src/help.php

@@ -84,12 +84,11 @@ function get_info($doc, $pos) {
 
 
 
 
 
 
-echo '<br>' .
-    html_tag( 'table',
+echo html_tag( 'table',
         html_tag( 'tr',
         html_tag( 'tr',
             html_tag( 'td','<center><b>' . _("Help") .'</b></center>', 'center', $color[0] )
             html_tag( 'td','<center><b>' . _("Help") .'</b></center>', 'center', $color[0] )
         ) ,
         ) ,
-    'center', '', 'width="95%" cellpadding="2" cellspacing="2" border="0"' );
+    'center', '', 'width="95%" cellpadding="1" cellspacing="2" border="0"' );
 
 
 do_hook("help_top");
 do_hook("help_top");
 
 

+ 4 - 2
src/load_prefs.php

@@ -185,9 +185,11 @@ $location_of_buttons =
 $collapse_folders =
 $collapse_folders =
     getPref($data_dir, $username, 'collapse_folders', SMPREF_ON);
     getPref($data_dir, $username, 'collapse_folders', SMPREF_ON);
 
 
-/* show_html_default is a int value. */
 $show_html_default =
 $show_html_default =
-    intval(getPref($data_dir, $username, 'show_html_default', SMPREF_OFF));
+   getPref($data_dir, $username, 'show_html_default', SMPREF_OFF);
+
+$enable_forward_as_attachment =
+   getPref($data_dir, $username, 'enable_forward_as_attachment', SMPREF_ON);
 
 
 $show_xmailer_default =
 $show_xmailer_default =
     getPref($data_dir, $username, 'show_xmailer_default', SMPREF_OFF );
     getPref($data_dir, $username, 'show_xmailer_default', SMPREF_OFF );

+ 3 - 3
src/options.php

@@ -47,7 +47,8 @@ function process_optionmode_submit($optpage, $optpage_data) {
             /* Remove Debug Mode Until Needed
             /* Remove Debug Mode Until Needed
             echo "name = '$option->name', "
             echo "name = '$option->name', "
                . "value = '$option->value', "
                . "value = '$option->value', "
-               . "new_value = '$option->new_value'<br>\n";
+               . "new_value = '$option->new_value'\n";
+            echo "<br>";
             */
             */
             if ($option->changed()) {
             if ($option->changed()) {
                 $option->save();
                 $option->save();
@@ -202,8 +203,7 @@ if (isset($optpage_name) && ($optpage_name != '')) {
     $optpage_title .= " - $optpage_name";
     $optpage_title .= " - $optpage_name";
 }
 }
 
 
-echo '<br>' .
-    html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="2" cellspacing="0" border="0"' ) . "\n" .
+echo html_tag( 'table', '', 'center', $color[0], 'width="95%" cellpadding="1" cellspacing="0" border="0"' ) . "\n" .
         html_tag( 'tr' ) . "\n" .
         html_tag( 'tr' ) . "\n" .
             html_tag( 'td', '', 'center' ) .
             html_tag( 'td', '', 'center' ) .
                 "<b>$optpage_title</b><br>\n".
                 "<b>$optpage_title</b><br>\n".

+ 17 - 10
src/options_display.php

@@ -195,15 +195,22 @@ function load_optpage_data_display() {
     );
     );
 
 
     $optvals[SMOPT_GRP_MESSAGE][] = array(
     $optvals[SMOPT_GRP_MESSAGE][] = array(
-        'name'    => 'include_self_reply_all',
-        'caption' => _("Include Me in CC when I Reply All"),
+        'name'    => 'enable_forward_as_attachment',
+        'caption' => _("Enable Forward as Attachment"),
         'type'    => SMOPT_TYPE_BOOLEAN,
         'type'    => SMOPT_TYPE_BOOLEAN,
         'refresh' => SMOPT_REFRESH_NONE
         'refresh' => SMOPT_REFRESH_NONE
     );
     );
 
 
     $optvals[SMOPT_GRP_MESSAGE][] = array(
     $optvals[SMOPT_GRP_MESSAGE][] = array(
         'name'    => 'forward_cc',
         'name'    => 'forward_cc',
-        'caption' => _("Include CCs when forwarding messages"),
+        'caption' => _("Include CCs when Forwarding Messages"),
+        'type'    => SMOPT_TYPE_BOOLEAN,
+        'refresh' => SMOPT_REFRESH_NONE
+    );
+
+    $optvals[SMOPT_GRP_MESSAGE][] = array(
+        'name'    => 'include_self_reply_all',
+        'caption' => _("Include Me in CC when I Reply All"),
         'type'    => SMOPT_TYPE_BOOLEAN,
         'type'    => SMOPT_TYPE_BOOLEAN,
         'refresh' => SMOPT_REFRESH_NONE
         'refresh' => SMOPT_REFRESH_NONE
     );
     );
@@ -239,7 +246,7 @@ function load_optpage_data_display() {
     if ($default_use_mdn) {
     if ($default_use_mdn) {
         $optvals[SMOPT_GRP_MESSAGE][] = array(
         $optvals[SMOPT_GRP_MESSAGE][] = array(
             'name'    => 'mdn_user_support',
             'name'    => 'mdn_user_support',
-            'caption' => _("Enable request/confirm reading"),
+            'caption' => _("Enable Mail Delivery Notification"),
             'type'    => SMOPT_TYPE_BOOLEAN,
             'type'    => SMOPT_TYPE_BOOLEAN,
             'refresh' => SMOPT_REFRESH_NONE
             'refresh' => SMOPT_REFRESH_NONE
         );
         );
@@ -247,14 +254,14 @@ function load_optpage_data_display() {
 
 
     $optvals[SMOPT_GRP_MESSAGE][] = array(
     $optvals[SMOPT_GRP_MESSAGE][] = array(
         'name'    => 'compose_new_win',
         'name'    => 'compose_new_win',
-        'caption' => _("Always compose in a new window"),
+        'caption' => _("Compose Messages in New Window"),
         'type'    => SMOPT_TYPE_BOOLEAN,
         'type'    => SMOPT_TYPE_BOOLEAN,
         'refresh' => SMOPT_REFRESH_ALL
         'refresh' => SMOPT_REFRESH_ALL
     );
     );
 
 
     $optvals[SMOPT_GRP_MESSAGE][] = array(
     $optvals[SMOPT_GRP_MESSAGE][] = array(
         'name'    => 'compose_width',
         'name'    => 'compose_width',
-        'caption' => _("Width of compose window"),
+        'caption' => _("Width of Compose Window"),
         'type'    => SMOPT_TYPE_INTEGER,
         'type'    => SMOPT_TYPE_INTEGER,
         'refresh' => SMOPT_REFRESH_ALL,
         'refresh' => SMOPT_REFRESH_ALL,
         'size'    => SMOPT_SIZE_TINY
         'size'    => SMOPT_SIZE_TINY
@@ -262,7 +269,7 @@ function load_optpage_data_display() {
 
 
     $optvals[SMOPT_GRP_MESSAGE][] = array(
     $optvals[SMOPT_GRP_MESSAGE][] = array(
         'name'    => 'compose_height',
         'name'    => 'compose_height',
-        'caption' => _("Height of compose window"),
+        'caption' => _("Height of Compose Window"),
         'type'    => SMOPT_TYPE_INTEGER,
         'type'    => SMOPT_TYPE_INTEGER,
         'refresh' => SMOPT_REFRESH_ALL,
         'refresh' => SMOPT_REFRESH_ALL,
         'size'    => SMOPT_SIZE_TINY
         'size'    => SMOPT_SIZE_TINY
@@ -270,21 +277,21 @@ function load_optpage_data_display() {
 
 
     $optvals[SMOPT_GRP_MESSAGE][] = array(
     $optvals[SMOPT_GRP_MESSAGE][] = array(
         'name'    => 'sig_first',
         'name'    => 'sig_first',
-        'caption' => _("Append signature before reply/forward text"),
+        'caption' => _("Append Signature before Reply/Forward Text"),
         'type'    => SMOPT_TYPE_BOOLEAN,
         'type'    => SMOPT_TYPE_BOOLEAN,
         'refresh' => SMOPT_REFRESH_NONE
         'refresh' => SMOPT_REFRESH_NONE
     );
     );
 
 
     $optvals[SMOPT_GRP_MESSAGE][] = array(
     $optvals[SMOPT_GRP_MESSAGE][] = array(
         'name'    => 'internal_date_sort',
         'name'    => 'internal_date_sort',
-        'caption' => _("Use receive date for sort"),
+        'caption' => _("Enable Sort by of Receive Date"),
         'type'    => SMOPT_TYPE_BOOLEAN,
         'type'    => SMOPT_TYPE_BOOLEAN,
         'refresh' => SMOPT_REFRESH_ALL
         'refresh' => SMOPT_REFRESH_ALL
     );
     );
     if ($allow_thread_sort == TRUE) {
     if ($allow_thread_sort == TRUE) {
         $optvals[SMOPT_GRP_MESSAGE][] = array(
         $optvals[SMOPT_GRP_MESSAGE][] = array(
             'name'    => 'sort_by_ref',
             'name'    => 'sort_by_ref',
-            'caption' => _("Use References header for thread sort"),
+            'caption' => _("Enable Thread Sort by References Header"),
             'type'    => SMOPT_TYPE_BOOLEAN,
             'type'    => SMOPT_TYPE_BOOLEAN,
             'refresh' => SMOPT_REFRESH_ALL
             'refresh' => SMOPT_REFRESH_ALL
         );
         );

+ 5 - 6
src/options_highlight.php

@@ -58,14 +58,13 @@ if ($action == 'delete' && isset($theid)) {
 }
 }
 displayPageHeader($color, 'None');
 displayPageHeader($color, 'None');
 
 
-echo '<br>' .
+echo
 html_tag( 'table', "\n" .
 html_tag( 'table', "\n" .
     html_tag( 'tr', "\n" .
     html_tag( 'tr', "\n" .
-        html_tag( 'td', '<center><b>' . _("Options") . ' - ' . _("Message Highlighting") . '</b></center>',
-        'left', $color[0] )
-    ) ,
-'center', '', 'width="95% border="0" cellpadding="2" cellspacing="0"' ) . "<br>\n" .
-html_tag( 'table', '', '', '', 'width="100% border="0" cellpadding="0" cellspacing="0"' ) . 
+        html_tag( 'td', '<center><b>' . _("Options") . ' - ' . _("Message Highlighting") . '</b></center>', 'left')
+    ),
+    'center', $color[9], 'width="95% border="0" cellpadding="1" cellspacing="0"' ) . "<br>\n" .
+html_tag( 'table', '', '', '', 'width="100% border="0" cellpadding="1" cellspacing="0"' ) . 
      html_tag( 'tr' ) . "\n" .
      html_tag( 'tr' ) . "\n" .
          html_tag( 'td', '', 'left' );
          html_tag( 'td', '', 'left' );
 
 

+ 3 - 3
src/options_order.php

@@ -25,12 +25,12 @@ if ($action == 'delete' && isset($theid)) {
 } 
 } 
 displayPageHeader($color, 'None');
 displayPageHeader($color, 'None');
 
 
-   echo '<br>' . 
-   html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) . 
+   echo
+   html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="1" cellspacing="0"' ) . 
    html_tag( 'tr' ) . 
    html_tag( 'tr' ) . 
    html_tag( 'td', '', 'center', $color[0] ) .
    html_tag( 'td', '', 'center', $color[0] ) .
    '<b>' . _("Options") . ' - ' . _("Index Order") . '</b>' .
    '<b>' . _("Options") . ' - ' . _("Index Order") . '</b>' .
-   html_tag( 'table', '', '', '', 'width="100%" border="0" cellpadding="1" cellspacing="1"' ) . 
+   html_tag( 'table', '', '', '', 'width="100%" border="0" cellpadding="8" cellspacing="0"' ) . 
    html_tag( 'tr' ) . 
    html_tag( 'tr' ) . 
    html_tag( 'td', '', 'center', $color[4] );
    html_tag( 'td', '', 'center', $color[4] );
  
  

+ 1 - 1
src/printer_friendly_bottom.php

@@ -88,7 +88,7 @@ displayHtmlHeader( _("Printer Friendly"), '', FALSE );
 
 
 echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
 echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
      /* headers (we use table because translations are not all the same width) */
      /* headers (we use table because translations are not all the same width) */
-     html_tag( 'table', '', '', '', 'width="100%" cellspacing="0" cellpadding="0" border="0"' ) .
+     html_tag( 'table', '', 'center', '', 'cellspacing="0" cellpadding="0" border="0"' ) .
      html_tag( 'tr',
      html_tag( 'tr',
          html_tag( 'td', _("From").'&nbsp;', 'left' ,'','valign="top"') .
          html_tag( 'td', _("From").'&nbsp;', 'left' ,'','valign="top"') .
          html_tag( 'td', htmlentities($from), 'left' )
          html_tag( 'td', htmlentities($from), 'left' )

+ 3 - 3
src/printer_friendly_top.php

@@ -30,16 +30,16 @@ displayHtmlHeader( _("Printer Friendly"),
              "</script>\n", FALSE );
              "</script>\n", FALSE );
 
 
 
 
-echo "<body text=\"$color[8]\" bgcolor=\"$color[3]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\">\n" .
+echo "<body text='$color[8]' bgcolor='$color[3]' link='$color[7]' vlink='$color[7]' alink='$color[7]'>\n" .
      //'<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"><tr><td valign="middle" align="center">'.
      //'<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0"><tr><td valign="middle" align="center">'.
      html_tag( 'div',
      html_tag( 'div',
          '<b>'.
          '<b>'.
          '<form>'.
          '<form>'.
          '<input type="button" value="' . _("Print") . '" onClick="printPopup()"> '.
          '<input type="button" value="' . _("Print") . '" onClick="printPopup()"> '.
-         '<input type="button" value="' . _("Close Window") . '" onClick="window.parent.close()">'.
+         '<input type="button" value="' . _("Close") . '" onClick="window.parent.close()">'.
          '</form>'.
          '</form>'.
          '</b>',
          '</b>',
-     'center' );
+     'right' );
      //'</td></tr></table>'.
      //'</td></tr></table>'.
      '</body></html>'. "\n";
      '</body></html>'. "\n";
 
 

+ 52 - 53
src/read_body.php

@@ -48,14 +48,12 @@ function findNextMessage($passed_id) {
                 break; 
                 break; 
             }
             }
         }
         }
-    } 
-    elseif ($sort == 6 && !$allow_server_sort  &&
+    } else if ($sort == 6 && !$allow_server_sort  &&
             !$thread_sort_messages ) {
             !$thread_sort_messages ) {
         if ($passed_id != 1) {
         if ($passed_id != 1) {
             $result = $passed_id - 1;
             $result = $passed_id - 1;
         }
         }
-    }
-    elseif (!$allow_server_sort  && !$thread_sort_messages ) {
+    } else if (!$allow_server_sort  && !$thread_sort_messages ) {
         if (!is_array($msort)) {
         if (!is_array($msort)) {
             return -1;
             return -1;
         }
         }
@@ -95,14 +93,12 @@ function findPreviousMessage($numMessages, $passed_id) {
                 break;
                 break;
             }
             }
         }
         }
-    }
-    elseif ($sort == 6 && !$allow_server_sort  && 
+    } else if ($sort == 6 && !$allow_server_sort  && 
             !$thread_sort_messages) {
             !$thread_sort_messages) {
         if ($passed_id != $numMessages) {
         if ($passed_id != $numMessages) {
             $result = $passed_id + 1;
             $result = $passed_id + 1;
         }
         }
-    } 
-    elseif (!$thread_sort_messages  && !$allow_server_sort) {
+    } else if (!$thread_sort_messages  && !$allow_server_sort) {
         if (!is_array($msort)) {
         if (!is_array($msort)) {
             return -1;
             return -1;
         }
         }
@@ -111,7 +107,7 @@ function findPreviousMessage($numMessages, $passed_id) {
                 prev($msort);
                 prev($msort);
                 $key = key($msort);
                 $key = key($msort);
                 if (isset($key)) {
                 if (isset($key)) {
-		    echo $msort[$key];
+		    //echo $msort[$key];   /* Why again were we echoing here? */
                     $result = $msgs[$key]['ID'];
                     $result = $msgs[$key]['ID'];
                     break;
                     break;
                 }
                 }
@@ -384,7 +380,8 @@ function formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message,
 
 
 function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response) {
 function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response) {
    global $base_uri, $sent_folder, $draft_folder, $where, $what, $color, $sort,
    global $base_uri, $sent_folder, $draft_folder, $where, $what, $color, $sort,
-          $startMessage, $compose_new_win, $PHP_SELF, $save_as_draft;
+          $startMessage, $compose_new_win, $PHP_SELF, $save_as_draft,
+          $enable_forward_as_attachment;
 
 
    $topbar_delimiter = '&nbsp;|&nbsp;';
    $topbar_delimiter = '&nbsp;|&nbsp;';
    $urlMailbox = urlencode($mailbox);
    $urlMailbox = urlencode($mailbox);
@@ -403,7 +400,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
    }
    }
    $s .= '<a href="'. $msgs_url.'">'.$msgs_str.'</a>';
    $s .= '<a href="'. $msgs_url.'">'.$msgs_str.'</a>';
    $s .= $topbar_delimiter;
    $s .= $topbar_delimiter;
-   
+
    $delete_url = $base_uri . 'src/delete_message.php?mailbox='.$urlMailbox.
    $delete_url = $base_uri . 'src/delete_message.php?mailbox='.$urlMailbox.
               '&amp;message='.$passed_id.'&amp;';
               '&amp;message='.$passed_id.'&amp;';
    if (!(isset($passed_ent_id) && $passed_ent_id)) {
    if (!(isset($passed_ent_id) && $passed_ent_id)) {
@@ -482,15 +479,16 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp
    }
    }
    $s .= $topbar_delimiter;
    $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>';
+   if ($enable_forward_as_attachment) {
+      $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;
    }
    }
-   $s .= $topbar_delimiter;
-
 
 
 
 
    $comp_action_uri = decodeHeader($comp_uri . '&amp;action=reply');
    $comp_action_uri = decodeHeader($comp_uri . '&amp;action=reply');
@@ -536,10 +534,9 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
 
 
 }
 }
 
 
-
-/*
- *   Main of read_boby.php  --------------------------------------------------
- */
+/***************************/
+/*   Main of read_boby.php */
+/***************************/
 
 
 /*
 /*
     Urled vars
     Urled vars
@@ -553,9 +550,7 @@ if (isset($mailbox)) {
     $mailbox = urldecode( $mailbox );
     $mailbox = urldecode( $mailbox );
 }
 }
 
 
-$imapConnection = sqimap_login($username, $key, $imapServerAddress, 
-                               $imapPort, 0);
-
+$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
 $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);
 $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true);
 
 
 if (!isset($messages)) {
 if (!isset($messages)) {
@@ -600,11 +595,9 @@ $header = $message->header;
 
 
 do_hook('html_top');
 do_hook('html_top');
 
 
-/* ============================================================================= 
- *   block for handling incoming url vars 
- *
- * =============================================================================
- */
+/****************************************/
+/* Block for handling incoming url vars */
+/****************************************/
 
 
 if (isset($sendreceipt)) {
 if (isset($sendreceipt)) {
    if ( !$message->is_mdnsent ) {
    if ( !$message->is_mdnsent ) {
@@ -627,11 +620,10 @@ if (isset($sendreceipt)) {
       ClearAttachments();
       ClearAttachments();
    }
    }
 }
 }
-/* ============================================================================= 
- *   end block for handling incoming url vars 
- *
- * =============================================================================
- */
+/***********************************************/
+/* End of block for handling incoming url vars */
+/***********************************************/
+
 $msgs[$passed_id]['FLAG_SEEN'] = true;
 $msgs[$passed_id]['FLAG_SEEN'] = true;
  
  
 $messagebody = ''; 
 $messagebody = ''; 
@@ -652,30 +644,37 @@ for ($i = 0; $i < $cnt; $i++) {
 displayPageHeader($color, $mailbox);
 displayPageHeader($color, $mailbox);
 formatMenuBar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response);
 formatMenuBar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_response);
 formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee);
 formatEnvheader($mailbox, $passed_id, $passed_ent_id, $message, $color, $FirstTimeSee);
-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 '<table width="100%" cellpadding="0" cellspacing="0" 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 '      <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>';
+echo '        <table width="100%" cellpadding="3" cellspacing="0" align="center" border="0">';
+echo '          <tr bgcolor="'.$color[4].'"><td>';
+echo '            <table cellpadding="0" cellspacing="0" align="center" border="0">';
+echo '              <tr><td><br>' . $messagebody . '</td></td>';
+echo '            </table>';
+echo '          </td></tr>';      
+echo '        </table></td></tr>';
+echo '      </table>';
+echo '    </td></tr>';
 
 
 $attachmentsdisplay = formatAttachments($message,$ent_ar,$mailbox, $passed_id);
 $attachmentsdisplay = formatAttachments($message,$ent_ar,$mailbox, $passed_id);
 if ($attachmentsdisplay) {
 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[9].'">';
    echo '      <tr><td>';
    echo '      <tr><td>';
    echo '      <table width="100%" cellpadding="1" cellspacing="0" align="center" border="0" bgcolor="'.$color[4].'">';
    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[0].'">';
-   echo             $attachmentsdisplay;
-   echo '         </td></tr></table></table></td></tr>';
+   echo '        <tr><td ALIGN="left" bgcolor="'.$color[9].'">';
+   echo '           <b>' . _("Attachments") . ':</b>';
+   echo '        </td></tr>';
+   echo '        <tr><td>';
+   echo '          <table width="100%" cellpadding="2" cellspacing="2" align="center"'.' border="0" bgcolor="'.$color[0].'"><tr><td>';
+   echo              $attachmentsdisplay;
+   echo '          </td></tr></table>';
+   echo '        </table></td></tr>';
    echo '      </table></td></tr>';
    echo '      </table></td></tr>';
-   echo '   </table>';
-   echo '   </td></tr>';
+   echo '    </table>';
+   echo '  </td></tr>';
 }
 }
 echo '</table>';
 echo '</table>';
 
 

+ 0 - 1
src/right_main.php

@@ -112,7 +112,6 @@ if (isset($composenew) && $composenew) {
 } else {
 } else {
     displayPageHeader($color, $mailbox);
     displayPageHeader($color, $mailbox);
 }
 }
-echo "<br>\n";
 do_hook('right_main_after_header');
 do_hook('right_main_after_header');
 if (isset($note)) {
 if (isset($note)) {
     echo html_tag( 'div', '<b>' . $note .'</b>', 'center' ) . "<br>\n";
     echo html_tag( 'div', '<b>' . $note .'</b>', 'center' ) . "<br>\n";

+ 1 - 2
src/search.php

@@ -240,8 +240,7 @@ elseif ($submit == 'delete') {
 
 
 do_hook('search_before_form');
 do_hook('search_before_form');
 
 
-echo "<br>\n".
-     html_tag( 'table',
+echo html_tag( 'table',
          html_tag( 'tr', "\n" .
          html_tag( 'tr', "\n" .
              html_tag( 'td', '<b>' . _("Search") . '</b>', 'center', $color[0] )
              html_tag( 'td', '<b>' . _("Search") . '</b>', 'center', $color[0] )
          ) ,
          ) ,