X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fleft_main.php;h=112ad87b7aca3dc1a961b526acf28b002e0a17f4;hb=a37f3771b11544a29ebd521a69599381c90e7df2;hp=7a2d670c4d905948f49b3c1c7be3c3a2c06a3ab5;hpb=20db5033a7f36d40c7fe11d561069de9c9a2a970;p=squirrelmail.git diff --git a/src/left_main.php b/src/left_main.php index 7a2d670c..112ad87b 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -1,97 +1,154 @@ - + - -
- - - - - - include("../config/config.php3"); - include("../functions/strings.php3"); - include("../functions/imap.php3"); - - // ***************************************** - // Parse the incoming mailbox name and return a string that is the FOLDER.MAILBOX - // ***************************************** - function findMailboxName($mailbox) { - // start at -2 so that we skip the initial quote at the end of the mailbox name - $i = -2; - $char = substr($mailbox, $i, 1); - while ($char != "\"") { - $i--; - $temp .= $char; - $char = substr($mailbox, $i, 1); + + if ($unseen > 0) + $line .= ""; + + if ($unseen_found) { + $line .= " $unseen_string"; } - return strrev($temp); + + if (($move_to_trash == true) && ($real_box == $trash_folder)) { + $urlMailbox = urlencode($real_box); + $line .= "\n\n"; + $line .= " ("._("purge").")"; + $line .= "\n\n"; + } + $line .= ""; + return $line; } // open a connection on the imap port (143) - $imapConnection = fsockopen($imapServerAddress, 143, &$errorNumber, &$errorString); - if (!$imapConnection) { - echo "Error connecting to IMAP Server.\n";
- for ($i = 0;$i < count($str); $i++) {
- $mailbox = Chop($str[$i]);
- // 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.
- $mailbox = findMailboxName($mailbox);
- $periodCount = countCharInString($mailbox, ".");
-
- // indent the correct number of spaces.
- for ($j = 0;$j < $periodCount;$j++)
- echo " ";
-
- $mailboxURL = urlencode($mailbox);
- echo "";
- echo readShortMailboxName($mailbox, ".");
- echo "
\n";
+ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output
+
+ /** If it was a successful login, lets load their preferences **/
+ include("../src/load_prefs.php");
+
+ if (isset($left_refresh) && ($left_refresh != "None") && ($left_refresh != "")) {
+ echo "\n";
+ echo "\n";
+ echo "\n";
}
- echo "
";
+
+ echo "\n\n\n";
+
+ do_hook("left_main_before");
- fclose($imapConnection);
-
+ $boxes = sqimap_mailbox_list($imapConnection);
+
+ echo "