X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fleft_main.php;h=39382ea096619b015c5099d110c3991845a2884d;hb=c95df3808257297105d60595ab869357359a89e7;hp=292f4b558223126d35998319abec216d921f782d;hpb=8eea5dd306881cc75bf2223f61eb56b738478073;p=squirrelmail.git diff --git a/src/left_main.php b/src/left_main.php index 292f4b55..39382ea0 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -1,80 +1,155 @@ - - - - - - - -"; - echo "
$org_name
"; - echo "Folders
"; - echo "
"; - echo "\n"; - for ($i = 0;$i < count($str); $i++) { - $mailbox = Chop($str[$i]); - $mailbox = findMailboxName($mailbox); - - // find the quote at the begining of the mailbox name. - // i subtract 1 from the strlen so it doesn't find the quote at the end of the mailbox name. - $periodCount = countCharInString($mailbox, "."); - - // indent the correct number of spaces. - for ($j = 0;$j < $periodCount;$j++) - echo "  "; - - $mailboxURL = urlencode($mailbox); - echo ""; - echo readShortMailboxName($mailbox, "."); - if (($move_to_trash == true) && ($mailbox == $trash_folder)) { - $urlMailbox = urlencode($mailbox); - selectMailbox($imapConnection, $mailbox, $numNessages); - echo "  (empty)"; + if ($unseen > 0) + $line .= ""; + + if ($unseen_found) { + $line .= " $unseen_string"; + } + + if (($move_to_trash == true) && ($real_box == $trash_folder)) { + $urlMailbox = urlencode($real_box); + $line .= "\n\n"; + $line .= "   ("._("purge").")"; + $line .= "\n\n"; } - echo "
\n"; + $line .= ""; + return $line; } - echo "
"; - fclose($imapConnection); - + if (isset($left_refresh) && ($left_refresh != "None") && ($left_refresh != "")) { + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "\n\n"; + + do_hook("left_main_before"); + + $boxes = sqimap_mailbox_list($imapConnection); + + echo "
"; + echo _("Folders") . "
\n\n"; + + echo "("; + echo _("refresh folder list"); + echo ")

"; + $delimeter = sqimap_get_delimiter($imapConnection); + + for ($i = 0;$i < count($boxes); $i++) { + $line = ""; + $mailbox = $boxes[$i]["formatted"]; + + if ($boxes[$i]["flags"]) { + $noselect = false; + for ($h = 0; $h < count($boxes[$i]["flags"]); $h++) { + if (strtolower($boxes[$i]["flags"][$h]) == "noselect") + $noselect = true; + } + if ($noselect == true) { + $line .= ""; + $line .= replace_spaces(readShortMailboxName($mailbox, $delimeter)); + $line .= ""; + } else { + $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]); + } + } else { + $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]); + } + echo "$line
\n"; + } + sqimap_logout($imapConnection); + do_hook("left_main_after"); ?> - +