';
+}
-$boxes = sqimap_mailbox_list($imapConnection);
-
-echo '
'. _("Folders") . "
\n\n";
+echo "\n\n" . html_tag( 'table', '', '', '', 'border="0" cellspacing="0" cellpadding="0" width="100%"' ) .
+ html_tag( 'tr' ) .
+ html_tag( 'td', '', 'left' ) .
+ ''. _("Folders") . "
\n\n";
if ($date_format != 6) {
/* First, display the clock. */
@@ -287,17 +780,17 @@ if ($date_format != 6) {
$clk = date($hr, time());
break;
default:
- $clk = date('D, '.$hr, time());
+ $clk = substr( getDayName( date( 'w', time() ) ), 0, 3 ) . date( ', ' . $hr, time() );
}
$clk = str_replace(' ',' ',$clk);
- echo '' . str_replace(' ',' ',_("Last Refresh")) .
- ": $clk";
+ echo '' . str_replace(' ',' ',_("Last Refresh")) .
+ ": $clk";
}
/* Next, display the refresh button. */
-echo '('.
- _("refresh folder list") . ')
';
+echo '('.
+ _("refresh folder list") . ')';
/* Lastly, display the folder list. */
if ( $collapse_folders ) {
@@ -309,17 +802,22 @@ if ( $collapse_folders ) {
}
}
+if ($oldway) { /* normal behaviour SM */
+
+$boxes = sqimap_mailbox_list($imapConnection);
/* Prepare do do out collapsedness and visibility computation. */
$curbox = 0;
$boxcount = count($boxes);
/* Compute the collapsedness and visibility of each box. */
+
while ($curbox < $boxcount) {
$boxes[$curbox]['visible'] = TRUE;
compute_folder_children($curbox, $boxcount);
}
-for ($i = 0;$i < count($boxes); $i++) {
+
+for ($i = 0; $i < count($boxes); $i++) {
if ( $boxes[$i]['visible'] ) {
$mailbox = $boxes[$i]['formatted'];
$mblevel = substr_count($boxes[$i]['unformatted'], $delimiter) + 1;
@@ -335,8 +833,16 @@ for ($i = 0;$i < count($boxes); $i++) {
$line = "
$prefix";
/* Add the folder name and link. */
+ if (! isset($color[15])) {
+ $color[15] = $color[6];
+ }
+
if (in_array('noselect', $boxes[$i]['flags'])) {
- $line .= "";
+ if( isSpecialMailbox( $boxes[$i]['unformatted']) ) {
+ $line .= "";
+ } else {
+ $line .= "";
+ }
if (ereg("^( *)([^ ]*)", $mailbox, $regs)) {
$mailbox = str_replace(' ','',$mailbox);
$line .= str_replace(' ', ' ', $mailbox);
@@ -353,10 +859,25 @@ for ($i = 0;$i < count($boxes); $i++) {
echo $line;
}
}
-
-sqimap_logout($imapConnection);
+} else { /* expiremental code */
+ $boxes = sqimap_mailbox_tree($imapConnection);
+ if (isset($advanced_tree) && $advanced_tree) {
+ echo ''."\n";
+ } else {
+ ListBoxes($boxes);
+ }
+} /* if ($oldway) else ... */
do_hook('left_main_after');
+sqimap_logout($imapConnection);
-echo "