minor - corrected gettext support.
[squirrelmail.git] / src / right_main.php
index ed51ab2013f3e49762c953dacdd0e23488055663..6fe9ef48a464b8726be99ca23c240240c0cfccba 100644 (file)
@@ -8,11 +8,15 @@
     **/
 
    if(!isset($logged_in)) {
-      echo "You must <a href=\"login.php\">login</a> first.";
+      echo _("You must ");
+      echo "<a href=\"login.php\">";
+      echo _("login");
+      echo "</a>";
+      echo _(" first.");
       exit;
    }
    if(!isset($username) || !isset($key)) {
-      echo "You need a valid user and password to access this page!";
+      echo _("You need a valid user and password to access this page!");
       exit;
    }
 ?>
@@ -29,8 +33,6 @@
    include("../functions/mailbox_display.php");
    include("../functions/display_messages.php");
 
-   echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
-   echo "<FONT FACE=\"Arial,Helvetica\">";
    /////////////////////////////////////////////////////////////////////////////////
    //
    // incoming variables from URL:
    //
    /////////////////////////////////////////////////////////////////////////////////
 
-
    // open a connection on the imap port (143)
    $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
 
+   /** If it was a successful login, lets load their preferences **/
+   include("../src/load_prefs.php");
+   echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
+   echo "<FONT FACE=\"Arial,Helvetica\">";
+
    // If the page has been loaded without a specific mailbox,
    //    just show a page of general info.
    if (!isset($mailbox)) {
@@ -66,7 +72,7 @@
    displayPageHeader($color, $mailbox);
 
    // Get the list of messages for this mailbox
-   showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort);
+   showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color);
 
    // close the connection
    fputs($imapConnection, "1 logout\n");