X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fleft_main.php;h=436deb338f609269a92e5ef979f986b4ec3af90f;hb=9ed801576fc2cfc3859e8bcbc3a5441be5610f74;hp=79aa3da2290ababf3140ba4e6b5a095b897eda43;hpb=d3018c7beb7d7638f775ee4ff006ec107c645418;p=squirrelmail.git diff --git a/src/left_main.php b/src/left_main.php index 79aa3da2..436deb33 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -57,8 +57,7 @@ function ListBoxes ($boxes, $j=0 ) { $unseen = 0; $mailbox = $boxes->mailboxname_full; - $leader = ''; - $leader .= str_repeat('  ',$j); + $leader = str_repeat('  ',$j); $mailboxURL = urlencode($mailbox); /* get unseen/total messages information */ @@ -102,28 +101,32 @@ function ListBoxes ($boxes, $j=0 ) { $link = '$leader '; + $link .= "unfold=$mailboxURL\">$leader '; } else { - $link .= "unfold=$mailboxURL\">$leader+ "; + $link .= "unfold=$mailboxURL\">$leader+ "; } } else { if ($use_icons && $icon_theme != 'none') { - $link .= "fold=$mailboxURL\">$leader '; + $link .= "fold=$mailboxURL\">$leader '; } else { - $link .= "fold=$mailboxURL\">$leader- "; + $link .= "fold=$mailboxURL\">$leader- "; } } $link .= ''; $pre .= $link; } else { - $pre.= $leader . '  '; + $pre.= $leader . '  '; } /* 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 .= ""; if ($unseen > 0) { $pre .= ''; @@ -135,7 +138,7 @@ function ListBoxes ($boxes, $j=0 ) { if ($unseen_found) { $end .= " $unseen_string"; } - $end .= "\n\t" . + $end .= "\n" . '  ['._("Purge").']'. ''; } @@ -164,7 +167,7 @@ function ListBoxes ($boxes, $j=0 ) { $font = ""; $fontend = ''; } - + // let plugins fiddle with end of line $end .= concat_hook_function('left_main_after_each_folder', array(isset($numMessages) ? $numMessages : '', @@ -174,7 +177,7 @@ function ListBoxes ($boxes, $j=0 ) { if (!$boxes->is_root) { echo "" . $pre .$font. - str_replace( + str_replace( array(' ','<','>'), array(' ','<','>'), $boxes->mailboxname_sub) . @@ -294,13 +297,13 @@ function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) { } else { $folder_img = '../images/folder.png'; } - $folder_img = '  '; + $folder_img = '  '; } else { $folder_img = ''; } if (!isset($boxes->mbxs[0])) { echo ' ' . html_tag( 'div', - ''. $pre . $folder_img . '' . + $pre . $folder_img . str_replace( array(' ','<','>'), array(' ','<','>'), $boxes->mailboxname_sub) . @@ -403,226 +406,235 @@ if (empty($advanced_tree)) { } if ($advanced_tree) { -$xtra .= ''."\n"; +$xtra .= << 35) { + new_col_width = parseInt(RegExp.$1) - 25; + } + } + masterf.cols = calc_col(new_col_width); + } +//--> + + +HEREDOC; /* style definitions */ -$xtra .= ''."\n"; +$xtra .= << + + + +HEREDOC; } displayHtmlHeader( 'SquirrelMail', $xtra ); @@ -671,8 +683,13 @@ if ($advanced_tree) { echo '


';*/ } -echo "\n\n" . - '
'. _("Folders") . "
\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' ) . + ''. _("Folders") . "
\n\n"; if ($date_format != 6) { /* First, display the clock. */ @@ -708,16 +725,17 @@ if ($date_format != 6) { } $clk = str_replace(' ',' ',$clk); - echo '' - . str_replace(' ', ' ', _("Last Refresh")) + echo '' + . str_replace(' ', ' ', _("Last Refresh")) . ":
$clk

\n"; } /* Next, display the refresh button. */ echo '

\n\n"; + _("Check mail") . "]

\n\n"; /* Lastly, display the folder list. */ + if ( $collapse_folders ) { /* If directed, collapse or uncollapse a folder. */ if (isset($fold)) { @@ -750,15 +768,13 @@ if (empty($unseen_notify)) { $boxes = sqimap_mailbox_tree($imapConnection); if (isset($advanced_tree) && $advanced_tree) { echo '
'; + 'enctype="multipart/form-data">'."\n"; echo '

'; echo '
'."\n\n"; sqgetGlobalVar('mbx', $mbx, SQ_POST); if (!isset($mbx)) $mbx=NULL; ListAdvancedBoxes($boxes, $mbx); echo '
'; - echo '
'; echo '
'."\n"; } else { ListBoxes($boxes); @@ -768,4 +784,5 @@ do_hook('left_main_after'); sqimap_logout($imapConnection); ?> +