X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fleft_main.php;h=36fed66b8b8a5311aacb671d31c9d66a624d3c01;hb=5917742752bea11a547aeba6e4102dd3655b4800;hp=8875cbdd7615edff33185cd7d1c84629c53b36b2;hpb=0ab893293dc3a652ed71a7dd9a082b323907bbf6;p=squirrelmail.git
diff --git a/src/left_main.php b/src/left_main.php
index 8875cbdd..36fed66b 100644
--- a/src/left_main.php
+++ b/src/left_main.php
@@ -1,4 +1,4 @@
-
+
-
-
- include("../config/config.php");
- include("../functions/array.php");
- include("../functions/strings.php");
- include("../functions/imap.php");
- include("../functions/mailbox.php");
+
+ if (!isset($config_php))
+ include("../config/config.php");
+ if (!isset($array_php))
+ include("../functions/array.php");
+ if (!isset($strings_php))
+ include("../functions/strings.php");
+ if (!isset($imap_php))
+ include("../functions/imap.php");
+ if (!isset($page_header_php))
+ include("../functions/page_header.php");
+ if (!isset($i18n_php))
+ include("../functions/i18n.php");
+
+
+ echo "";
function formatMailboxName($imapConnection, $mailbox, $real_box, $delimeter, $color, $move_to_trash) {
require ("../config/config.php");
+ global $PHPSESSID;
$mailboxURL = urlencode($real_box);
- selectMailbox($imapConnection, $real_box, $numNessages);
- $unseen = unseenMessages($imapConnection, $numUnseen);
+ sqimap_mailbox_select ($imapConnection, $real_box);
+ $unseen = sqimap_unseen_messages($imapConnection, $numUnseen);
echo "";
if ($unseen)
@@ -38,12 +49,12 @@
}
if ($special_color == true) {
- $line .= "";
- $line .= readShortMailboxName($mailbox, $delimeter);
+ $line .= "";
+ $line .= replace_spaces($mailbox);
$line .= "";
} else {
- $line .= "";
- $line .= readShortMailboxName($mailbox, $delimeter);
+ $line .= "";
+ $line .= replace_spaces($mailbox);
$line .= "";
}
@@ -51,14 +62,14 @@
$line .= "";
if ($numUnseen > 0) {
- $line .= " ($numUnseen)";
+ $line .= " ($numUnseen)";
}
if (($move_to_trash == true) && (trim($real_box) == $trash_folder)) {
$urlMailbox = urlencode($real_box);
- $line .= "";
- $line .= " (empty)";
- $line .= "\n";
+ $line .= "";
+ $line .= " ("._("purge").")";
+ $line .= "\n";
}
echo "";
@@ -66,56 +77,54 @@
}
// open a connection on the imap port (143)
- $imapConnection = loginToImapServer($username, $key, $imapServerAddress, 10); // the 10 is to hide the output
+ $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 "";
echo "";
- echo "";
+ echo "";
}
+
echo "
";
- echo "";
- getFolderList($imapConnection, $boxes);
+ $boxes = sqimap_mailbox_list($imapConnection);
- echo "";
- echo "Folders
";
+ echo "";
+ echo _("Folders") . "
";
- echo "(";
+ echo "(";
echo _("refresh folder list");
- echo ")
";
- echo "\n";
- $delimeter = findMailboxDelimeter($imapConnection);
+ echo ")
";
+ $delimeter = sqimap_get_delimiter($imapConnection);
for ($i = 0;$i < count($boxes); $i++) {
$line = "";
- $mailbox = $boxes[$i]["FORMATTED"];
- $boxFlags = getMailboxFlags($imapConnection, $boxes[$i]["RAW"]);
+ $mailbox = $boxes[$i]["formatted"];
- if (trim($boxFlags[0]) != "") {
+ if ($boxes[$i]["flags"]) {
$noselect = false;
- for ($h = 0; $h < count($boxFlags); $h++) {
- if (strtolower($boxFlags[$h]) == "noselect")
+ for ($h = 0; $h < count($boxes[$i]["flags"]); $h++) {
+ if (strtolower($boxes[$i]["flags"][$h]) == "noselect")
$noselect = true;
}
if ($noselect == true) {
- $line .= "";
- $line .= readShortMailboxName($mailbox, $delimeter);
- $line .= "";
+ $line .= "";
+ $line .= replace_spaces(readShortMailboxName($mailbox, $delimeter));
+ $line .= "";
} else {
- $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["UNFORMATTED"], $delimeter, $color, $move_to_trash);
+ $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $color, $move_to_trash);
}
} else {
- $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["UNFORMATTED"], $delimeter, $color, $move_to_trash);
+ $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $color, $move_to_trash);
}
echo "$line
";
}
- echo "";
fclose($imapConnection);
?>
-
+