clicking on email addr sends you to compose screen
[squirrelmail.git] / src / left_main.php
index 281b3fffb74e4a85f4fe2bfa1254b09048e34fa2..06f4ecdeee645dc5e1ee4ba4470902d83f768f39 100644 (file)
@@ -7,6 +7,8 @@
     **
     **/
 
+   session_start();
+
    if(!isset($username)) {
       echo "You need a valid user and password to access this page!";
       exit;
       include("../functions/imap.php");
    if (!isset($page_header_php))
       include("../functions/page_header.php");
+   if (!isset($i18n_php))
+      include("../functions/i18n.php");
+
 
    echo "<HTML>";
 
    function formatMailboxName($imapConnection, $mailbox, $real_box, $delimeter, $color, $move_to_trash) {
       require ("../config/config.php");
+      global $PHPSESSID;
 
       $mailboxURL = urlencode($real_box);
       sqimap_mailbox_select ($imapConnection, $real_box);
       }
 
       if ($special_color == true) {
-         $line .= "<a href=\"right_main.php?sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\"><FONT COLOR=\"$color[11]\">";
+         $line .= "<a href=\"right_main.php?PHPSESSID=$PHPSESSID&sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\"><FONT COLOR=\"$color[11]\">";
          $line .= replace_spaces($mailbox);
          $line .= "</font></a>";
       } else {
-         $line .= "<a href=\"right_main.php?sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
+         $line .= "<a href=\"right_main.php?PHPSESSID=$PHPSESSID&sort=0&startMessage=1&mailbox=$mailboxURL\" target=\"right\" style=\"text-decoration:none\">";
          $line .= replace_spaces($mailbox);
          $line .= "</font></a>";
       }
@@ -62,7 +68,7 @@
       if (($move_to_trash == true) && (trim($real_box) == $trash_folder)) {
          $urlMailbox = urlencode($real_box);
          $line .= "<small>";
-         $line .= "&nbsp;&nbsp;&nbsp;&nbsp;(<B><A HREF=\"empty_trash.php?numMessages=$numMessages&mailbox=$urlMailbox\" TARGET=right style=\"text-decoration:none\">"._("purge")."</A></B>)";
+         $line .= "&nbsp;&nbsp;&nbsp;&nbsp;(<B><A HREF=\"empty_trash.php?PHPSESSID=$PHPSESSID&numMessages=$numMessages&mailbox=$urlMailbox\" TARGET=right style=\"text-decoration:none\">"._("purge")."</A></B>)";
          $line .= "</small></a>\n";
       }
 
    }
 
    // open a connection on the imap port (143)
-   $imapConnection = sqimap_login($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 "<META HTTP-EQUIV=\"Expires\" CONTENT=\"Thu, 01 Dec 1994 16:00:00 GMT\">";
       echo "<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">"; 
@@ -88,7 +95,7 @@
    echo "<FONT SIZE=4><B><CENTER>";
    echo _("Folders") . "</B><BR></FONT>";
 
-   echo "<small>(<A HREF=\"../src/left_main.php\" TARGET=\"left\">";
+   echo "<small>(<A HREF=\"../src/left_main.php?PHPSESSID=$PHPSESSID\" TARGET=\"left\">";
    echo _("refresh folder list");
    echo "</A>)</small></CENTER><BR>";
    $delimeter = sqimap_get_delimiter($imapConnection);