6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * This is the code for the left bar. The left bar shows the folders
10 * available, and has cookie information.
15 require_once('../src/validate.php');
16 require_once('../functions/array.php');
17 require_once('../functions/imap.php');
18 require_once('../functions/plugin.php');
19 require_once('../functions/page_header.php');
20 require_once('../functions/html.php');
22 /* These constants are used for folder stuff. */
23 define('SM_BOX_UNCOLLAPSED', 0);
24 define('SM_BOX_COLLAPSED', 1);
26 /* --------------------- FUNCTIONS ------------------------- */
28 function formatMailboxName($imapConnection, $box_array) {
30 global $folder_prefix, $trash_folder, $sent_folder,
31 $color, $move_to_sent, $move_to_trash,
32 $unseen_notify, $unseen_type, $collapse_folders,
33 $draft_folder, $save_as_draft,
34 $use_special_folder_color;
36 $real_box = $box_array['unformatted'];
37 $mailbox = str_replace(' ','',$box_array['formatted']);
38 $mailboxURL = urlencode($real_box);
40 /* Strip down the mailbox name. */
41 if (ereg("^( *)([^ ]*)$", $mailbox, $regs)) {
47 if (($unseen_notify == 2 && $real_box == 'INBOX') ||
48 $unseen_notify == 3) {
49 $unseen = sqimap_unseen_messages($imapConnection, $real_box);
50 if ($unseen_type == 1 && $unseen > 0) {
51 $unseen_string = "($unseen)";
53 } else if ($unseen_type == 2) {
54 $numMessages = sqimap_get_num_messages($imapConnection, $real_box);
55 $unseen_string = "<font color=\"$color[11]\">($unseen/$numMessages)</font>";
60 $special_color = ($use_special_folder_color && isSpecialMailbox( $real_box ) );
62 /* Start off with a blank line. */
65 /* If there are unseen message, bold the line. */
66 if ($unseen > 0) { $line .= '<B>'; }
68 /* Create the link for this folder. */
69 $line .= '<a href="right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox='.
70 $mailboxURL.'" TARGET="right" STYLE="text-decoration:none">';
73 $line .= "<font color=\"$color[11]\">";
75 if ( $mailbox == 'INBOX' ) {
78 $line .= str_replace(' ',' ',$mailbox);
80 if ($special_color == TRUE)
84 /* If there are unseen message, close bolding. */
85 if ($unseen > 0) { $line .= "</B>"; }
87 /* Print unseen information. */
88 if (isset($unseen_found) && $unseen_found) {
89 $line .= " <SMALL>$unseen_string</SMALL>";
92 if (($move_to_trash) && ($real_box == $trash_folder)) {
93 if (! isset($numMessages)) {
94 $numMessages = sqimap_get_num_messages($imapConnection, $real_box);
97 if ($numMessages > 0) {
98 $urlMailbox = urlencode($real_box);
99 $line .= "\n<small>\n" .
100 " (<A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A>)" .
105 /* Return the final product. */
110 * Recursive function that computes the collapsed status and parent
111 * (or not parent) status of this box, and the visiblity and collapsed
112 * status and parent (or not parent) status for all children boxes.
114 function compute_folder_children(&$parbox, $boxcount) {
115 global $boxes, $data_dir, $username, $collapse_folders;
116 $nextbox = $parbox +
1;
118 /* Retreive the name for the parent box. */
119 $parbox_name = $boxes[$parbox]['unformatted'];
121 /* 'Initialize' this parent box to childless. */
122 $boxes[$parbox]['parent'] = FALSE;
124 /* Compute the collapse status for this box. */
125 if( isset($collapse_folders) && $collapse_folders ) {
126 $collapse = getPref($data_dir, $username, 'collapse_folder_' . $parbox_name);
127 $collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED
: $collapse);
129 $collapse = SM_BOX_UNCOLLAPSED
;
131 $boxes[$parbox]['collapse'] = $collapse;
133 /* Otherwise, get the name of the next box. */
134 if (isset($boxes[$nextbox]['unformatted'])) {
135 $nextbox_name = $boxes[$nextbox]['unformatted'];
140 /* Compute any children boxes for this box. */
141 while (($nextbox < $boxcount) &&
142 (is_parent_box($boxes[$nextbox]['unformatted'], $parbox_name))) {
144 /* Note that this 'parent' box has at least one child. */
145 $boxes[$parbox]['parent'] = TRUE;
147 /* Compute the visiblity of this box. */
148 $boxes[$nextbox]['visible'] = ($boxes[$parbox]['visible'] &&
149 ($boxes[$parbox]['collapse'] != SM_BOX_COLLAPSED
));
151 /* Compute the visibility of any child boxes. */
152 compute_folder_children($nextbox, $boxcount);
155 /* Set the parent box to the current next box. */
160 * Create the link for a parent folder that will allow that
161 * parent folder to either be collapsed or expaned, as is
162 * currently appropriate.
164 function create_collapse_link($boxnum) {
166 $mailbox = urlencode($boxes[$boxnum]['unformatted']);
168 /* Create the link for this collapse link. */
169 $link = '<a target="left" style="text-decoration:none" ' .
170 'href="left_main.php?';
171 if ($boxes[$boxnum]['collapse'] == SM_BOX_COLLAPSED
) {
172 $link .= "unfold=$mailbox\">+";
174 $link .= "fold=$mailbox\">-";
178 /* Return the finished product. */
183 * This simple function checks if a box is another box's parent.
185 function is_parent_box($curbox_name, $parbox_name) {
188 /* Extract the name of the parent of the current box. */
189 $curparts = explode($delimiter, $curbox_name);
190 $curname = array_pop($curparts);
191 $actual_parname = implode($delimiter, $curparts);
192 $actual_parname = substr($actual_parname,0,strlen($parbox_name));
194 /* Compare the actual with the given parent name. */
195 return ($parbox_name == $actual_parname);
198 function listBoxes ($boxes, $j=0 ) {
199 global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
200 $move_to_trash, $trash_folder, $collapse_folders;
205 $mailbox = $boxes->mailboxname_full
;
207 for ($k = 0; $k < $j; $k++
) {
208 $leader.= '   ';
210 $mailboxURL = urlencode($mailbox);
212 /* get unseen/total messages information */
213 if ($boxes->unseen
) {
214 $unseen = $boxes->unseen
;
215 $unseen_string = "($unseen)";
216 if ($unseen>0) $unseen_found = TRUE;
218 $numMessages = $boxes->total
;
219 $unseen_string = "<font color=\"$color[11]\">($unseen/$numMessages)</font>";
225 if (isset($boxes->mbxs
[0]) && $collapse_folders) {
226 $collapse = getPref($data_dir, $username, 'collapse_folder_' . $mailbox);
227 $collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED
: $collapse);
229 $link = '<a target="left" style="text-decoration:none" ' .'href="left_main.php?';
231 $link .= "unfold=$mailboxURL\">$leader + ";
233 $link .= "fold=$mailboxURL\">$leader - ";
238 $pre.= $leader . '   ';
242 /* If there are unseen message, bold the line. */
243 if ($unseen > 0) { $pre .= '<B>'; }
245 if (($move_to_trash) && ($mailbox == $trash_folder)) {
246 if (! isset($numMessages)) {
247 $numMessages = sqimap_get_num_messages($imapConnection, $mailbox);
250 if ($numMessages > 0) {
251 $urlMailbox = urlencode($mailbox);
252 $pre .= "\n<small>\n" .
253 " (<A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A>)" .
257 if (!$boxes->is_noselect
) {
258 $pre .= "<a HREF=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" TARGET=\"right\">";
263 /* If there are unseen message, close bolding. */
264 if ($unseen > 0) { $end .= "</B>"; }
266 /* Print unseen information. */
267 if (isset($unseen_found) && $unseen_found) {
268 $end .= " <SMALL>$unseen_string</SMALL>";
273 if ($boxes->is_special
) {
274 $font = "<FONT COLOR=\"$color[11]\">";
275 $fontend = "</FONT>";
278 if (!$boxes->is_root
) {
279 echo "" . $pre .$font. $boxes->mailboxname_sub
.$fontend . $end. '<br>';
282 if (!$collapse ||
$boxes->is_root
) {
283 for ($i = 0; $i <count($boxes->mbxs
); $i++
) {
284 listBoxes($boxes->mbxs
[$i],$j);
291 function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) {
292 global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
293 $move_to_trash, $trash_folder, $collapse_folders;
295 /* use_folder_images only works if the images exist in ../images */
296 $use_folder_images = true;
303 $mailbox = $boxes->mailboxname_full
;
304 $mailboxURL = urlencode($mailbox);
306 /* get unseen/total messages information */
307 if ($boxes->unseen
) {
308 $unseen = $boxes->unseen
;
309 $unseen_string = "($unseen)";
310 if ($unseen>0) $unseen_found = TRUE;
312 $numMessages = $boxes->total
;
313 $unseen_string = "<font color=\"$color[11]\">($unseen/$numMessages)</font>";
317 /* If there are unseen message, bold the line. */
318 if ($unseen > 0) { $pre .= '<B>'; }
320 /* color special boxes */
321 if ($boxes->is_special
) {
322 $pre .= "<FONT COLOR=\"$color[11]\">";
326 /* If there are unseen message, close bolding. */
327 if ($unseen > 0) { $end .= "</B>"; }
329 /* Print unseen information. */
330 if (isset($unseen_found) && $unseen_found) {
331 $end .= " $unseen_string";
334 if (($move_to_trash) && ($mailbox == $trash_folder)) {
335 if (! isset($numMessages)) {
336 $numMessages = $boxes->total
;
338 if ($numMessages > 0) {
339 $urlMailbox = urlencode($mailbox);
340 $pre .= "\n<small>\n" .
341 " (<a class=\"mbx_link\" HREF=\"empty_trash.php\">"._("purge")."</a>)" .
345 if (!$boxes->is_noselect
) { /* \Noselect boxes can't be selected */
346 $pre .= "<a class=\"mbx_link\" HREF=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" TARGET=\"right\">";
351 if (!$boxes->is_root
) {
352 if ($use_folder_images) {
353 if ($boxes->is_inbox
) {
354 $folder_img = '../images/inbox.gif';
355 } else if ($boxes->is_sent
) {
356 $folder_img = '../images/senti.gif';
357 } else if ($boxes->is_trash
) {
358 $folder_img = '../images/delitem.gif';
359 } else if ($boxes->is_draft
) {
360 $folder_img = '../images/draft.gif';
361 } else $folder_img = '../images/folder.gif';
362 $folder_img = ' <img src="'.$folder_img.'" height="15" valign="center"> ';
363 } else $folder_img = '';
364 if (!isset($boxes->mbxs
[0])) {
365 echo ' ' . html_tag( 'div',
366 $pre . $folder_img . $boxes->mailboxname_sub
. $end ,
367 'left', '', 'class="mbx_sub" id="' .$j. '"' )
370 /* get collapse information */
371 if ($collapse_folders) {
372 $link = '<a target="left" style="text-decoration:none" ' .'href="left_main.php?';
373 $form_entry = $j.'F';
374 if (isset($mbx) && isset($mbx[$form_entry])) {
375 $collapse = $mbx[$form_entry];
377 setPref($data_dir, $username, 'collapse_folder_'.$boxes->mailboxname_full
, SM_BOX_COLLAPSED
);
379 setPref($data_dir, $username, 'collapse_folder_'.$boxes->mailboxname_full
, SM_BOX_UNCOLLAPSED
);
382 $collapse = getPref($data_dir, $username, 'collapse_folder_' . $mailbox);
383 $collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED
: $collapse);
386 $link = '<a href="javascript:void(0)">'." <img src=\"../images/plus.gif\" border=\"1\" id=$j onclick=\"hidechilds(this)\"></A>";
388 $link = '<a href="javascript:void(0)">'."<img src=\"../images/minus.gif\" border=\"1\" id=$j onclick=\"hidechilds(this)\"></a>";
390 $collapse_link = $link;
391 } else $collapse_link='';
392 echo ' ' . html_tag( 'div',
393 $collapse_link . $pre . $folder_img . ' '. $boxes->mailboxname_sub
. $end ,
394 'left', '', 'class="mbx_par" id="' .$j. 'P"' )
396 echo ' <INPUT TYPE="hidden" name=mbx['.$j. 'F] value="'.$collapse.'" id="mbx['.$j.'F]">'."\n";
400 $visible = ' STYLE="display:none;"';
402 $visible = ' STYLE="display:block;"';
405 if (isset($boxes->mbxs
[0]) && !$boxes->is_root
) /* mailbox contains childs */
406 echo html_tag( 'div', '', 'left', '', 'class="par_area" id='.$j.'.0000 '. $visible ) . "\n";
408 if ($j !='ID.0000') {
411 for ($i = 0; $i <count($boxes->mbxs
); $i++
) {
413 listAdvancedBoxes($boxes->mbxs
[$i],$mbx,$j);
415 if (isset($boxes->mbxs
[0]) && !$boxes->is_root
) echo '</div>'."\n\n";
422 /* -------------------- MAIN ------------------------ */
424 global $delimiter, $default_folder_prefix, $left_size;
426 // open a connection on the imap port (143)
427 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output
430 * Using stristr since older preferences may contain "None" and "none".
432 if (isset($left_refresh) && ($left_refresh != '') &&
433 !stristr($left_refresh, "none")){
434 $xtra = "\n<META HTTP-EQUIV=\"Expires\" CONTENT=\"Thu, 01 Dec 1994 16:00:00 GMT\">\n" .
435 "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n".
436 "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"$left_refresh;URL=left_main.php\">\n";
442 * $advanced_tree and $oldway are boolean vars which are default set to default
444 * Setting $oldway to false causes left_main.php to use the new experimental
445 * way of getting the mailbox-tree.
446 * Setting $advanced tree to true causes SM to display a experimental
447 * mailbox-tree with dhtml behaviour.
448 * It only works on browsers which supports css and javascript. The used
449 * javascript is experimental and doesn't support all browsers. It is tested on
450 * IE6 an Konquerer 3.0.0-2.
451 * In the function ListAdvancedBoxes there is another var $use_folder_images.
452 * setting this to true is only usefull if the images exists in ../images.
454 * Feel free to experiment with the code and report bugs and enhancements
455 * to marc@its-projects.nl
458 $advanced_tree = false; /* set this to true if you want to see a nicer mailboxtree */
459 $oldway = true; /* default SM behaviour */
461 if ($advanced_tree) {
463 <script language="Javascript" TYPE="text/javascript">
467 function hidechilds(el) {
469 form_id = "mbx[" + el.id +"F]";
471 ele = document.all[id];
473 if(ele.style.display == "none") {
474 ele.style.display = "block";
475 ele.style.visibility = "visible"
476 el.src="../images/minus.gif";
477 document.all[form_id].value=0;
479 ele.style.display = "none";
480 ele.style.visibility = "hidden"
481 el.src="../images/plus.gif";
482 document.all[form_id].value=1;
485 } else if (document.getElementById) {
486 ele = document.getElementById(id);
488 if(ele.style.display == "none") {
489 ele.style.display = "block";
490 ele.style.visibility = "visible"
491 el.src="../images/minus.gif";
492 document.getElementById(form_id).value=0;
494 ele.style.display = "none";
495 ele.style.visibility = "hidden"
496 el.src="../images/plus.gif";
497 document.getElementById(form_id).value=1;
504 if (!document.images) return;
505 var ar = new Array();
506 var arguments = preload.arguments;
507 for (var i = 0; i<arguments.length; i++) {
509 ar[i].src = arguments[i];
513 function buttonover(el,on) {
515 el.style.borderColor="blue";}
517 el.style.borderColor="orange";}
520 function buttonclick(el,on) {
522 el.style.border="groove"}
524 el.style.border="ridge";}
527 function hideframe(hide) {
530 $xtra .= " left_size = \"$left_size\";\n";
533 masterf = window.parent.document.all["fs1"];
534 leftf = window.parent.document.all["left"];
535 leftcontent = document.all["leftframe"];
536 leftbutton = document.all["showf"];
537 } else if (document.getElementById) {
538 masterf = window.parent.document.getElementById("fs1");
539 leftf = window.parent.document.getElementById("left");
540 leftcontent = document.getElementById("leftframe");
541 leftbutton = document.getElementById("showf");
546 new_col = calc_col("20");
547 masterf.cols = new_col;
548 document.body.scrollLeft=0;
549 document.body.style.overflow='hidden';
550 leftcontent.style.display = 'none';
551 leftbutton.style.display='block';
553 masterf.cols = calc_col(left_size);
554 document.body.style.overflow='';
555 leftbutton.style.display='none';
556 leftcontent.style.display='block';
561 function calc_col(c_w) {
564 if ($location_of_bar == 'right') {
565 $xtra .= ' right=true;';
567 $xtra .= ' right=false;';
579 function resizeframe(direction) {
581 masterf = window.parent.document.all["fs1"];
582 } else if (document.getElementById) {
583 window.parent.document.getElementById("fs1");
589 if ($location_of_bar == 'right') {
590 $xtra .= ' colPat=/^\*,(\d+)$/;';
592 $xtra .= ' colPat=/^(\d+),.*$/;';
597 old_col = masterf.cols;
598 colPat.exec(old_col);
601 new_col_width = parseInt(RegExp.$1) + 25;
604 if (parseInt(RegExp.$1) > 35) {
605 new_col_width = parseInt(RegExp.$1) - 25;
608 masterf.cols = calc_col(new_col_width);
617 /* style definitions */
621 <STYLE TYPE="text/css">
624 margin: 0px 0px 0px 0px;
625 padding: 5px 5px 5px 5px;
643 text-decoration: none;
644 background-color: $color[0];
649 background-color: $color[9];
671 border-left-width:0.1em;
672 border-left-color:blue;
673 border-bottom: solid;
674 border-bottom-width:0.1em;
675 border-bottom-color:blue;
688 background: $color[0];
702 displayHtmlHeader( 'SquirrelMail', $xtra );
704 /* If requested and not yet complete, attempt to autocreate folders. */
705 if ($auto_create_special && !isset($auto_create_done)) {
706 $autocreate = array($sent_folder, $trash_folder, $draft_folder);
707 foreach( $autocreate as $folder ) {
708 if (($folder != '') && ($folder != 'none')) {
709 if ( !sqimap_mailbox_exists($imapConnection, $folder)) {
710 sqimap_mailbox_create($imapConnection, $folder, '');
711 } else if (!sqimap_mailbox_is_subscribed($imapConnection, $folder)) {
712 sqimap_subscribe($imapConnection, $folder);
717 /* Let the world know that autocreation is complete! Hurrah! */
718 $auto_create_done = TRUE;
719 session_register('auto_create_done');
722 echo "\n<BODY BGCOLOR=\"$color[3]\" TEXT=\"$color[6]\" LINK=\"$color[6]\" VLINK=\"$color[6]\" ALINK=\"$color[6]\">\n";
724 do_hook('left_main_before');
725 if ($advanced_tree) {
726 /* nice future feature, needs layout !! volunteers? */
727 $right_pos = $left_size - 20;
728 echo '<div style="position:absolute;top:0;border=solid;border-width:0.1em;border-color:blue;"><div ID="hidef" style="width=20;font-size:12"><A HREF="javascript:hideframe(true)"><b><<</b></a></div>';
729 echo '<div ID="showf" style="width=20;font-size:12;display:none;"><A HREF="javascript:hideframe(false)"><b>>></b></a></div>';
730 echo '<div ID="incrf" style="width=20;font-size:12"><A HREF="javascript:resizeframe(true)"><b>></b></a></div>';
731 echo '<div ID="decrf" style="width=20;font-size:12"><A HREF="javascript:resizeframe(false)"><b><</b></a></div></div>';
732 echo '<div ID="leftframe"><br><br>';
735 echo "\n\n" . html_tag( 'table', '', '', '', 'border="0" cellspacing="0" cellpadding="0" width="100%"' ) .
737 html_tag( 'td', '', 'left' ) .
738 '<center><font size="4"><b>'. _("Folders") . "</b><br></font>\n\n";
740 if ($date_format != 6) {
741 /* First, display the clock. */
742 if ($hour_format == 1) {
744 if ($date_format == 4) {
748 if ($date_format == 4) {
755 switch( $date_format ) {
757 $clk = date('m/d/y '.$hr, time());
760 $clk = date('d/m/y '.$hr, time());
764 $clk = date($hr, time());
767 $clk = substr( getDayName( date( 'w', time() ) ), 0, 3 ) . date( ', ' . $hr, time() );
769 $clk = str_replace(' ',' ',$clk);
771 echo '<center><small>' . str_replace(' ',' ',_("Last Refresh")) .
772 ": $clk</small></center>";
775 /* Next, display the refresh button. */
776 echo '<small>(<a href="../src/left_main.php" target="left">'.
777 _("refresh folder list") . '</a>)</small></center><br>';
779 /* Lastly, display the folder list. */
780 if ( $collapse_folders ) {
781 /* If directed, collapse or uncollapse a folder. */
783 setPref($data_dir, $username, 'collapse_folder_' . $fold, SM_BOX_COLLAPSED
);
784 } else if (isset($unfold)) {
785 setPref($data_dir, $username, 'collapse_folder_' . $unfold, SM_BOX_UNCOLLAPSED
);
789 if ($oldway) { /* normal behaviour SM */
791 $boxes = sqimap_mailbox_list($imapConnection);
792 /* Prepare do do out collapsedness and visibility computation. */
794 $boxcount = count($boxes);
796 /* Compute the collapsedness and visibility of each box. */
798 while ($curbox < $boxcount) {
799 $boxes[$curbox]['visible'] = TRUE;
800 compute_folder_children($curbox, $boxcount);
804 for ($i = 0; $i < count($boxes); $i++
) {
805 if ( $boxes[$i]['visible'] ) {
806 $mailbox = $boxes[$i]['formatted'];
807 $mblevel = substr_count($boxes[$i]['unformatted'], $delimiter) +
1;
809 /* Create the prefix for the folder name and link. */
810 $prefix = str_repeat(' ',$mblevel);
811 if (isset($collapse_folders) && $collapse_folders && $boxes[$i]['parent']) {
812 $prefix = str_replace(' ',' ',substr($prefix,0,strlen($prefix)-2)).
813 create_collapse_link($i) . ' ';
815 $prefix = str_replace(' ',' ',$prefix);
817 $line = "<NOBR><TT>$prefix</TT>";
819 /* Add the folder name and link. */
820 if (! isset($color[15])) {
821 $color[15] = $color[6];
824 if (in_array('noselect', $boxes[$i]['flags'])) {
825 if( isSpecialMailbox( $boxes[$i]['unformatted']) ) {
826 $line .= "<FONT COLOR=\"$color[11]\">";
828 $line .= "<FONT COLOR=\"$color[15]\">";
830 if (ereg("^( *)([^ ]*)", $mailbox, $regs)) {
831 $mailbox = str_replace(' ','',$mailbox);
832 $line .= str_replace(' ', ' ', $mailbox);
836 $line .= formatMailboxName($imapConnection, $boxes[$i]);
839 /* Put the final touches on our folder line. */
840 $line .= "</NOBR><BR>\n";
842 /* Output the line for this folder. */
846 } else { /* expiremental code */
847 $boxes = sqimap_mailbox_tree($imapConnection);
848 if (isset($advanced_tree) && $advanced_tree) {
849 echo '<FORM name=collapse action="left_main.php" METHOD=POST' .
850 'ENCTYPE="multipart/form-data"'."\n";
851 echo '<small><button type="submit" class="button" onmouseover="buttonover(this,true)" onmouseout="buttonover(this,false)" onmousedown="buttonclick(this,true)" onmouseup="buttonclick(this,false)">'. _("Save folder tree") .'</button><br><br>';
852 echo '<DIV ID=mailboxes CLASS=mailboxes>'."\n\n";
853 if (!isset($mbx)) $mbx=NULL;
854 ListAdvancedBoxes($boxes, $mbx);
855 echo '</div></small>'."\n";
860 } /* if ($oldway) else ... */
861 do_hook('left_main_after');
862 sqimap_logout($imapConnection);
864 echo '</td></tr></table>' . "\n".
865 "</div></body></html>\n";