- fixed bugs in sorting by from and subject
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 10 Jul 2000 09:22:44 +0000 (09:22 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 10 Jul 2000 09:22:44 +0000 (09:22 +0000)
- After login, you go to INBOX, not the welcome screen
- worked out some more bugs in conf.pl
- subscribe/unsubscribe can select multiple folders at one time
- made empty trash happen on left side so you stay where you are
- standardized look and feel a little bit more
- fixed problems with renaming of folders

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@605 7612ce4b-ef26-0410-bec9-ea0150e637f0

23 files changed:
ChangeLog
README
TODO
config/conf.pl
config/forest_theme.php
functions/imap_general.php
functions/mailbox_display.php
functions/page_header.php
functions/prefs.php
src/download.php
src/empty_trash.php
src/folders.php
src/folders_rename_do.php
src/folders_rename_getname.php
src/folders_subscribe.php
src/left_main.php
src/options.php
src/options_display.php
src/options_folder.php
src/options_highlight.php
src/options_personal.php
src/read_body.php
src/right_main.php

index 2f028ac1808a5863f6c628c9a8db6ebb240baecd..7f97f0853d9bdda7079734298962c72f1ca3a6c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 Version 0.5pre1 -- DEVELOPMENT
 ------------------------------
-- Removed a bunch of annoying "success" screens
+- It is now possible to select multiple subscribes/unsubscribes
+- Removed a bunch of annoying "success" screens, improved navigation
 - Better IMAP session handling
 - Redid the options section and split it into different parts
 - Added "view all headers" option when reading a message
@@ -12,6 +13,7 @@ Version 0.5pre1 -- DEVELOPMENT
 - Added Polish translation from Lukasz Klimek <casa@LO.Pila.PL>
 
 
+
 Version 0.4 -- May 15, 2000 
 ---------------------------
 - If subject is blank, displays "(no subject)"
diff --git a/README b/README
index 853f64b57199ad0b46c888423c03e2d047f8b4db..c894b819ffdbc60312e0536f9d298de677c00b52 100644 (file)
--- a/README
+++ b/README
-Last revised:  December 26, 1999
-
-Contents
+SquirrelMail
+http://www.squirrelmail.org
+
+Introduction:
+-------------
+SquirrelMail is a standards-based webmail package written in PHP4. It includes 
+built-in pure PHP support for the IMAP and SMTP protocols, and all pages render 
+in pure HTML 4.0 (with no Javascript) for maximum compatibility across 
+browsers. It has very few requirements and is very easy to configure and 
+install. SquirrelMail has a all the functionality you would want from an email 
+client, including strong MIME support, address books, and folder manipulation.  
+
+Why did you guys create SquirrelMail?  The need arose in our organization for 
+the access of email and address books from anywhere in the world.  Obviously 
+a web interface is ideal for this, given that the user has access to the 
+Internet.  After reviewing several open source projects, we realized that 
+we were going to need to do some fairly major customizations to get things 
+to be a nice fit for our needs.  So the decision was made to create our 
+own for some of these reasons, and for fun (we really like PHP4).  We 
+decided to open source the project to contribute to the community that has 
+contributed so much to us.  Since then, it has grown much bigger than we ever
+imagined, and we have an awesome development team who are actively working
+on the project.
+
+We would love to hear from you!  The nature of open source projects make it
+hard to know who all is using your product.  It is always nice when we get
+emails from people just telling us that they're using SquirrelMail.  If you
+have a few minutes, please send us an email to let us know!  You can send
+it to our mailing list:  squirrelmail-list@sourceforge.net
+
+Contact:
 --------
-General Information ................................................. 1.0
-  About SquirrelMail ................................................ 1.1
-  History ........................................................... 1.2
-  Contact Information ............................................... 1.3
-
-Installation ........................................................ 2.0
-
-Liscensing .......................................................... 3.0
-
-FAQ ................................................................. 4.0
-  Can SquirrelMail run with PHP3? ................................... 4.1
-  Why PHP4 when it's only in BETA? .................................. 4.2
-  Where did you get the name "SquirrelMail?" ........................ 4.3
-  Is SquirrelMail stable enough to actually use? .................... 4.4
-
-
-
-
-
--- Section 1.0 --
-   General Information
-   ----------------------------------------------------------------------
-   1.1 - About SquirrelMail
-
-   So what exactly is SquirrelMail?  It's a web interface to email that's
-   written in PHP4.  It was designed to allow email access through your
-   server from anywhere in the world via the Web.
-
-
-
-   1.2 - History
-
-   The need arose in our organization for the access of email and address
-   books from anywhere in the world. Obviously a web interface is ideal
-   for this, given that the user has access to the Internet.  After
-   reviewing several open source projects we realized that we were going
-   to need to do some fairly major customizations to get things to be a
-   nice fit for our needs. So the decision was made to create our own for
-   some of these reasons, and for fun (we really like PHP4). We decided
-   to open source the project to contribute to the community that has
-   contributed so much to us.
-
-
-
-   1.3 - Contact Information
-
-   If you need to contact the developers of SquirrelMail for some reason,
-   please email the mailing list.  Bug reports and ideas should be sent
-   to the mailing list also.
-
-   Mailing List:  squirrelmail-list@sourceforge.net
-
-   If for some reason, you need to contact us directly, you can also
-   email us at:
-
-   Luke Ehresman:    luke@usa.om.org
-   Nathan Ehresman:  nathan@usa.om.org
-
-   Web Page:  squirrelmail.sourceforge.net
-
-
--- Section 2.0 --
-   Installation
-   ----------------------------------------------------------------------
-
-   Please view the INSTALL document that was included in this package.
-
-
-
-
-
--- Section 3.0 --
-   Liscensing
-   ----------------------------------------------------------------------
-
-   This product is distributed under the GPL liscense.  Please read
-   COPYING for more information.
-
-
-
-
-
--- Section 4.0 --
-   Frequently Asked Questions
-   ----------------------------------------------------------------------
-   Q: Can SquirrelMail be run with PHP3?
-
-      Yes, and No. It is fully developed under PHP4 BETA3, however PHP is
-      pretty good about backwards compatability. Theoretically, it
-      shouldn't be too hard to port it to PHP3, but you definately would
-      have to do some code tweaking. Let us know of any success or horror
-      stories if you attempt it.
-
-   Q: Why PHP4 when it's only in BETA?
-
-      PHP4 is significantly faster than PHP3. When we were viewing
-      mailboxes with 500-1000 messages in them, it would take about 15-30
-      seconds to sort them. With PHP4, that time has been cut down to 5-10
-      seconds for large boxes.
-
-   Q: Where did you get the name, "SquirrelMail"?
-
-      It's derived from the over-abundant squirrel population in Georgia
-      this year. We were playing volleyball one day, and saw a squirrel
-      try to jump between trees. He failed miserably and fell 40 feet to
-      the ground. So, we had squirrels on our mind the next day when we
-      were coming up with a name.
-      
-   Q: Is SquirrelMail stable enough to actually use?
-      SquirrelMail is stable, however, many of the features that are 
-      usually desired from an email client have not yet been implemented.
-
+It is pretty easy to get in contact with the developers if you need help or
+if you find bugs that need to be reported.  The best way to contact us would
+be through our mailing list which is actively monitored.  Just send an 
+email to:
+   
+   squirrelmail-list@sourceforge.net
+
+If you wish to actually subscribe to our mailing list, please visit our web
+page for instructions (http://www.squirrelmail.org) and go to the section
+titled "Mailing List".
+
+Installation:
+-------------
+  For detailed instructions on how to install SquirrelMail on your server,
+  please refer to the INSTALL document in the same directory as this document.
+
+Licensing: 
+----------
+  This product is distributed under the GPL.  Please read through the file
+  COPYING for more information about our license.
diff --git a/TODO b/TODO
index 9896e33cc92dccbde5ab1da0e0dcc0bc6b341c8c..2a73eec4e2f65ca3f8a7edf4c1375eb2a73ace00 100644 (file)
--- a/TODO
+++ b/TODO
@@ -8,14 +8,9 @@ initials = taken by that person
   -     Filters
   -     Better inline HTML support including graphics (content-disposition)
   -     Foreground themes
-  -     Configurable so that after login, you go directly to INBOX
-(glp)   When deleting or moving messages (empty trash too), go back to the 
-            list for the mail box you were looking at without having to click
-            a link
 (mcp)   Spell checking
 (ssg)   Search mailbox(es) for given criteria
   -     Remove subject and body requirements in Compose
-  -     Select multiple Unsubscribe/Subscribe folders at one time
   -     decodeHeader on to_ary, cc_ary, and filename
   -     Decode folder names for non-standard characters
 
@@ -39,4 +34,9 @@ Finished:
 (lme) (18.6.00)  Fix conf.pl script and add more error checking so it doesn't throw parse errors
 (lme) (21.6.00)  Rewrite of mime.php (see Gustav before any work is done)
 (lrb) (30.6.00)  CSV import for address book.
-(pl)  (5.7.00)   Insert In-Reply-To and References headers when replying to a message.
+(pl)  (05.7.00)  Insert In-Reply-To and References headers when replying to a message.
+(lme) (09.7.00)  When deleting or moving messages (empty trash too), go back to the 
+                 list for the mail box you were looking at without having to click
+                 a link
+(lme) (09.7.00)  Select multiple Unsubscribe/Subscribe folders at one time
+(lme) (09.7.00)  Configurable so that after login, you go directly to INBOX
index 6f91787275d5345e9a23d4fec4a91afb7f2b7a7a..3066133c0ac95b4fe9ae13a539e3f9a069f133be 100755 (executable)
@@ -31,12 +31,16 @@ while ($line = <FILE>) {
       $line =~ s/^\s+\$//;
       $var = $line;
       
+      $var =~ s/=/EQUALS/;
       if ($var =~ /^([a-z]|[A-Z])/) {
-         @options = split(/\s*=\s*/, $var);
+         @options = split(/\s*EQUALS\s*/, $var);
          $options[1] =~ s/[\n|\r]//g;
-         $options[1] =~ s/^"//g;
-         $options[1] =~ s/;\s*$//g;
-         $options[1] =~ s/"$//g;
+         $options[1] =~ s/\";$//;
+         $options[1] =~ s/;$//;
+         $options[1] =~ s/^"//;
+#         if (/"$/) {
+#            $options[1] =~ s/"$//;
+#         }
 
          if ($options[0] =~ /^theme\[[0-9]+\]\["PATH"\]/) {
             $sub = $options[0];
@@ -463,6 +467,7 @@ sub command71 {
    print "every time a user logs on.  You can use HTML or just plain\n";
    print "text.\n\n(Type @ on a blank line to exit)\n";
    
+   $new_motd = "";
    do {
       print "] ";
       $line = <STDIN>;
@@ -471,7 +476,7 @@ sub command71 {
          $line =~ s/  /\&nbsp;\&nbsp;/g;
          $line =~ s/\t/\&nbsp;\&nbsp;\&nbsp;\&nbsp;/g;
          $line =~ s/$/ /;
-         $line =~ s/"/\"/g;
+         $line =~ s/\"/\\\"/g;
 
          $new_motd = $new_motd . $line;
       }
@@ -1212,7 +1217,7 @@ sub set_defaults {
    print "\n";
    print "Please note that you will still need to go through and make sure\n";
    print "everything is correct.  This does not change everything.  There are\n";
-   print "only a few settings that thils will change.\n";
+   print "only a few settings that this will change.\n";
    print "\n";
 
    $continue = 0;
@@ -1240,7 +1245,7 @@ sub set_defaults {
          print "         default_folder_prefix = INBOX\n";
          print "                  trash_folder = INBOX.Trash\n";
          print "                   sent_folder = INBOX.Sent\n";
-         print "             show_prefix_optin = false\n";
+         print "            show_prefix_option = false\n";
          print "          default_sub_of_inbox = true\n";
          print "show_contain_subfolders_option = false\n";
          print "              imap_server_type = cyrus\n";
index b5ec89d2330a3d86724323eeb61546033ac17837..53f91ed79cb479537cb0406d20105277032cc1f2 100644 (file)
@@ -13,9 +13,9 @@
     $color[4]   = "#DEFFE7"; // (light purple)   Normal Background
     $color[5]   = "#B6D7BF"; // (darker gray)    Table Headers
     $color[6]   = "#DDFFDD"; // (black)          Text on left bar
-    $color[7]   = "#3C7F50"; // (light purple)   Links
+    $color[7]   = "#1C5F30"; // (light purple)   Links
     $color[8]   = "#000000"; // (black)          Normal text
-    $color[9]   = "#7E9F87"; // (mid purp)       Darker version of #0
+    $color[9]   = "#88a990"; // (mid purp)       Darker version of #0
     $color[10]  = "#5E7F67"; // (dark purp)      Darker version of #9
     $color[11]  = "#4A9B62"; // (dark red)       Special Folders color
 ?>
index 9e13d850bc9973def35b7f1aac88aac9e203d5db..133e9851b402dedd028ba781bb09a31898f4297d 100755 (executable)
@@ -24,6 +24,7 @@
 //                     echo "<small><tt><font color=cc0000>$read</font></tt></small><br>";
          $counter++;
       }       
+//      echo "--<br>";
       if (substr($read, 0, strlen("$pre OK")) == "$pre OK") {
          $response = "OK";
          $message = trim(substr($read, strlen("$pre OK"), strlen($read)));
index d1589cd5f0d2ba11cb9280c23f7a0397b29a8631..2b331a375cf47371282a502dbe18a4bd7a5b8735 100644 (file)
             $messages[$j]["DATE_STRING"] = getDateString($messages[$j]["TIME_STAMP"]);
             $messages[$j]["ID"] = $j+1;
             $messages[$j]["FROM"] = decodeHeader($from[$j]);
+            $messages[$j]["FROM-SORT"] = strtolower(sqimap_find_displayable_name(decodeHeader($from[$j])));
             $messages[$j]["SUBJECT"] = decodeHeader($subject[$j]);
+            $messages[$j]["SUBJECT-SORT"] = strtolower(decodeHeader($subject[$j]));
             $messages[$j]["TO"] = decodeHeader($to[$j]);
                                $messages[$j]["PRIORITY"] = $priority[$j];
             $messages[$j]["CC"] = $cc[$j];
+
+            # fix SUBJECT-SORT to remove Re:
+            if (substr($messages[$j]["SUBJECT-SORT"], 0, 3) == "re:" ||
+                substr($messages[$j]["SUBJECT-SORT"], 0, 3) == "aw:")
+               $messages[$j]["SUBJECT-SORT"] = trim(substr($messages[$j]["SUBJECT-SORT"], 3));    
    
             $num = 0;
             while ($num < count($flags[$j])) {
          if (($sort == 0) || ($sort == 1))
             $msort = array_cleave ($msgs, "TIME_STAMP");
          if (($sort == 2) || ($sort == 3))
-            $msort = array_cleave ($msgs, "FROM");
+            $msort = array_cleave ($msgs, "FROM-SORT");
          if (($sort == 4) || ($sort == 5))
-            $msort = array_cleave ($msgs, "SUBJECT");
+            $msort = array_cleave ($msgs, "SUBJECT-SORT");
 
          if(($sort % 2) == 1) {
             asort($msort);
index c3a95f49e475fc746b2e1367c511b0ffeb011cb1..aaf5abb6f2e6b78a62de86283f18c1885879c8ac 100644 (file)
       do_hook("menuline");
 
       echo "      </TD><TD ALIGN=right WIDTH=\"30%\">\n";
-      echo "         <A HREF=\"http://squirrelmail.sourceforge.net/index.php3?from=1\" TARGET=\"_top\">SquirrelMail</A>\n";
+      echo "         <A HREF=\"http://www.squirrelmail.org/index.php3?from=1\" TARGET=\"_top\">SquirrelMail</A>\n";
       echo "      </TD>\n";
       echo "   </TR>\n";
       echo "</TABLE>\n\n";
index b0a889418409a4be1532cbf3c8cf66ae6dd4a15b..e43d18071970f33891b6869181ac259f3b4f1478 100644 (file)
             $sig .= fgets($file, 1024);
          }
          fclose($file);
-      } else {
-         echo _("Signature file not found.");
-         exit;
       }
       return $sig;
    }
index 9d6d25e5a1835fcbed30de9439db584dd2a27bd7..f5b2ac4640954c7d1f8308d71c5e626fbbda4e70 100644 (file)
    $filename = $header->filename;
 
    if (strlen($filename) < 1) {
-      $filename = "untitled$passed_ent_id.$type1";
+      # set some standard suffixes to the filenames if the filename isn't known
+
+      if ($type1 == "plain" && $type0 == "text")                  $suffix = "txt";
+      else if ($type1 == "richtext" && $type0 == "text")          $suffix = "rtf";
+      else if ($type1 == "postscript" && $type0 == "application") $suffix = "ps";
+      else if ($type1 == "message" && $type0 == "rfc822")         $suffix = "msg";
+      else $suffix = $type1;
+
+      $filename = "untitled$passed_ent_id.$suffix";
    }
 
    // Note:
index 91d88d81b62852d35325717fa5ebc7f0eafd4564..aa3eb97e967a218df70f2a2a1e2cb04addfbba97 100644 (file)
@@ -56,8 +56,8 @@
    // now lets go through the tree and delete the folders
    walkTreeInPreOrderEmptyTrash(0, $imap_stream, $foldersTree);
 
-   sqimap_mailbox_select($imap_stream, $trash_folder, $numMessages);
-   displayPageHeader($color, $mailbox);
-   messages_deleted_message($trash_folder, $sort, $startMessage, $color);
+   $location = get_location();
+   header ("Location: $location/left_main.php");
+
    sqimap_logout($imap_stream);
 ?>
index f4366b47cd6d945e8eda0be6b99a0a8cac7dbc18..4be23786a33b2034f75825cee40d4634a32152e0 100644 (file)
 
    echo "<br>";
    echo "<TABLE WIDTH=95% COLS=1 ALIGN=CENTER>\n";
-   echo "   <TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER>\n";
+   echo "   <TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><b>\n";
    echo _("Folders");
-   echo "   </TD></TR>\n";
+   echo "   </b></TD></TR>\n";
    echo "</TABLE>\n";
 
    if ($success) {
       echo "<table width=100% align=center cellpadding=3 cellspacing=0 border=0>\n";
-      echo "   <tr><td><center><font color=\"$color[1]\">\n";
+      echo "   <tr><td><center>\n";
       if ($success == "subscribe") {
          echo "<b>" . _("Subscribed successfully!") . "</b><br>";
       } else if ($success == "unsubscribe") {
@@ -48,7 +48,7 @@
       } else if ($success == "rename") {
          echo "<b>" . _("Renamed successfully!") . "</b><br>";
       }
-      echo "</font><a href=\"../src/left_main.php\" target=left><font color=\"$color[1]\">" . _("refresh folder list") . "</font></a>";
+      echo "   <a href=\"../src/left_main.php\" target=left>" . _("refresh folder list") . "</a>";
       echo "   </center></td></tr>\n";
       echo "</table><br>\n";
    }
@@ -99,9 +99,9 @@
 
    /** DELETING FOLDERS **/
    echo "<TABLE WIDTH=70% COLS=1 ALIGN=CENTER cellpadding=2 cellspacing=0 border=0>\n";
-   echo "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><B>";
+   echo "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER>";
    echo _("Delete Folder");
-   echo "</B></TD></TR>";
+   echo "</TD></TR>";
    echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>";
 
    $count_special_folders = 0;
    echo "<tr><td bgcolor=\"$color[4]\">&nbsp;</td></tr>\n";
 
    /** CREATING FOLDERS **/
-   echo "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><B>";
+   echo "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER>";
    echo _("Create Folder");
-   echo "</B></TD></TR>";
+   echo "</TD></TR>";
    echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>";
    echo "<FORM ACTION=\"folders_create.php\" METHOD=\"POST\">\n";
    echo "<INPUT TYPE=TEXT SIZE=25 NAME=folder_name><BR>\n";
    echo "<tr><td bgcolor=\"$color[4]\">&nbsp;</td></tr>\n";
 
    /** RENAMING FOLDERS **/
-   echo "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><B>";
+   echo "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER>";
    echo _("Rename a Folder");
-   echo "</B></TD></TR>";
+   echo "</TD></TR>";
    echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>";
    if ($count_special_folders < count($boxes)) {
       echo "<FORM ACTION=\"folders_rename_getname.php\" METHOD=\"POST\">\n";
    }
    $boxes_sub = $boxes;
 
-   echo "<tr><td bgcolor=\"$color[4]\">&nbsp;</td></tr>\n";
+   echo "<tr><td bgcolor=\"$color[4]\">&nbsp;</td></tr></table>\n";
    
    /** UNSUBSCRIBE FOLDERS **/
-   echo "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER><B>";
+   echo "<TABLE WIDTH=70% COLS=1 ALIGN=CENTER cellpadding=2 cellspacing=0 border=0>\n";
+   echo "<TR><TD BGCOLOR=\"$color[9]\" ALIGN=CENTER colspan=3>";
    echo _("Unsubscribe/Subscribe");
-   echo "</B></TD></TR>";
-   echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>";
+   echo "</TD></TR>";
+   echo "<TR><TD BGCOLOR=\"$color[0]\" width=49% ALIGN=CENTER>";
    if ($count_special_folders < count($boxes)) {
       echo "<FORM ACTION=\"folders_subscribe.php?method=unsub\" METHOD=\"POST\">\n";
-      echo "<TT><SELECT NAME=mailbox>\n";
+      echo "<TT><SELECT NAME=mailbox[] multiple size=8>\n";
       for ($i = 0; $i < count($boxes); $i++) {
          $use_folder = true;
                        if ((strtolower($boxes[$i]["unformatted"]) != "inbox") &&
             echo "         <OPTION VALUE=\"$box\">$box2\n";
          }
       }
-      echo "</SELECT></TT>\n";
+      echo "</SELECT></TT><br>\n";
       echo "<INPUT TYPE=SUBMIT VALUE=\"";
       echo _("Unsubscribe");
       echo "\">\n";
-      echo "</FORM></TD></TR>\n";
+      echo "</FORM></TD>\n";
    } else {
-      echo _("No mailboxes found") . "<br><br></td></tr>";
+      echo _("No folders were found to unsubscribe from!") . "</td>";
    }
    $boxes_sub = $boxes;
+
+   echo "<td bgcolor=\"$color[9]\" width=2%>&nbsp;</td>";
    
    /** SUBSCRIBE TO FOLDERS **/
-   echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER>";
-   if ($count_special_folders <= count($boxes)) {
-      $imap_stream = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 1);
-      $boxes_all = sqimap_mailbox_list_all ($imap_stream);
-      
-      echo "<FORM ACTION=\"folders_subscribe.php?method=sub\" METHOD=\"POST\">\n";
-      echo "<tt><select name=mailbox>";
-      for ($i = 0; $i < count($boxes_all); $i++) {
+   echo "<TD BGCOLOR=\"$color[0]\" widtn=49% ALIGN=CENTER>";
+   $imap_stream = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 1);
+   $boxes_all = sqimap_mailbox_list_all ($imap_stream);
+
+      $box = "";
+      $box2 = "";
+      for ($i = 0, $q = 0; $i < count($boxes_all); $i++) {
          $use_folder = true;
                        for ($p = 0; $p < count ($boxes); $p++) {
                                if ($boxes_all[$i]["unformatted"] == $boxes[$p]["unformatted"]) {
                                }
                        }
                        if ($use_folder == true) {      
-            $box = $boxes_all[$i]["unformatted-dm"];
-            $box2 = replace_spaces($boxes_all[$i]["formatted"]);
-            echo "         <OPTION VALUE=\"$box\">$box2\n";
+            $box[$q] = $boxes_all[$i]["unformatted-dm"];
+            $box2[$q] = $boxes_all[$i]["formatted"];
+            $q++;
          }
       }
       sqimap_logout($imap_stream);
-      echo "</select></tt>";
-      echo "<INPUT TYPE=SUBMIT VALUE=\"";
-      echo _("Subscribe");
-      echo "\">\n";
+
+   if ($box && $box2) {
+      echo "<FORM ACTION=\"folders_subscribe.php?method=sub\" METHOD=\"POST\">\n";
+      echo "<tt><select name=mailbox[] multiple size=8>";
+
+      for ($q = 0; $q < count($box); $q++) {      
+         echo "         <OPTION VALUE=\"$box[$q]\">".$box2[$q]."\n";
+      }      
+      echo "</select></tt><br>";
+      echo "<INPUT TYPE=SUBMIT VALUE=\"". _("Subscribe") . "\">\n";
       echo "</FORM></TD></TR></TABLE><BR>\n";
    } else {
-      echo _("No mailboxes found") . "<br><br></td></tr></table>";
+      echo _("No folders were found to subscribe to!") . "</td></tr></table>";
    }
 
    sqimap_logout($imapConnection);
index f6108e1152ed57f2d56de7ff0187205b727dc09b..fe29b9aa7d1f0ca5b3e6bd3c0cc92a6ca38b5ddd 100644 (file)
       include("../functions/page_header.php");
    if (!isset($imap_php))
       include("../functions/imap.php");
-   if (!isset($display_messages_php))
-      include("../functions/display_messages.php");
 
    include("../src/load_prefs.php");
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
    $dm = sqimap_get_delimiter($imapConnection);
 
-   if ($method == "sub") {
-      $mailbox = trim($mailbox);
-      sqimap_subscribe ($imapConnection, $mailbox);
-   } else {
-      sqimap_unsubscribe ($imapConnection, $mailbox);
-   }
-
-   displayPageHeader($color, "None");
-   echo "<BR><BR><BR><CENTER><B>";
-   if ($method == "sub") {
-      echo _("Subscribed Successfully!");
-      echo "</B><BR><BR>";
-      echo _("You have been successfully subscribed.");
-   } else {
-      echo _("Unsubscribed Successfully!");
-      echo "</B><BR><BR>";
-      echo _("You have been successfully unsubscribed.");
-   }
-   echo "<BR><A HREF=\"webmail.php?right_frame=folders.php\" TARGET=_top>";
-   session_start();
-
-   if (!isset($config_php))
-      include("../config/config.php");
-   if (!isset($strings_php))
-      include("../functions/strings.php");
-   if (!isset($page_header_php))
-      include("../functions/page_header.php");
-   if (!isset($imap_php))
-      include("../functions/imap.php");
-
-   include("../src/load_prefs.php");
-
-   $dm = sqimap_get_delimiter($imapConnection);
-
    if (strpos($orig, $dm))
       $old_dir = substr($orig, 0, strrpos($orig, $dm));
    else
index 58fad366c492cf2606ff5c4ff184ad9ac147c357..f16f05730ab53856c151818654b5eec70eeee9d1 100644 (file)
@@ -41,7 +41,7 @@
    $old_name = stripslashes($old_name);
 
    displayPageHeader($color, "None");
-   echo "<TABLE WIDTH=100% COLS=1>";
+   echo "<br><TABLE align=center border=0 WIDTH=95% COLS=1>";
    echo "<TR><TD BGCOLOR=\"$color[0]\" ALIGN=CENTER><B>";
    echo _("Rename a folder");
    echo "</B></TD></TR>";
index 423252619014e17eeb4d9c888995ce258e8d693b..ef8c984778b576208515ae11c2038cf74b65007f 100644 (file)
 
    $location = get_location();
    if ($method == "sub") {
-      $mailbox = trim($mailbox);
-      sqimap_subscribe ($imapConnection, $mailbox);
-      header("Location: $location/folders.php?success=subscribe");
+      for ($i=0; $i < count($mailbox); $i++) {
+         $mailbox[$i] = trim($mailbox[$i]);
+         sqimap_subscribe ($imapConnection, $mailbox[$i]);
+         header("Location: $location/folders.php?success=subscribe");
+      }
    } else {
-      sqimap_unsubscribe ($imapConnection, $mailbox);
-      header("Location: $location/folders.php?success=unsubscribe");
+      for ($i=0; $i < count($mailbox); $i++) {
+         $mailbox[$i] = trim($mailbox[$i]);
+         sqimap_unsubscribe ($imapConnection, $mailbox[$i]);
+         header("Location: $location/folders.php?success=unsubscribe");
+      }
    }
    sqimap_logout($imapConnection);
 
index 4a435097d3fe8612aef9d8cac5334af366428c02..d4224a3a059290157db7e1d39f8b6457ab8be47a 100644 (file)
@@ -72,7 +72,7 @@
       if (($move_to_trash == true) && ($real_box == $trash_folder)) {
          $urlMailbox = urlencode($real_box);
          $line .= "\n<small>\n";
-         $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\" style=\"text-decoration:none\">"._("purge")."</A></B>)";
          $line .= "\n</small>\n";
       }
       $line .= "</NOBR>";
index bf3231662064bb3b09d53ae2146095e306750fcc..c099cb8c4c52da81e54589883b5d0f3594177e7b 100644 (file)
    is_logged_in(); 
 ?>
 
-<table width=100% cellpadding=2 cellspacing=2 border=0>
+<br>
+<table width=95% align=center cellpadding=2 cellspacing=2 border=0>
 <tr><td bgcolor="<? echo $color[0] ?>">
    <center><b><? echo _("Options") ?></b></center>
 </td></tr></table>
-<br>
 
 <?
    if ($submit_personal) {
@@ -54,7 +54,7 @@
       setPref($data_dir, $username, "use_signature", stripslashes($usesignature));  
       if (isset($signature_edit)) setSig($data_dir, $username, stripslashes($signature_edit)); 
       
-      echo "<center><b>"._("Successfully saved personal information!")."</b></center><br>";
+      echo "<br><center><b>"._("Successfully saved personal information!")."</b></center><br>";
    } else if ($submit_display) {  
       # Save display preferences
       setPref($data_dir, $username, "chosen_theme", $chosentheme);
@@ -66,7 +66,7 @@
       setPref($data_dir, $username, "left_size", $leftsize);
       setPref($data_dir, $username, "use_javascript_addr_book", $javascript_abook);
     
-      echo "<center><b>"._("Successfully saved display preferences!")."</b><br>";
+      echo "<br><center><b>"._("Successfully saved display preferences!")."</b><br>";
       echo "<a href=\"webmail.php?right_frame=options.php\" target=_top>"._("Refresh Page")."</a></center><br>";
    } else if ($submit_folder) { 
       # Save folder preferences
@@ -85,7 +85,7 @@
          setPref($data_dir, $username, "sent_folder", "");
       } 
       setPref($data_dir, $username, "folder_prefix", $folderprefix);
-      echo "<center><b>"._("Successfully saved folder preferences!")."</b><br>";
+      echo "<br><center><b>"._("Successfully saved folder preferences!")."</b><br>";
       echo "<a href=\"left_main.php\" target=left>"._("Refresh Folders")."</a></center><br>";
    }
 ?>
@@ -93,7 +93,7 @@
 
 <table width=90% cellpadding=0 cellspacing=10 border=0 align=center>
 <tr>
-   <td valign=top>
+   <td width=50% valign=top>
       <table width=100% cellpadding=3 cellspacing=0 border=0>
          <tr>
             <td bgcolor="<? echo $color[9] ?>">
          </tr>   
       </table><br>
    </td>
-   <td valign=top>
+   <td valign=top width=50%>
       <table width=100% cellpadding=3 cellspacing=0 border=0>
          <tr>
             <td bgcolor="<? echo $color[9] ?>">
index ea49ee617f8b431b0b87ee1600ea836b53b0e26b..6e99041459eb38a4a96c22981297c2a28069344c 100644 (file)
@@ -30,7 +30,8 @@
    displayPageHeader($color, "None");
    $chosen_language = getPref($data_dir, $username, "language");  
 ?>
-   <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
+   <br>
+   <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
       <center><b><? echo _("Options") . " - " . _("Display Preferences"); ?></b></center>
    </td></tr></table>
 
index 306f91488706e083b83199817653cfc59a8b384b..7beab5fa96f226e0ef04533ad011163d7338bd92 100644 (file)
@@ -33,7 +33,8 @@
    $boxes = sqimap_mailbox_list($imapConnection, $boxes);
    sqimap_logout($imapConnection);
 ?>
-   <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
+   <br>
+   <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
       <center><b><? echo _("Options") . " - " . _("Folder Preferences"); ?></b></center>
    </td></tr></table>
 
index 44060331ceac5690cb5953ac891eb498c1c43130..491dbe992ef3132fc066881f83c6c50208c3fdc1 100644 (file)
@@ -48,7 +48,8 @@
    include("../src/load_prefs.php");
    displayPageHeader($color, "None");
 ?>
-   <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
+   <br>
+   <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
       <center><b><? echo _("Options") . " - " . _("Message Highlighting"); ?></b></center>
    </td></tr></table>
 
       echo "<form action=\"options_highlight.php\">\n";
       echo "<input type=\"hidden\" value=\"save\" name=\"action\">\n";
       echo "<input type=\"hidden\" value=\"$id\" name=\"id\">\n";
-      echo "<table width=80% align=center cellpadding=2 cellspacing=0 border=0>\n";
-      echo "   <tr>\n";
-      echo "      <td align=right width=25%>\n";
+      echo "<table width=80% align=center cellpadding=3 cellspacing=0 border=0>\n";
+      echo "   <tr bgcolor=\"$color[0]\">\n";
+      echo "      <td align=right width=25%><b>\n";
       echo _("Identifying name") . ":";
-      echo "      </td>\n";
+      echo "      </b></td>\n";
       echo "      <td width=75%>\n";
       echo "         <input type=\"text\" value=\"".$message_highlight_list[$id]["name"]."\" name=\"name\">";
       echo "      </td>\n";
       echo "   </tr>\n";
-      echo "   <tr><td><br><br></td></tr>\n";
-      echo "   <tr>\n";
-      echo "      <td align=right width=25%>\n";
+      echo "   <tr><td><small><small>&nbsp;</small></small></td></tr>\n";
+      echo "   <tr bgcolor=\"$color[0]\">\n";
+      echo "      <td align=right width=25%><b>\n";
       echo _("Color") . ":";
-      echo "      </td>\n";
+      echo "      </b></td>\n";
       echo "      <td width=75%>\n";
       echo "         <input type=\"radio\" name=color_type value=1$selected_choose> &nbsp;<select name=newcolor_choose>\n";
       echo "            <option value=\"$color_list[0]\"$selected0>" . _("Dark Blue") . "\n";
       echo "\" name=\"newcolor_input\" size=7> "._("Ex: 63aa7f")."<br>\n";
       echo "      </td>\n";
       echo "   </tr>\n";
-      echo "   <tr><td><br><br></td></tr>\n";
-      echo "   <tr>\n";
-      echo "      <td align=right width=25%>\n";
+      echo "   <tr><td><small><small>&nbsp;</small></small></td></tr>\n";
+      echo "   <tr bgcolor=\"$color[0]\">\n";
+      echo "      <td align=right width=25%><b>\n";
       echo _("Match") . ":";
-      echo "      </td>\n";
+      echo "      </b></td>\n";
       echo "      <td width=75%>\n";
       echo "         <select name=match_type>\n";
       if ($message_highlight_list[$id]["match_type"] == "from")    echo "            <option value=\"from\" selected>From\n";
index 7c52d67c82488836ce9c430649b0f205841d5637..17949cc3c36f6e881e4f5e21a088eb64b34172a2 100644 (file)
@@ -34,7 +34,8 @@
    $email_address  = getPref($data_dir, $username, "email_address"); 
 
 ?>
-   <table width=100% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
+   <br>
+   <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<? echo $color[0] ?>">
       <center><b><? echo _("Options") . " - " . _("Personal Information"); ?></b></center>
    </td></tr></table>
 
index 964f79d58ff14fa04bbe0efd47db80d5edf85118..7a61361bad59866c9b5f7d95f0eee49176ad857e 100644 (file)
       $read = sqimap_read_data ($imapConnection, "a003", true, $a, $b); 
       
       echo "<br>";
-      echo "<table width=95% cellpadding=2 cellspacing=0 border=0 align=center>\n";
+      echo "<table width=100% cellpadding=2 cellspacing=0 border=0 align=center>\n";
       echo "   <TR><TD BGCOLOR=\"$color[9]\" WIDTH=100%><center><b>" . _("Viewing full header") . "</b> - ";
       echo "<a href=\"read_body.php?mailbox=".urlencode($mailbox)."&passed_id=$passed_id&startMessage=$startMessage&show_more=$show_more\">";
-      echo ""._("View message") . "</a></b></center></td></tr>\n";
-      echo "<tr><td><pre>";
+      echo ""._("View message") . "</a></b></center></td></tr></table>\n";
+      echo "<table width=99% cellpadding=2 cellspacing=0 border=0 align=center>\n";
+      echo "<tr><td><small><pre>";
       for ($i=1; $i < count($read)-1; $i++) {
          $read[$i] = htmlspecialchars($read[$i]);
          if (substr($read[$i], 0, 1) != "\t" && 
@@ -50,7 +51,7 @@
          }
          echo "$read[$i]";
       }
-      echo "</pre></td></tr></table>\n";
+      echo "</pre></small></td></tr></table>\n";
       echo "</body></html>";
       exit;
    }
index 2008ee58426bd860e96794d9af2c09532f835771..619aa938b4c304b83fdd8928eb69f690b5ca1e92 100644 (file)
    // If the page has been loaded without a specific mailbox,
    //    just show a page of general info.
    if (!isset($mailbox)) {
-      displayPageHeader($color, "None");
-      general_info($motd, $org_logo, $version, $org_name, $color);
-      echo "</BODY></HTML>";
-      exit;
+      $mailbox = "INBOX";
+      $sort = $newsort = 0;
+      $startMessage = 1;
+
+//      displayPageHeader($color, "None");
+//      general_info($motd, $org_logo, $version, $org_name, $color);
+//      echo "</BODY></HTML>";
+//      exit;
    }
 
    sqimap_mailbox_select($imapConnection, $mailbox);