Added "Themes" to personal preferences
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 6 Jan 2000 17:03:04 +0000 (17:03 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 6 Jan 2000 17:03:04 +0000 (17:03 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@108 7612ce4b-ef26-0410-bec9-ea0150e637f0

28 files changed:
config/config.php
config/deepocean_theme.php [new file with mode: 0644]
config/sandstorm_theme.php [new file with mode: 0644]
config/slashdot_theme.php [new file with mode: 0644]
data/default_pref
functions/mailbox_display.php
functions/mime.php
functions/prefs.php
functions/smtp.php
functions/strings.php
src/compose.php
src/compose_send.php
src/delete_message.php
src/download.php
src/empty_trash.php
src/folders.php
src/folders_create.php
src/folders_delete.php
src/folders_rename_do.php
src/folders_rename_getname.php
src/left_main.php
src/load_prefs.php [new file with mode: 0644]
src/move_messages.php
src/options.php
src/options_submit.php
src/read_body.php
src/right_main.php
src/signout.php

index f90446d..a254169 100644 (file)
 //
 //     You can download themes from http://squirrelmail.sourceforge.net/index.php3?page=10
 //
-//   Example:   require("../config/default_theme.php");
-    require("../config/default_theme.php");
+//  To add a new theme to the options that users can choose from, just add
+//  a new number to the array at the bottom, and follow the pattern.
+
+    $theme[0]["PATH"] = "../config/default_theme.php"; // This is your default theme.  Can be theme.
+    $theme[0]["NAME"] = "Default";
+
+    $theme[1]["PATH"] = "../config/sandstorm_theme.php";
+    $theme[1]["NAME"] = "Sand Storm";
+
+    $theme[2]["PATH"] = "../config/deepocean_theme.php";
+    $theme[2]["NAME"] = "Deep Ocean";
+
+    $theme[3]["PATH"] = "../config/slashdot_theme.php";
+    $theme[3]["NAME"] = "Slashdot";
+
 
 //  Whether or not to use $color[11] for special folders.  If not, special
 //  folders will be the same color as the other folders
diff --git a/config/deepocean_theme.php b/config/deepocean_theme.php
new file mode 100644 (file)
index 0000000..a740810
--- /dev/null
@@ -0,0 +1,21 @@
+<?
+   /** Author:       Luke Ehresman
+       Date:         January 3, 2000
+       Theme Name:   "Deep Blue"
+
+       Deep Ocean is a theme that is very blue.
+    **/
+
+    $color[0]   = "597E9B"; // (light gray)     TitleBar
+    $color[1]   = "800000"; // (red)
+    $color[2]   = "CC0000"; // (light red)      Warning/Error Messages
+    $color[3]   = "183667"; // (green-blue)     Left Bar Background
+    $color[4]   = "7A9CBF"; // (white)          Normal Background
+    $color[5]   = "B5C9DF"; // (light yellow)   Table Headers
+    $color[6]   = "FFFFFF"; // (black)          Text on left bar
+    $color[7]   = "014D7B"; // (blue)           Links
+    $color[8]   = "000000"; // (black)          Normal text
+    $color[9]   = "ABABAB"; // (mid-gray)       Darker version of #0
+    $color[10]  = "666666"; // (dark gray)      Darker version of #9
+    $color[11]  = "A7C5F3"; // (dark red)       Special Folders color
+?>
\ No newline at end of file
diff --git a/config/sandstorm_theme.php b/config/sandstorm_theme.php
new file mode 100644 (file)
index 0000000..3229c61
--- /dev/null
@@ -0,0 +1,21 @@
+<?
+   /** Author:       Luke Ehresman
+       Date:         January 2, 2000
+       Theme Name:   "Sand Storm"
+
+       This is a theme using Tan as its main color.
+    **/
+
+    $color[0]   = "CFB789"; // (darker tan)     TitleBar
+    $color[1]   = "800000"; // (red)
+    $color[2]   = "CC0000"; // (light red)      Warning/Error Messages
+    $color[3]   = "AF9769"; // (tan)            Left Bar Background
+    $color[4]   = "FFE9BF"; // (light tan)      Normal Background
+    $color[5]   = "FFFFCC"; // (light yellow)   Table Headers
+    $color[6]   = "000000"; // (black)          Text on left bar
+    $color[7]   = "8B6029"; // (blue)           Links
+    $color[8]   = "000000"; // (black)          Normal text
+    $color[9]   = "BFA779"; // (mid tan)        Darker version of #0
+    $color[10]  = "8F7739"; // (dark tan)       Darker version of #9
+    $color[11]  = "770000"; // (dark red)       Special Folders color
+?>
diff --git a/config/slashdot_theme.php b/config/slashdot_theme.php
new file mode 100644 (file)
index 0000000..50122c5
--- /dev/null
@@ -0,0 +1,22 @@
+<?
+   /** Author:       Luke Ehresman
+       Date:         January 3, 2000
+       Theme Name:   "Slashdot Theme"
+
+       This theme tries to mimic the color scheme from the "News
+       for Nerds" web site, www.slashdot.org.
+    **/
+
+    $color[0]   = "DCDCDC"; // (light gray)     TitleBar
+    $color[1]   = "800000"; // (red)
+    $color[2]   = "CC0000"; // (light red)      Warning/Error Messages
+    $color[3]   = "006668"; // (/. color)       Left Bar Background
+    $color[4]   = "FFFFFF"; // (white)          Normal Background
+    $color[5]   = "BABABA"; // (darker gray)    Table Headers
+    $color[6]   = "000000"; // (black)          Text on left bar
+    $color[7]   = "004949"; // (light /. color) Links
+    $color[8]   = "000000"; // (black)          Normal text
+    $color[9]   = "ABABAB"; // (mid-gray)       Darker version of #0
+    $color[10]  = "666666"; // (dark gray)      Darker version of #9
+    $color[11]  = "770000"; // (dark red)       Special Folders color
+?>
\ No newline at end of file
index b657b22..cc40cad 100644 (file)
@@ -1,2 +1,3 @@
-full_name=Luke Ehresman
+full_name=
 reply_to=
+chosen_theme=../config/default_theme.php
index dfc852d..ba3b61b 100644 (file)
@@ -32,7 +32,7 @@
    /**
     ** This function loops through a group of messages in the mailbox and shows them
     **/
-   function showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort) {
+   function showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color) {
       include ("../config/config.php");
 
       if (1 <= $numMessages) {
index f81d08f..3403e07 100644 (file)
        as the actual message in the HTML.   It contains everything needed, including
        HTML Tags, Attachments at the bottom, etc.
     **/
-   function formatBody($message) {
-      include ("../config/config.php");
+   function formatBody($message, $color) {
 
       /** this if statement checks for the entity to show as the primary message.  To
           add more of them, just put them in the order that is their priority.
          $body .= decodeBody($message["ENTITIES"][$ent_num]["BODY"], $message["ENTITIES"][$ent_num]["ENCODING"]);
       } else if (containsType($message, "text", "plain", $ent_num)) {
          $tmpbody = decodeBody($message["ENTITIES"][$ent_num]["BODY"], $message["ENTITIES"][$ent_num]["ENCODING"]);
-         $body .= "<TT>" . nl2br($tmpbody) . "</TT>";
+         $body .= "<TT>" . nl2br(trim($tmpbody)) . "</TT>";
       }
       // add other primary displaying message types here
       else {
          // find any type that's displayable
          if (containsType($message, "text", "any_type", $ent_num)) {
             $tmpbody = decodeBody($message["ENTITIES"][$ent_num]["BODY"], $message["ENTITIES"][$ent_num]["ENCODING"]);
-            $body .= "<TT>" . nl2br($tmpbody) . "</TT>";
+            $body .= "<TT>" . nl2br(trim($tmpbody)) . "</TT>";
          } else if (containsType($message, "message", "any_type", $ent_num)) {
             $tmpbody = decodeBody($message["ENTITIES"][$ent_num]["BODY"], $message["ENTITIES"][$ent_num]["ENCODING"]);
-            $body .= "<TT>" . nl2br($tmpbody) . "</TT>";
+            $body .= "<TT>" . nl2br(trim($tmpbody)) . "</TT>";
          }
       }
 
index 7253092..5a2a89d 100644 (file)
@@ -15,7 +15,7 @@
          $pref = fgets($file, 1024);
          if (substr($pref, 0, strpos($pref, "=")) == $string) {
             fclose($file);
-            return substr($pref, strpos($pref, "=")+1);
+            return trim(substr($pref, strpos($pref, "=")+1));
          }
       }
       fclose($file);
index 9d985d1..6a2e2ff 100644 (file)
 
    function sendMessage($smtpServerAddress, $smtpPort, $username, $domain, $t, $c, $b, $subject, $body, $version) {
       include("../config/config.php");
+      include("../functions/prefs.php");
 
       $to = parseAddrs($t);
       $cc = parseAddrs($c);
       $bcc = parseAddrs($b);
       $body = stripslashes($body);
-      $from = "$username@$domain";
+      $from_addr = "$username@$domain";
+      $reply_to = getPref($username, "reply_to");
+      $from = getPref($username, "full_name");
+      if ($from == "")
+         $from = "<$username@$domain>";
+      else
+         $from = $from . " <$username@$domain>";
+
 
-      echo "<FONT FACE=\"Arial,Helvetica\">";
       $smtpConnection = fsockopen($smtpServerAddress, $smtpPort, $errorNumber, $errorString);
       if (!$smtpConnection) {
          echo "Error connecting to SMTP Server.<br>";
          echo "$errorNumber : $errorString<br>";
          exit;
-      } else {
-         $tmp = fgets($smtpConnection, 1024);
       }
+      $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
 
       $to_list = getLineOfAddrs($to);
       $cc_list = getLineOfAddrs($cc);
 
       /** Lets introduce ourselves */
       fputs($smtpConnection, "HELO $domain\n");
+      $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
 
       /** Ok, who is sending the message? */
-      fputs($smtpConnection, "MAIL FROM:<$from>\n");
+      fputs($smtpConnection, "MAIL FROM:$from_addr\n");
+      $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
 
       /** send who the recipients are */
       for ($i = 0; $i < count($to); $i++) {
          fputs($smtpConnection, "RCPT TO:<$to[$i]>\n");
+         $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
       }
       for ($i = 0; $i < count($cc); $i++) {
          fputs($smtpConnection, "RCPT TO:<$cc[$i]>\n");
+         $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
       }
       for ($i = 0; $i < count($bcc); $i++) {
          fputs($smtpConnection, "RCPT TO:<$bcc[$i]>\n");
+         $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
       }
 
       /** Lets start sending the actual message */
       fputs($smtpConnection, "DATA\n");
+      $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
 
       fputs($smtpConnection, "Subject: $subject\n"); // Subject
-      fputs($smtpConnection, "From: <$from>\n"); // Subject
+      fputs($smtpConnection, "From: $from\n"); // Subject
       fputs($smtpConnection, "To: <$to_list>\n");    // Who it's TO
 
       if ($cc_list) {
          fputs($smtpConnection, "Cc: <$cc_list>\n"); // Who the CCs are
       }
       fputs($smtpConnection, "X-Mailer: SquirrelMail (version $version)\n"); // Identify SquirrelMail
-      fputs($smtpConnection, "Reply-To: $from\n");
+      fputs($smtpConnection, "Reply-To: $reply_to\n");
       fputs($smtpConnection, "MIME-Version: 1.0\n");
       fputs($smtpConnection, "Content-Type: text/plain\n");
 
       fputs($smtpConnection, "$body\n"); // send the body of the message
 
       fputs($smtpConnection, ".\n"); // end the DATA part
+      $tmp = nl2br(htmlspecialchars(fgets($smtpConnection, 1024)));
+
       fputs($smtpConnection, "QUIT\n"); // log off
-      echo "</FONT>";
 
       fclose($smtpConnection);
    }
index 5afc65f..38c8e7b 100644 (file)
@@ -86,5 +86,5 @@
    }
 
    /* SquirrelMail version number -- DO NOT CHANGE */
-   $version = "0.2.1";
+   $version = "0.3pre1";
 ?>
index 1f26644..ec97c74 100644 (file)
@@ -7,6 +7,7 @@
    include("../functions/date.php");
    include("../functions/mime.php");
 
+   include("../src/load_prefs.php");
 
    echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
    $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
index 9bbc254..6bc1c75 100644 (file)
@@ -7,6 +7,8 @@
    include("../functions/smtp.php");
    include("../functions/display_messages.php");
 
+   include("../src/load_prefs.php");
+
    if ($passed_body == "") {
       echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
       displayPageHeader($color, "None");
index 5381264..b7b8786 100644 (file)
@@ -6,6 +6,8 @@
    include("../functions/display_messages.php");
    include("../functions/imap.php");
 
+   include("../src/load_prefs.php");
+
    echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
 
    $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
index 094dc04..ce491fc 100644 (file)
@@ -7,6 +7,8 @@
    include("../functions/mailbox.php");
    include("../functions/date.php");
 
+   include("../src/load_prefs.php");
+
    function viewText($color, $body, $id, $entid, $mailbox) {
       echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
       displayPageHeader($color, "None");
@@ -16,7 +18,7 @@
       echo "</TD></TR><TR><TD BGCOLOR=\"$color[4]\">";
       $urlmailbox = urlencode($mailbox);
       echo "<FONT FACE=\"Arial, Helvetica\"><CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$entid&mailbox=$urlmailbox\">Download this as a file</A></CENTER><BR><BR></FONT><TT>";
-      echo nl2br($body);
+      echo nl2br(trim($body));
       echo "</TT></TD></TR></TABLE>";
    }
 
@@ -41,7 +43,7 @@
             $body = decodeBody($message["ENTITIES"][$passed_ent_id]["BODY"], $message["ENTITIES"][$passed_ent_id]["ENCODING"]);
             header("Content-type: $type0/$type1; name=\"$filename\"");
             header("Content-Disposition: attachment; filename=\"$filename\"");
-            echo $body;
+            echo trim($body);
             break;
          default:
             $body = decodeBody($message["ENTITIES"][$passed_ent_id]["BODY"], $message["ENTITIES"][$passed_ent_id]["ENCODING"]);
index 3de6307..e4d230f 100644 (file)
@@ -7,6 +7,8 @@
    include("../functions/imap.php");
    include("../functions/array.php");
 
+   include("../src/load_prefs.php");
+
    $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
 
    getFolderList($imapConnection, $boxes);
index e67e73f..c330289 100644 (file)
@@ -6,6 +6,8 @@
    include("../functions/mailbox.php");
    include("../functions/array.php");
 
+   include("../src/load_prefs.php");
+
    echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
 
    displayPageHeader($color, "None");
index b34a533..335aaeb 100644 (file)
@@ -6,6 +6,8 @@
    include("../functions/imap.php");
    include("../functions/display_messages.php");
 
+   include("../src/load_prefs.php");
+
    echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
    displayPageHeader($color, "None");
 
index 7b635a3..e0c08d0 100644 (file)
@@ -6,6 +6,8 @@
    include("../functions/mailbox.php");
    include("../functions/array.php");
 
+   include("../src/load_prefs.php");
+
    echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
    $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
    getFolderList($imapConnection, $boxes);
index b13ff6b..cd6e399 100644 (file)
@@ -5,6 +5,8 @@
    include("../functions/imap.php");
    include("../functions/mailbox.php");
 
+   include("../src/load_prefs.php");
+
    $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
    $dm = findMailboxDelimeter($imapConnection);
 
index bd78024..b6461a5 100644 (file)
@@ -5,6 +5,8 @@
    include("../functions/imap.php");
    include("../functions/mailbox.php");
 
+   include("../src/load_prefs.php");
+
    $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
    selectMailbox($imapConnection, $old, $numMessages);
 
index 76da5f3..dea9fd5 100644 (file)
@@ -20,7 +20,9 @@
    include("../functions/imap.php");
    include("../functions/mailbox.php");
 
-   function formatMailboxName($imapConnection, $mailbox, $delimeter) {
+   include("../src/load_prefs.php");
+
+   function formatMailboxName($imapConnection, $mailbox, $delimeter, $color) {
       require ("../config/config.php");
 
       $mailboxURL = urlencode($mailbox);
             $line .= readShortMailboxName($mailbox, $delimeter);
             $line .= "</FONT><FONT FACE=\"Arial,Helvetica\">";
          } else {
-            $line .= formatMailboxName($imapConnection, $mailbox, $delimeter);
+            $line .= formatMailboxName($imapConnection, $mailbox, $delimeter, $color);
          }
       } else {
-         $line .= formatMailboxName($imapConnection, $mailbox, $delimeter);
+         $line .= formatMailboxName($imapConnection, $mailbox, $delimeter, $color);
       }
       echo "$line<BR>";
    }
diff --git a/src/load_prefs.php b/src/load_prefs.php
new file mode 100644 (file)
index 0000000..97785f6
--- /dev/null
@@ -0,0 +1,11 @@
+<?
+   include("../functions/prefs.php");
+
+   $chosen_theme = getPref($username, "chosen_theme");
+
+   if (isset($chosen_theme)) {
+      require("$chosen_theme");
+   } else {
+      require($theme[0]["PATH"]);
+   }
+?>
\ No newline at end of file
index eab4901..8573b82 100644 (file)
@@ -6,6 +6,8 @@
    include("../functions/display_messages.php");
    include("../functions/imap.php");
 
+   include("../src/load_prefs.php");
+
    echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
 
    function putSelectedMessagesIntoString($msg) {
index 34a0bb9..f3aaea3 100644 (file)
@@ -6,7 +6,9 @@
    include("../functions/display_messages.php");
    include("../functions/imap.php");
    include("../functions/array.php");
-   include("../functions/prefs.php");
+
+   include("../src/load_prefs.php");
+
 
    echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
    displayPageHeader($color, "None");
@@ -27,7 +29,7 @@
    echo "<TABLE WIDTH=100% COLS=2 ALIGN=CENTER>\n";
    // FULL NAME
    echo "   <TR>";
-   echo "      <TD WIDTH=20% ALIGN=RIGHT BGCOLOR=\"$color[0]\">";
+   echo "      <TD WIDTH=20% ALIGN=RIGHT>";
    echo "         <FONT FACE=\"Arial,Helvetica\">";
    echo "         Full Name:";
    echo "         </FONT>";
@@ -40,7 +42,7 @@
    echo "   </TR>";
    // REPLY-TO
    echo "   <TR>";
-   echo "      <TD WIDTH=20% ALIGN=RIGHT BGCOLOR=\"$color[0]\">";
+   echo "      <TD WIDTH=20% ALIGN=RIGHT>";
    echo "         <FONT FACE=\"Arial,Helvetica\">";
    echo "         Reply-to:";
    echo "         </FONT>";
    echo "         </FONT>";
    echo "      </TD>";
    echo "   </TR>";
+   // THEME
+   echo "   <TR>";
+   echo "      <TD WIDTH=20% ALIGN=RIGHT>";
+   echo "         <FONT FACE=\"Arial,Helvetica\">";
+   echo "         Theme:";
+   echo "         </FONT>";
+   echo "      </TD>";
+   echo "      <TD WIDTH=80% ALIGN=LEFT>";
+
+   echo "         <TT><SELECT NAME=chosentheme>\n";
+   for ($i = 0; $i < count($theme); $i++) {
+      if ($theme[$i]["PATH"] == $chosen_theme)
+         echo "         <OPTION SELECTED VALUE=\"".$theme[$i]["PATH"]."\">".$theme[$i]["NAME"]."\n";
+      else
+         echo "         <OPTION VALUE=\"".$theme[$i]["PATH"]."\">".$theme[$i]["NAME"]."\n";
+   }
+   echo "         </SELECT></TT>";
+   echo "      </TD>";
+   echo "   </TR>";
+
+   echo "</SELECT></TT>\n";
+
+
    // SUBMIT BUTTON
    echo "   <TR>";
    echo "      <TD WIDTH=20%>";
    echo "      </TD>";
    echo "      <TD WIDTH=80% ALIGN=LEFT>";
-   echo "         <INPUT TYPE=SUBMIT VALUE=\"Submit\">\n";
+   echo "         <BR><INPUT TYPE=SUBMIT VALUE=\"Submit\">\n";
    echo "      </TD>";
    echo "   </TR>";
 
index 687c9ce..3f12860 100644 (file)
@@ -6,20 +6,20 @@
    include("../functions/display_messages.php");
    include("../functions/imap.php");
    include("../functions/array.php");
-   include("../functions/prefs.php");
+
+   include("../src/load_prefs.php");
 
    echo "<HTML>";
-   if ($auto_forward == true)
-      echo "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"0;URL=right_main.php\">";
    echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
    displayPageHeader($color, "None");
 
    setPref($username, "full_name", $full_name);
    setPref($username, "reply_to", $reply_to);
+   setPref($username, "chosen_theme", $chosentheme);
 
    echo "<FONT FACE=\"Arial,Helvetica\">";
    echo "<BR><BR><BR><CENTER><B>Options Saved!</B><BR><BR>";
-   echo "You will be automatically forwarded.<BR>If not, <A HREF=\"right_main.php\">click here</A>";
+   echo "Your options have been saved.<BR><A HREF=\"webmail.php\" TARGET=_top>Click here</A> to continue.";
    echo "</CENTER></FONT>";
    echo "</BODY></HTML>";
 ?>
\ No newline at end of file
index 32fd6ca..61c31d2 100644 (file)
@@ -7,6 +7,8 @@
    include("../functions/mailbox.php");
    include("../functions/date.php");
 
+   include("../src/load_prefs.php");
+
    $imapConnection = loginToImapServer($username, $key, $imapServerAddress);
    selectMailbox($imapConnection, $mailbox, $numMessages);
 
    echo "   </TD></TR>";
 
    echo "   <TR><TD BGCOLOR=\"$color[4]\" WIDTH=100%>\n";
-   $body = formatBody($message);
+   $body = formatBody($message, $color);
    echo "<BR>";
 
    echo "$body";
index 1def94e..988267b 100644 (file)
@@ -29,6 +29,8 @@
    include("../functions/mailbox_display.php");
    include("../functions/display_messages.php");
 
+   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\">";
    /////////////////////////////////////////////////////////////////////////////////
@@ -65,7 +67,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");
index 9936f30..9439d60 100644 (file)
@@ -17,6 +17,8 @@
 <HTML>
 <?
    include ("../config/config.php");
+   include("../src/load_prefs.php");
+
    echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
    echo "<BR><BR><TABLE BGCOLOR=\"$color[4]\" BORDER=0 COLS=1 WIDTH=50% CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>";
    echo "   <TR BGCOLOR=\"$color[3]\" WIDTH=100%>";