X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fleft_main.php;h=e3725eb8f151036a9403d8f1cbdb091ba0c9a6ff;hb=f8f9bed9bb69ef0432fbc67741f82071b6582b4d;hp=2c13f745d6624b3be25b35e4dcb757cd65710a02;hpb=e2370222dc6e0e9ec897575778ec5eec6c337ade;p=squirrelmail.git diff --git a/src/left_main.php b/src/left_main.php index 2c13f745..e3725eb8 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -13,43 +13,25 @@ } ?> -
- - - - include("../config/config.php"); include("../functions/strings.php"); include("../functions/imap.php"); include("../functions/mailbox.php"); + echo ""; + echo ""; + // open a connection on the imap port (143) $imapConnection = loginToImapServer($username, $key, $imapServerAddress); fputs($imapConnection, "1 list \"\" *\n"); $str = imapReadData($imapConnection); - echo ""; - echo "\n";
+ echo "";
+ echo "Folders
";
+ echo "(refresh folder list)
";
+ echo "\n";
for ($i = 0;$i < count($str); $i++) {
$mailbox = Chop($str[$i]);
$mailbox = findMailboxName($mailbox);
@@ -63,16 +45,23 @@
echo " ";
$mailboxURL = urlencode($mailbox);
+ selectMailbox($imapConnection, $mailbox, $numNessages);
+ $unseen = unseenMessages($imapConnection, $numUnseen);
+ if ($unseen)
+ echo "";
echo "";
echo readShortMailboxName($mailbox, ".");
if (($move_to_trash == true) && ($mailbox == $trash_folder)) {
$urlMailbox = urlencode($mailbox);
- selectMailbox($imapConnection, $mailbox, $numNessages);
echo " (empty)";
}
- echo "
\n";
+ echo "\n";
+ if ($numUnseen > 0) {
+ echo " ($numUnseen)";
+ }
+ echo "
\n";
}
- echo "
";
+ echo "";
fclose($imapConnection);