documenting some class params
[squirrelmail.git] / src / left_main.php
index 1272053f74bbab0d948a52ad6349b67272f2f18e..436deb338f609269a92e5ef979f986b4ec3af90f 100644 (file)
@@ -120,9 +120,13 @@ function ListBoxes ($boxes, $j=0 ) {
 
     /* If there are unseen message, bold the line. */
     if (($move_to_trash) && ($mailbox == $trash_folder)) {
-        if (! isset($boxes->total)) {
-            $boxes->total = sqimap_status_messages($imapConnection, $mailbox);
+
+        if ( !is_numeric($boxes->total) ) {
+            $result = sqimap_status_messages($imapConnection, $mailbox);
+            $boxes->total = $result['MESSAGES'];
+            $boxes->unseen = $result['UNSEEN'];
         }
+        
         $pre .= "<a href=\"right_main.php?PG_SHOWALL=0&amp;startMessage=1&amp;mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
         if ($unseen > 0) {
             $pre .= '<b>';
@@ -134,7 +138,7 @@ function ListBoxes ($boxes, $j=0 ) {
             if ($unseen_found) {
                 $end .= "&nbsp;<small>$unseen_string</small>";
             }
-            $end .= "\n\t<small>" .
+            $end .= "\n<small>" .
                  '&nbsp;&nbsp;[<a href="empty_trash.php">'._("Purge").'</a>]'.
                  '</small>';
         }
@@ -679,8 +683,13 @@ if ($advanced_tree) {
    echo '<div id="leftframe"><br /><br />';*/
 }
 
-echo "\n\n" .
-    '<center><font size="4"><b>'. _("Folders") . "</b><br /></font>\n\n";
+echo "\n\n" . html_tag( 'table', '', 'left', '', 'border="0" cellspacing="0" cellpadding="0" width="99%"' ) .
+    html_tag( 'tr' ) .
+    html_tag( 'td', '', 'left' ) .
+    html_tag( 'table', '', '', '', 'border="0" cellspacing="0" cellpadding="0"' ) .
+    html_tag( 'tr' ) .
+    html_tag( 'td', '', 'center' ) .
+    '<font size="4"><b>'. _("Folders") . "</b><br /></font>\n\n";
 
 if ($date_format != 6) {
     /* First, display the clock. */
@@ -723,11 +732,9 @@ if ($date_format != 6) {
 
 /* Next, display the refresh button. */
 echo '<div style="white-space: nowrap;"><small>[<a href="../src/left_main.php" target="left">'.
-     _("Check mail") . "</a>]</small></div></center><br />\n\n";
+     _("Check mail") . "</a>]</small></div></td></tr></table><br />\n\n";
 
 /* Lastly, display the folder list. */
-echo "<center><table><tr><td>\n";
-
 
 if ( $collapse_folders ) {
     /* If directed, collapse or uncollapse a folder. */
@@ -773,10 +780,9 @@ if (isset($advanced_tree) && $advanced_tree) {
     ListBoxes($boxes);
 }
 
-echo "</td></tr></table></center>\n";
-
 do_hook('left_main_after');
 sqimap_logout($imapConnection);
 
 ?>
+</td></tr></table>
 </body></html>