Changed so that attachments don't have to be saved on the server.
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 3 Jan 2000 12:23:03 +0000 (12:23 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 3 Jan 2000 12:23:03 +0000 (12:23 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@100 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
INSTALL
config/config.php
functions/display_messages.php
functions/mailbox.php
functions/mime.php
src/compose.php
src/left_main.php
src/read_body.php

index a2d46bff374810ac8879b1b4a80a1aac92f30129..3e2a8a32e7763905797bff7307f1ecc6a19b8b30 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 Version 0.2 -- January 02, 2000
 -------------------------------
 - Attachment support (better MIME support in general)
 Version 0.2 -- January 02, 2000
 -------------------------------
 - Attachment support (better MIME support in general)
+- Themeable support replaced Custom Colors.  Themes are pluggable.
 
 
 Version 0.1.2  -- December 20, 1999
 
 
 Version 0.1.2  -- December 20, 1999
diff --git a/INSTALL b/INSTALL
index a10c48668189d824d48d2ea9b602cc11c4379f07..72f3eae7a2a110c10baf1d0f269449e6f9bc9847 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -8,5 +8,10 @@ overview of how to install SquirrelMail.
 
 3.  Edit the config file, config/config.php
 
 
 3.  Edit the config file, config/config.php
 
-4.  Point your browser to the location you specified in step 2.
+4.  Change permissions of the "data/" directory so that the web server
+    can write to it.  Here is an example from Red Hat 6.0:
+       cd <SQUIRREMAIL DIRECTORY>
+       chown nobody data
+
+5.  Point your browser to the location you specified in step 2.
     In this example, it's:  http://YOURHOST/squirrelmail-0.1/index.html
     In this example, it's:  http://YOURHOST/squirrelmail-0.1/index.html
index ad98ee56785c40af8865e34154010224e01eaa59..28314a5202f8b6dfc5ea9a662c19ca593389618e 100644 (file)
     $smtpPort = 25;
 
 //  This is displayed right after they log in
     $smtpPort = 25;
 
 //  This is displayed right after they log in
-    $motd = "";
-    $motd .= "You are using SquirrelMail's web-based email client.  If you run into any bugs or have ";
-    $motd .= "suggestions, please report them to our <A HREF=\"mailto:squirrelmail-list@sourceforge.net\">mailing list</A>";
+    $motd = "You are using SquirrelMail's web-based email client.  If you run into any bugs or have suggestions, please report them to our <A HREF=\"mailto:squirrelmail-list@sourceforge.net\">mailing list</A>";
 
 
-//  Customizable colors
+//  Themes
 //     You can define your own theme and put it in this directory.  You must
 //     call it as the example below.  You can name the theme whatever you
 //     want.  For an example of a theme, see the ones included in the config
 //     directory.
 //     You can define your own theme and put it in this directory.  You must
 //     call it as the example below.  You can name the theme whatever you
 //     want.  For an example of a theme, see the ones included in the config
 //     directory.
+//
+//     You can download themes from http://squirrelmail.sourceforge.net/index.php3?page=10
+//
 //   Example:   require("../config/default_theme.php");
 //   Example:   require("../config/default_theme.php");
-    require("../config/tan_theme.php");
+    require("../config/default_theme.php");
 
 //  Whether or not to use $color[11] for special folders.  If not, special
 //  folders will be the same color as the other folders
 
 //  Whether or not to use $color[11] for special folders.  If not, special
 //  folders will be the same color as the other folders
index 6dcc4a65ab6a9ddcb5f557c8c1f31b3c1a5a54f4..d5d4931e6be1fc3bf4307de89b33bc4e83860e1e 100644 (file)
@@ -9,7 +9,7 @@
 
     function error_username_password_incorrect($color) {
       echo "<BR>";
 
     function error_username_password_incorrect($color) {
       echo "<BR>";
-      echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
+      echo "<TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
       echo "   <TR>";
       echo "      <TD BGCOLOR=\"$color[0]\">";
       echo "         <FONT FACE=\"Arial,Helvetica\"><B><CENTER>ERROR</CENTER></B></FONT>";
       echo "   <TR>";
       echo "      <TD BGCOLOR=\"$color[0]\">";
       echo "         <FONT FACE=\"Arial,Helvetica\"><B><CENTER>ERROR</CENTER></B></FONT>";
 
     function general_info($motd, $org_logo, $version, $org_name, $color) {
       echo "<BR>";
 
     function general_info($motd, $org_logo, $version, $org_name, $color) {
       echo "<BR>";
-      echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
+      echo "<TABLE COLS=1 WIDTH=80% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
       echo "   <TR>";
       echo "      <TD BGCOLOR=\"$color[0]\">";
       echo "         <FONT FACE=\"Arial,Helvetica\"><B><CENTER>Welcome to $org_name's WebMail system</CENTER></B></FONT>";
       echo "   </TD></TR><TR><TD>";
       echo "   <TR><TD BGCOLOR=\"$color[4]\">";
       echo "   <TR>";
       echo "      <TD BGCOLOR=\"$color[0]\">";
       echo "         <FONT FACE=\"Arial,Helvetica\"><B><CENTER>Welcome to $org_name's WebMail system</CENTER></B></FONT>";
       echo "   </TD></TR><TR><TD>";
       echo "   <TR><TD BGCOLOR=\"$color[4]\">";
-      echo "         <FONT FACE=\"Arial,Helvetica\" SIZE=-1><CENTER>Running SquirrelMail version $version (c) 1999 by Nathan and Luke Ehresman.</CENTER></FONT>";
+      echo "         <FONT FACE=\"Arial,Helvetica\" SIZE=-1><CENTER>Running SquirrelMail version $version (c) 1999-2000.</CENTER></FONT>";
       echo "   </TD></TR><TR><TD>";
       echo "   </TD></TR><TR><TD>";
-      echo "      <TABLE COLS=2 WIDTH=75% NOBORDER align=\"center\">";
+      echo "      <TABLE COLS=2 WIDTH=90% NOBORDER align=\"center\">";
       echo "         <TR>";
       echo "            <TD BGCOLOR=\"$color[4]\"><CENTER>";
       if (strlen($org_logo) > 3)
       echo "         <TR>";
       echo "            <TD BGCOLOR=\"$color[4]\"><CENTER>";
       if (strlen($org_logo) > 3)
index 056abb2f670fb11f33f391414c6e3272daa8052c..38fe457e9a92a73c0fbdb51ef040042da22f8092 100644 (file)
    }
 
    /** This function gets all the information about a message.  Including Header and body **/
    }
 
    /** This function gets all the information about a message.  Including Header and body **/
-   function fetchMessage($imapConnection, $id) {
+   function fetchMessage($imapConnection, $id, $mailbox) {
+      $message["INFO"]["ID"] = $id;
+      $message["INFO"]["MAILBOX"] = $mailbox;
       $message["HEADER"] = fetchHeader($imapConnection, $id);
       $message["ENTITIES"] = fetchBody($imapConnection, $message["HEADER"]["BOUNDARY"], $id, $message["HEADER"]["TYPE0"], $message["HEADER"]["TYPE1"]);
 
       $message["HEADER"] = fetchHeader($imapConnection, $id);
       $message["ENTITIES"] = fetchBody($imapConnection, $message["HEADER"]["BOUNDARY"], $id, $message["HEADER"]["TYPE0"], $message["HEADER"]["TYPE1"]);
 
          $i++;
       }
 
          $i++;
       }
 
+      if ( ($encoding == "us-ascii") && ($type0 != "text") && ($type0 != "message") ) {
+         $encoding = "base64";
+      }
+
       /** remove the header from the entity **/
       $i = 0;
       while (trim($read[$i]) != "") {
       /** remove the header from the entity **/
       $i = 0;
       while (trim($read[$i]) != "") {
index 4ddc0e5e8ce38a41ede87605ab8903eb5d372abb..33148ada28f46a7996e777abc8d9d48ca5dbe1e2 100644 (file)
                $display_filename = $filename;
             }
 
                $display_filename = $filename;
             }
 
-            $body[$pos] .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../data/$filename\">" . $display_filename . "</A>&nbsp;&nbsp;<SMALL>(TYPE: $type0/$type1)</SMALL></TT><BR>";
-            $file = fopen("../data/$filename", "w");
 
 
-            /** Determine what encoding type is used **/
-            if ($message["ENTITIES"][$i]["ENCODING"] == "base64") {
-               $thefile = base64_decode($message["ENTITIES"][$i]["BODY"][0]);
-            } else {
-               $thefile = $message["ENTITIES"][$i]["BODY"][0];
-            }
+            $urlMailbox = urlencode($message["INFO"]["MAILBOX"]);
+            $id = $message["INFO"]["ID"];
+            $body[$pos] .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$i\">" . $display_filename . "</A>&nbsp;&nbsp;<SMALL>(TYPE: $type0/$type1)</SMALL></TT><BR>";
 
 
-            fwrite($file, $thefile);
-            fclose($file);
          }
       }
 
          }
       }
 
             $body[$q] = ereg_replace("=3D", "=", $body[$q]);
          }
          $newbody = $body;
             $body[$q] = ereg_replace("=3D", "=", $body[$q]);
          }
          $newbody = $body;
+      } else if ($encoding == "base64") {
+         $newbody = base64_decode($body);
       } else {
          $newbody = $body;
       }
       } else {
          $newbody = $body;
       }
index cfa8136c128a16950f7177e9b3115f86c5d51b68..41db1b7cc834568002a8cc1b544174f2e1c05be8 100644 (file)
@@ -14,7 +14,7 @@
 
    if ($forward_id) {
       selectMailbox($imapConnection, $mailbox, $numMessages);
 
    if ($forward_id) {
       selectMailbox($imapConnection, $mailbox, $numMessages);
-      $msg = fetchMessage($imapConnection, $forward_id);
+      $msg = fetchMessage($imapConnection, $forward_id, $mailbox);
 
       $body_ary = formatBody($msg);
       $tmp = "-------- Original Message ---------\n";
 
       $body_ary = formatBody($msg);
       $tmp = "-------- Original Message ---------\n";
@@ -28,7 +28,7 @@
 
    if ($reply_id) {
       selectMailbox($imapConnection, $mailbox, $numMessages);
 
    if ($reply_id) {
       selectMailbox($imapConnection, $mailbox, $numMessages);
-      $msg = fetchMessage($imapConnection, $reply_id);
+      $msg = fetchMessage($imapConnection, $reply_id, $mailbox);
 
       $body_ary = formatBody($msg);
       for ($i=0;$i < count($body_ary);$i++) {
 
       $body_ary = formatBody($msg);
       for ($i=0;$i < count($body_ary);$i++) {
index 39a210efcf72dcd3fd06d563a4d089ff3ae227eb..76da5f303267b7460c02d881af8d4239d0f77e00 100644 (file)
@@ -27,6 +27,7 @@
       selectMailbox($imapConnection, $mailbox, $numNessages);
       $unseen = unseenMessages($imapConnection, $numUnseen);
 
       selectMailbox($imapConnection, $mailbox, $numNessages);
       $unseen = unseenMessages($imapConnection, $numUnseen);
 
+      echo "<NOBR>";
       if ($unseen)
          $line .= "<B>";
 
       if ($unseen)
          $line .= "<B>";
 
@@ -59,6 +60,8 @@
          $line .= "&nbsp;&nbsp;&nbsp;&nbsp;(<B><A HREF=\"empty_trash.php?numMessages=$numMessages&mailbox=$urlMailbox\" TARGET=right style=\"text-decoration:none\">empty</A></B>)";
          $line .= "</FONT></a>\n";
       }
          $line .= "&nbsp;&nbsp;&nbsp;&nbsp;(<B><A HREF=\"empty_trash.php?numMessages=$numMessages&mailbox=$urlMailbox\" TARGET=right style=\"text-decoration:none\">empty</A></B>)";
          $line .= "</FONT></a>\n";
       }
+
+      echo "</NOBR>";
       return $line;
    }
 
       return $line;
    }
 
index 256a05aee57c6f348244b19eaa5e95170fc532fc..050f1c5ae7b815528aa3a14442a0c51fb6412a1a 100644 (file)
 
    // $message contains all information about the message
    // including header and body
 
    // $message contains all information about the message
    // including header and body
-   $message = fetchMessage($imapConnection, $passed_id);
+   $message = fetchMessage($imapConnection, $passed_id, $mailbox);
+   echo "$mailbox, $passed_id<BR>";
 
    echo "<HTML>";
 
    echo "<HTML>";
-   echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"" . $message["HEADER"]["TYPE"][0] . "/" . $message["HEADER"]["TYPE"][1] . "; charset=" . $message["HEADER"]["CHARSET"] . "\">";
    echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
    displayPageHeader($color, $mailbox);
 
    echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
    displayPageHeader($color, $mailbox);