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 @@ - + - -
- - - - - - include("../config/config.php"); - include("../functions/strings.php"); - include("../functions/imap.php"); - include("../functions/mailbox.php"); - // open a connection on the imap port (143) - $imapConnection = loginToImapServer($username, $key, $imapServerAddress); - - fputs($imapConnection, "1 list \"\" *\n"); - $str = imapReadData($imapConnection); - - 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 "