+ if ($collapse_folders) {
+ if (isset($box_array['parent']))
+ $line .= FoldLink($box_array['unformatted'], $box_array['parent']);
+ else
+ $line .= '<tt> </tt> ';
+ }
+
+ $line .= "<a href=\"right_main.php?sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
+ if ($special_color == true)
+ $line .= "<FONT COLOR=\"$color[11]\">";
+ $line .= str_replace(' ', ' ', $mailbox);
+ if ($special_color == true)
+ $line .= "</font>";
+ $line .= "</a>";
+
+ if ($unseen > 0)
+ $line .= "</B>";
+
+ if (isset($unseen_found) && $unseen_found) {
+ $line .= " <small>$unseen_string</small>";
+ }
+
+ if (($move_to_trash == true) && ($real_box == $trash_folder)) {
+ if (! isset($numMessages))
+ $numMessages = sqimap_get_num_messages($imapConnection, $real_box);
+
+ if ($numMessages > 0)
+ {
+ $urlMailbox = urlencode($real_box);
+ $line .= "\n<small>\n";
+ $line .= " (<B><A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A></B>)";
+ $line .= "\n</small>\n";
+ }
+ }
+ $line .= "</NOBR>";
+ return $line;
+ }
+
+ if (isset($left_refresh) && ($left_refresh != "None") && ($left_refresh != "")) {
+ echo "<META HTTP-EQUIV=\"Expires\" CONTENT=\"Thu, 01 Dec 1994 16:00:00 GMT\">\n";
+ echo "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n";
+ echo "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"$left_refresh;URL=left_main.php\">\n";
+ }
+
+ echo "\n<BODY BGCOLOR=\"$color[3]\" TEXT=\"$color[6]\" LINK=\"$color[6]\" VLINK=\"$color[6]\" ALINK=\"$color[6]\">\n";
+
+ do_hook("left_main_before");
+
+ $boxes = sqimap_mailbox_list($imapConnection);
+
+ echo "<CENTER><FONT SIZE=4><B>";
+ echo _("Folders") . "</B><BR></FONT>\n\n";
+
+ echo "<small>(<A HREF=\"../src/left_main.php\" TARGET=\"left\">";
+ echo _("refresh folder list");
+ echo "</A>)</small></CENTER><BR>";
+ $delimeter = sqimap_get_delimiter($imapConnection);
+
+ if (isset($collapse_folders) && $collapse_folders) {
+ if (isset($fold))
+ setPref($data_dir, $username, 'collapse_folder_' . $fold, 1);
+ if (isset($unfold))
+ setPref($data_dir, $username, 'collapse_folder_' . $unfold, 0);
+ $IAmAParent = array();
+ for ($i = 0; $i < count($boxes); $i ++) {
+ $parts = explode($delimeter, $boxes[$i]['unformatted']);
+ $box_name = array_pop($parts);
+ $box_parent = implode($delimeter, $parts);
+ $hidden = 0;
+ if (isset($box_parent)) {
+ $hidden = getPref($data_dir, $username,
+ 'collapse_folder_' . $box_parent);
+ $IAmAParent[$box_parent] = $hidden;
+ }
+ $boxes[$i]['folded'] = $hidden;
+ }