fe0a2ff7bbb855cb1a828c8f3f8635debb5675ee
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 /* Crate the link for this folder. */
69 $line .= "<a href=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" TARGET=\"right\">";
71 $line .= "<font color=\"$color[11]\">";
73 if ( $mailbox == 'INBOX' ) {
76 $line .= str_replace(' ',' ',$mailbox);
78 if ($special_color == TRUE)
82 /* If there are unseen message, close bolding. */
83 if ($unseen > 0) { $line .= "</B>"; }
85 /* Print unseen information. */
86 if (isset($unseen_found) && $unseen_found) {
87 $line .= " <SMALL>$unseen_string</SMALL>";
90 if (($move_to_trash) && ($real_box == $trash_folder)) {
91 if (! isset($numMessages)) {
92 $numMessages = sqimap_get_num_messages($imapConnection, $real_box);
95 if ($numMessages > 0) {
96 $urlMailbox = urlencode($real_box);
97 $line .= "\n<small>\n" .
98 " (<A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A>)" .
103 /* Return the final product. */
108 * Recursive function that computes the collapsed status and parent
109 * (or not parent) status of this box, and the visiblity and collapsed
110 * status and parent (or not parent) status for all children boxes.
112 function compute_folder_children(&$parbox, $boxcount) {
113 global $boxes, $data_dir, $username, $collapse_folders;
114 $nextbox = $parbox +
1;
116 /* Retreive the name for the parent box. */
117 $parbox_name = $boxes[$parbox]['unformatted'];
119 /* 'Initialize' this parent box to childless. */
120 $boxes[$parbox]['parent'] = FALSE;
122 /* Compute the collapse status for this box. */
123 if( isset($collapse_folders) && $collapse_folders ) {
124 $collapse = getPref($data_dir, $username, 'collapse_folder_' . $parbox_name);
125 $collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED
: $collapse);
127 $collapse = SM_BOX_UNCOLLAPSED
;
129 $boxes[$parbox]['collapse'] = $collapse;
131 /* Otherwise, get the name of the next box. */
132 if (isset($boxes[$nextbox]['unformatted'])) {
133 $nextbox_name = $boxes[$nextbox]['unformatted'];
138 /* Compute any children boxes for this box. */
139 while (($nextbox < $boxcount) &&
140 (is_parent_box($boxes[$nextbox]['unformatted'], $parbox_name))) {
142 /* Note that this 'parent' box has at least one child. */
143 $boxes[$parbox]['parent'] = TRUE;
145 /* Compute the visiblity of this box. */
146 $boxes[$nextbox]['visible'] = ($boxes[$parbox]['visible'] &&
147 ($boxes[$parbox]['collapse'] != SM_BOX_COLLAPSED
));
149 /* Compute the visibility of any child boxes. */
150 compute_folder_children($nextbox, $boxcount);
153 /* Set the parent box to the current next box. */
158 * Create the link for a parent folder that will allow that
159 * parent folder to either be collapsed or expaned, as is
160 * currently appropriate.
162 function create_collapse_link($boxnum) {
164 $mailbox = urlencode($boxes[$boxnum]['unformatted']);
166 /* Create the link for this collapse link. */
167 $link = '<a target="left" style="text-decoration:none" ' .
168 'href="left_main.php?';
169 if ($boxes[$boxnum]['collapse'] == SM_BOX_COLLAPSED
) {
170 $link .= "unfold=$mailbox\">+";
172 $link .= "fold=$mailbox\">-";
176 /* Return the finished product. */
181 * This simple function checks if a box is another box's parent.
183 function is_parent_box($curbox_name, $parbox_name) {
186 /* Extract the name of the parent of the current box. */
187 $curparts = explode($delimiter, $curbox_name);
188 $curname = array_pop($curparts);
189 $actual_parname = implode($delimiter, $curparts);
190 $actual_parname = substr($actual_parname,0,strlen($parbox_name));
192 /* Compare the actual with the given parent name. */
193 return ($parbox_name == $actual_parname);
196 function listBoxes ($boxes, $j=0 ) {
197 global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
198 $move_to_trash, $trash_folder, $collapse_folders;
203 $mailbox = $boxes->mailboxname_full
;
205 for ($k = 0; $k < $j; $k++
) {
206 $leader.= '   ';
208 $mailboxURL = urlencode($mailbox);
210 /* get unseen/total messages information */
211 if ($boxes->unseen
) {
212 $unseen = $boxes->unseen
;
213 $unseen_string = "($unseen)";
214 if ($unseen>0) $unseen_found = TRUE;
216 $numMessages = $boxes->total
;
217 $unseen_string = "<font color=\"$color[11]\">($unseen/$numMessages)</font>";
223 if (isset($boxes->mbxs
[0]) && $collapse_folders) {
224 $collapse = getPref($data_dir, $username, 'collapse_folder_' . $mailbox);
225 $collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED
: $collapse);
227 $link = '<a target="left" style="text-decoration:none" ' .'href="left_main.php?';
229 $link .= "unfold=$mailboxURL\">$leader + ";
231 $link .= "fold=$mailboxURL\">$leader - ";
236 $pre.= $leader . '   ';
240 /* If there are unseen message, bold the line. */
241 if ($unseen > 0) { $pre .= '<B>'; }
243 if (($move_to_trash) && ($mailbox == $trash_folder)) {
244 if (! isset($numMessages)) {
245 $numMessages = sqimap_get_num_messages($imapConnection, $mailbox);
248 if ($numMessages > 0) {
249 $urlMailbox = urlencode($mailbox);
250 $pre .= "\n<small>\n" .
251 " (<A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A>)" .
255 if (!$boxes->is_noselect
) {
256 $pre .= "<a HREF=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" TARGET=\"right\">";
261 /* If there are unseen message, close bolding. */
262 if ($unseen > 0) { $end .= "</B>"; }
264 /* Print unseen information. */
265 if (isset($unseen_found) && $unseen_found) {
266 $end .= " <SMALL>$unseen_string</SMALL>";
271 if ($boxes->is_special
) {
272 $font = "<FONT COLOR=\"$color[11]\">";
273 $fontend = "</FONT>";
276 if (!$boxes->is_root
) {
277 echo "" . $pre .$font. $boxes->mailboxname_sub
.$fontend . $end. '<br>';
280 if (!$collapse ||
$boxes->is_root
) {
281 for ($i = 0; $i <count($boxes->mbxs
); $i++
) {
282 listBoxes($boxes->mbxs
[$i],$j);
289 function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) {
290 global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
291 $move_to_trash, $trash_folder, $collapse_folders;
293 /* use_folder_images only works if the images exist in ../images */
294 $use_folder_images = true;
301 $mailbox = $boxes->mailboxname_full
;
302 $mailboxURL = urlencode($mailbox);
304 /* get unseen/total messages information */
305 if ($boxes->unseen
) {
306 $unseen = $boxes->unseen
;
307 $unseen_string = "($unseen)";
308 if ($unseen>0) $unseen_found = TRUE;
310 $numMessages = $boxes->total
;
311 $unseen_string = "<font color=\"$color[11]\">($unseen/$numMessages)</font>";
315 /* If there are unseen message, bold the line. */
316 if ($unseen > 0) { $pre .= '<B>'; }
318 /* color special boxes */
319 if ($boxes->is_special
) {
320 $pre .= "<FONT COLOR=\"$color[11]\">";
324 /* If there are unseen message, close bolding. */
325 if ($unseen > 0) { $end .= "</B>"; }
327 /* Print unseen information. */
328 if (isset($unseen_found) && $unseen_found) {
329 $end .= " $unseen_string";
332 if (($move_to_trash) && ($mailbox == $trash_folder)) {
333 if (! isset($numMessages)) {
334 $numMessages = $boxes->total
;
336 if ($numMessages > 0) {
337 $urlMailbox = urlencode($mailbox);
338 $pre .= "\n<small>\n" .
339 " (<a class=\"mbx_link\" HREF=\"empty_trash.php\">"._("purge")."</a>)" .
343 if (!$boxes->is_noselect
) { /* \Noselect boxes can't be selected */
344 $pre .= "<a class=\"mbx_link\" HREF=\"right_main.php?PG_SHOWALL=0&sort=0&startMessage=1&mailbox=$mailboxURL\" TARGET=\"right\">";
349 if (!$boxes->is_root
) {
350 if ($use_folder_images) {
351 if ($boxes->is_inbox
) {
352 $folder_img = '../images/inbox.gif';
353 } else if ($boxes->is_sent
) {
354 $folder_img = '../images/senti.gif';
355 } else if ($boxes->is_trash
) {
356 $folder_img = '../images/delitem.gif';
357 } else if ($boxes->is_draft
) {
358 $folder_img = '../images/draft.gif';
359 } else $folder_img = '../images/folder.gif';
360 $folder_img = ' <img src="'.$folder_img.'" height="15" valign="center"> ';
361 } else $folder_img = '';
362 if (!isset($boxes->mbxs
[0])) {
363 echo ' ' . html_tag( 'div',
364 $pre . $folder_img . $boxes->mailboxname_sub
. $end ,
365 'left', '', 'class="mbx_sub" id="' .$j. '"' )
368 /* get collapse information */
369 if ($collapse_folders) {
370 $link = '<a target="left" style="text-decoration:none" ' .'href="left_main.php?';
371 $form_entry = $j.'F';
372 if (isset($mbx) && isset($mbx[$form_entry])) {
373 $collapse = $mbx[$form_entry];
375 setPref($data_dir, $username, 'collapse_folder_'.$boxes->mailboxname_full
, SM_BOX_COLLAPSED
);
377 setPref($data_dir, $username, 'collapse_folder_'.$boxes->mailboxname_full
, SM_BOX_UNCOLLAPSED
);
380 $collapse = getPref($data_dir, $username, 'collapse_folder_' . $mailbox);
381 $collapse = ($collapse == '' ? SM_BOX_UNCOLLAPSED
: $collapse);
384 $link = '<a href="javascript:void(0)">'." <img src=\"../images/plus.gif\" border=\"1\" id=$j onclick=\"hidechilds(this)\"></A>";
386 $link = '<a href="javascript:void(0)">'."<img src=\"../images/minus.gif\" border=\"1\" id=$j onclick=\"hidechilds(this)\"></a>";
388 $collapse_link = $link;
389 } else $collapse_link='';
390 echo ' ' . html_tag( 'div',
391 $collapse_link . $pre . $folder_img . ' '. $boxes->mailboxname_sub
. $end ,
392 'left', '', 'class="mbx_par" id="' .$j. 'P"' )
394 echo ' <INPUT TYPE="hidden" name=mbx['.$j. 'F] value="'.$collapse.'" id="mbx['.$j.'F]">'."\n";
398 $visible = ' STYLE="display:none;"';
400 $visible = ' STYLE="display:block;"';
403 if (isset($boxes->mbxs
[0]) && !$boxes->is_root
) /* mailbox contains childs */
404 echo html_tag( 'div', '', 'left', '', 'class="par_area" id='.$j.'.0000 '. $visible ) . "\n";
406 if ($j !='ID.0000') {
409 for ($i = 0; $i <count($boxes->mbxs
); $i++
) {
411 listAdvancedBoxes($boxes->mbxs
[$i],$mbx,$j);
413 if (isset($boxes->mbxs
[0]) && !$boxes->is_root
) echo '</div>'."\n\n";
420 /* -------------------- MAIN ------------------------ */
422 global $delimiter, $default_folder_prefix, $left_size;
424 // open a connection on the imap port (143)
425 $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output
428 * Using stristr since older preferences may contain "None" and "none".
430 if (isset($left_refresh) && ($left_refresh != '') &&
431 !stristr($left_refresh, "none")){
432 $xtra = "\n<META HTTP-EQUIV=\"Expires\" CONTENT=\"Thu, 01 Dec 1994 16:00:00 GMT\">\n" .
433 "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n".
434 "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"$left_refresh;URL=left_main.php\">\n";
440 * $advanced_tree and $oldway are boolean vars which are default set to default
442 * Setting $oldway to false causes left_main.php to use the new experimental
443 * way of getting the mailbox-tree.
444 * Setting $advanced tree to true causes SM to display a experimental
445 * mailbox-tree with dhtml behaviour.
446 * It only works on browsers which supports css and javascript. The used
447 * javascript is experimental and doesn't support all browsers. It is tested on
448 * IE6 an Konquerer 3.0.0-2.
449 * In the function ListAdvancedBoxes there is another var $use_folder_images.
450 * setting this to true is only usefull if the images exists in ../images.
452 * Feel free to experiment with the code and report bugs and enhancements
453 * to marc@its-projects.nl
456 $advanced_tree = false; /* set this to true if you want to see a nicer mailboxtree */
457 $oldway = true; /* default SM behaviour */
459 if ($advanced_tree) {
461 <script language="Javascript" TYPE="text/javascript">
465 function hidechilds(el) {
467 form_id = "mbx[" + el.id +"F]";
469 ele = document.all[id];
471 if(ele.style.display == "none") {
472 ele.style.display = "block";
473 ele.style.visibility = "visible"
474 el.src="../images/minus.gif";
475 document.all[form_id].value=0;
477 ele.style.display = "none";
478 ele.style.visibility = "hidden"
479 el.src="../images/plus.gif";
480 document.all[form_id].value=1;
483 } else if (document.getElementById) {
484 ele = document.getElementById(id);
486 if(ele.style.display == "none") {
487 ele.style.display = "block";
488 ele.style.visibility = "visible"
489 el.src="../images/minus.gif";
490 document.getElementById(form_id).value=0;
492 ele.style.display = "none";
493 ele.style.visibility = "hidden"
494 el.src="../images/plus.gif";
495 document.getElementById(form_id).value=1;
502 if (!document.images) return;
503 var ar = new Array();
504 var arguments = preload.arguments;
505 for (var i = 0; i<arguments.length; i++) {
507 ar[i].src = arguments[i];
511 function buttonover(el,on) {
513 el.style.borderColor="blue";}
515 el.style.borderColor="orange";}
518 function buttonclick(el,on) {
520 el.style.border="groove"}
522 el.style.border="ridge";}
525 function hideframe(hide) {
528 $xtra .= " left_size = \"$left_size\";\n";
531 masterf = window.parent.document.all["fs1"];
532 leftf = window.parent.document.all["left"];
533 leftcontent = document.all["leftframe"];
534 leftbutton = document.all["showf"];
535 } else if (document.getElementById) {
536 masterf = window.parent.document.getElementById("fs1");
537 leftf = window.parent.document.getElementById("left");
538 leftcontent = document.getElementById("leftframe");
539 leftbutton = document.getElementById("showf");
544 new_col = calc_col("20");
545 masterf.cols = new_col;
546 document.body.scrollLeft=0;
547 document.body.style.overflow='hidden';
548 leftcontent.style.display = 'none';
549 leftbutton.style.display='block';
551 masterf.cols = calc_col(left_size);
552 document.body.style.overflow='';
553 leftbutton.style.display='none';
554 leftcontent.style.display='block';
559 function calc_col(c_w) {
562 if ($location_of_bar == 'right') {
563 $xtra .= ' right=true;';
565 $xtra .= ' right=false;';
577 function resizeframe(direction) {
579 masterf = window.parent.document.all["fs1"];
580 } else if (document.getElementById) {
581 window.parent.document.getElementById("fs1");
587 if ($location_of_bar == 'right') {
588 $xtra .= ' colPat=/^\*,(\d+)$/;';
590 $xtra .= ' colPat=/^(\d+),.*$/;';
595 old_col = masterf.cols;
596 colPat.exec(old_col);
599 new_col_width = parseInt(RegExp.$1) + 25;
602 if (parseInt(RegExp.$1) > 35) {
603 new_col_width = parseInt(RegExp.$1) - 25;
606 masterf.cols = calc_col(new_col_width);
615 /* style definitions */
619 <STYLE TYPE="text/css">
622 margin: 0px 0px 0px 0px;
623 padding: 5px 5px 5px 5px;
641 text-decoration: none;
642 background-color: $color[0];
647 background-color: $color[9];
669 border-left-width:0.1em;
670 border-left-color:blue;
671 border-bottom: solid;
672 border-bottom-width:0.1em;
673 border-bottom-color:blue;
686 background: $color[0];
700 displayHtmlHeader( 'SquirrelMail', $xtra );
702 /* If requested and not yet complete, attempt to autocreate folders. */
703 if ($auto_create_special && !isset($auto_create_done)) {
704 $autocreate = array($sent_folder, $trash_folder, $draft_folder);
705 foreach( $autocreate as $folder ) {
706 if (($folder != '') && ($folder != 'none')) {
707 if ( !sqimap_mailbox_exists($imapConnection, $folder)) {
708 sqimap_mailbox_create($imapConnection, $folder, '');
709 } else if (!sqimap_mailbox_is_subscribed($imapConnection, $folder)) {
710 sqimap_subscribe($imapConnection, $folder);
715 /* Let the world know that autocreation is complete! Hurrah! */
716 $auto_create_done = TRUE;
717 session_register('auto_create_done');
720 echo "\n<BODY BGCOLOR=\"$color[3]\" TEXT=\"$color[6]\" LINK=\"$color[6]\" VLINK=\"$color[6]\" ALINK=\"$color[6]\">\n";
722 do_hook('left_main_before');
723 if ($advanced_tree && $advanced_tree_frame_ctrl) {
724 /* nice future feature, needs layout !! volunteers? */
725 $right_pos = $left_size - 20;
726 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>';
727 echo '<div ID="showf" style="width=20;font-size:12;display:none;"><A HREF="javascript:hideframe(false)"><b>>></b></a></div>';
728 echo '<div ID="incrf" style="width=20;font-size:12"><A HREF="javascript:resizeframe(true)"><b>></b></a></div>';
729 echo '<div ID="decrf" style="width=20;font-size:12"><A HREF="javascript:resizeframe(false)"><b><</b></a></div></div>';
730 echo '<div ID="leftframe"><br><br>';
733 echo "\n\n" . html_tag( 'table', '', '', '', 'border="0" cellspacing="0" cellpadding="0" width="100%"' ) .
735 html_tag( 'td', '', 'left' ) .
736 '<center><font size="4"><b>'. _("Folders") . "</b><br></font>\n\n";
738 if ($date_format != 6) {
739 /* First, display the clock. */
740 if ($hour_format == 1) {
742 if ($date_format == 4) {
746 if ($date_format == 4) {
753 switch( $date_format ) {
755 $clk = date('m/d/y '.$hr, time());
758 $clk = date('d/m/y '.$hr, time());
762 $clk = date($hr, time());
765 $clk = substr( getDayName( date( 'w', time() ) ), 0, 3 ) . date( ', ' . $hr, time() );
767 $clk = str_replace(' ',' ',$clk);
769 echo '<center><small>' . str_replace(' ',' ',_("Last Refresh")) .
770 ": $clk</small></center>";
773 /* Next, display the refresh button. */
774 echo '<small>(<a href="../src/left_main.php" target="left">'.
775 _("refresh folder list") . '</a>)</small></center><br>';
777 /* Lastly, display the folder list. */
778 if ( $collapse_folders ) {
779 /* If directed, collapse or uncollapse a folder. */
781 setPref($data_dir, $username, 'collapse_folder_' . $fold, SM_BOX_COLLAPSED
);
782 } else if (isset($unfold)) {
783 setPref($data_dir, $username, 'collapse_folder_' . $unfold, SM_BOX_UNCOLLAPSED
);
787 if ($oldway) { /* normal behaviour SM */
789 $boxes = sqimap_mailbox_list($imapConnection);
790 /* Prepare do do out collapsedness and visibility computation. */
792 $boxcount = count($boxes);
794 /* Compute the collapsedness and visibility of each box. */
796 while ($curbox < $boxcount) {
797 $boxes[$curbox]['visible'] = TRUE;
798 compute_folder_children($curbox, $boxcount);
802 for ($i = 0; $i < count($boxes); $i++
) {
803 if ( $boxes[$i]['visible'] ) {
804 $mailbox = $boxes[$i]['formatted'];
805 $mblevel = substr_count($boxes[$i]['unformatted'], $delimiter) +
1;
807 /* Create the prefix for the folder name and link. */
808 $prefix = str_repeat(' ',$mblevel);
809 if (isset($collapse_folders) && $collapse_folders && $boxes[$i]['parent']) {
810 $prefix = str_replace(' ',' ',substr($prefix,0,strlen($prefix)-2)).
811 create_collapse_link($i) . ' ';
813 $prefix = str_replace(' ',' ',$prefix);
815 $line = "<NOBR><TT>$prefix</TT>";
817 /* Add the folder name and link. */
818 if (! isset($color[15])) {
819 $color[15] = $color[6];
822 if (in_array('noselect', $boxes[$i]['flags'])) {
823 if( isSpecialMailbox( $boxes[$i]['unformatted']) ) {
824 $line .= "<FONT COLOR=\"$color[11]\">";
826 $line .= "<FONT COLOR=\"$color[15]\">";
828 if (ereg("^( *)([^ ]*)", $mailbox, $regs)) {
829 $mailbox = str_replace(' ','',$mailbox);
830 $line .= str_replace(' ', ' ', $mailbox);
834 $line .= formatMailboxName($imapConnection, $boxes[$i]);
837 /* Put the final touches on our folder line. */
838 $line .= "</NOBR><BR>\n";
840 /* Output the line for this folder. */
844 } else { /* expiremental code */
845 $boxes = sqimap_mailbox_tree($imapConnection);
846 if (isset($advanced_tree) && $advanced_tree) {
847 echo '<FORM name=collapse action="left_main.php" METHOD=POST' .
848 'ENCTYPE="multipart/form-data"'."\n";
849 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>';
850 echo '<DIV ID=mailboxes CLASS=mailboxes>'."\n\n";
851 if (!isset($mbx)) $mbx=NULL;
852 ListAdvancedBoxes($boxes, $mbx);
853 echo '</div></small>'."\n";
858 } /* if ($oldway) else ... */
859 do_hook('left_main_after');
860 sqimap_logout($imapConnection);
862 echo '</td></tr></table>' . "\n".
863 "</div></body></html>\n";