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 f90446d97af21549a7a0ffcf689b31fdb1a1392f..a254169675a552c36c0864878622ea79ec912faa 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 b657b223f33b74e27d41243df8de98e9e6c2e723..cc40cad89e3aae440573e0dc7ff8d2bb125b1eff 100644 (file)
@@ -1,2 +1,3 @@
-full_name=Luke Ehresman
+full_name=
 reply_to=
+chosen_theme=../config/default_theme.php
index dfc852dec7a275f4c61f0644030c018b1e3664c2..ba3b61b8ecede668019236e82ca1b1fc551d889e 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 f81d08f07efb21981ff5044b810f0c3ee22084a3..3403e0726866ee9f04b1d8300c86b832caf12acd 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 7253092b22cee9715f7cbead96013c28f90e86c3..5a2a89d45059eab6ceb4f92632484ca36994ba72 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 9d985d1582357529aab2ac7cefda30cc9213b091..6a2e2ff5d8f8fe28c65ed61d3fc065f0f1a8f948 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 5afc65f5062ae5020d7addf292881f0a1d65a2cd..38c8e7b0c4959d8e5a9f49a06682096b840d3a77 100644 (file)
@@ -86,5 +86,5 @@
    }
 
    /* SquirrelMail version number -- DO NOT CHANGE */
-   $version = "0.2.1";
+   $version = "0.3pre1";
 ?>
index 1f26644b5a5e1549a3797451675a5720c6d41ae3..ec97c741b14bb63ad4198acd8efef53374e3c6e5 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 9bbc254b5f7a1b5189841f977df4f9d3c8534791..6bc1c75f24e9c190da342c86ed73c12d90da6b49 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 5381264c2acf34ec20fd55d1dcc862706fd1aa47..b7b87862e949c650f4eaf5d6a637e68c08b3d16c 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 094dc04e27810c8f7ef0dbe3498f014982f35c6f..ce491fcf562112f29909b0489721ebfbdc9576af 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 3de6307345f37f1797f5fcceee19911da5d857c8..e4d230fea53e82c69635bc734a36647c572315a0 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 e67e73fe3cbf53e2d64517bea4f2afe477460956..c330289905faebe3e25694ec5195eecd73d8498f 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 b34a53328d37e8b8d972185267d9575c6984c477..335aaeb227dbf294d10a457f5cde0671bc4aa5b4 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 7b635a355b26248875ec0ea1ce461d36e947c5f7..e0c08d0c61fc83bd73c521fb20dd98318fc3df49 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 b13ff6bdc5f5d6e72d5bc27918eaf93fc89eece9..cd6e399a17bdbbc47c996b90f2e995d6c0955b92 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 bd78024c5f9882c0d118b8655aac001c847cae4c..b6461a517dc3db507bd683ea3dfd7c143daaff22 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 76da5f303267b7460c02d881af8d4239d0f77e00..dea9fd580f7a38c01fddf191a196404784b8be5d 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 eab4901e1f1f4823d7345d0a3fd5dfdd17a54a2d..8573b8214abb30f69e850e28229e3211784402ad 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 34a0bb9087827980f9918fbbf42c2abf65ae0ec2..f3aaea3977eba5b510d7e99cd2b7107bf86d214c 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 687c9cedb251b4b6125b31539a6f9c1f0f7d259f..3f128602c15632b9db9c48a8d7292e8882775018 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 32fd6ca0d365f61ab7969bb6789c7b8eb8c4b5c4..61c31d275c313a81188c639482914cd533eff2c5 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 1def94edfdb5ffb4280ea0ed82db1001b205d77a..988267b3f08cb65aab4df0348fa0e1cb7205c643 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 9936f307de0599e7ab5228dbb93bb0f92b8575ce..9439d60f79daf92f5351cc208d4dae7bec7db449 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%>";