瀏覽代碼

- fixed bugs in conf.pl, removed some unnecessary options
- tweaked UI in a few more places
- made fonts larger when viewing full header

Luke Ehresman 25 年之前
父節點
當前提交
b849651bb9
共有 5 個文件被更改,包括 18 次插入47 次删除
  1. 7 37
      config/conf.pl
  2. 0 4
      config/config_default.php
  3. 2 2
      functions/page_header.php
  4. 7 2
      functions/smtp.php
  5. 2 2
      src/read_body.php

+ 7 - 37
config/conf.pl

@@ -173,10 +173,9 @@ while (($command ne "q") && ($command ne "Q")) {
    } elsif ($menu == 4) {
       print $WHT."General Options\n".$NRM;
       print "1.  Default Charset      : $WHT$default_charset$NRM\n";
-      print "2.  Auto Forward         : $WHT$auto_forward$NRM\n";
-      print "3.  Data Directory       : $WHT$data_dir$NRM\n";
-      print "4.  Attachment Directory : $WHT$attachment_dir$NRM\n";
-      print "5.  Default Left Size    : $WHT$default_left_size$NRM\n";
+      print "2.  Data Directory       : $WHT$data_dir$NRM\n";
+      print "3.  Attachment Directory : $WHT$attachment_dir$NRM\n";
+      print "4.  Default Left Size    : $WHT$default_left_size$NRM\n";
       print "\n";
       print "R   Return to Main Menu\n";
    } elsif ($menu == 5) {
@@ -264,10 +263,9 @@ while (($command ne "q") && ($command ne "Q")) {
          elsif ($command == 11){ $show_contain_subfolders_option = command211(); }
       } elsif ($menu == 4) {
          if    ($command == 1) { $default_charset    = command31 (); }
-         elsif ($command == 2) { $auto_forward       = command32 (); }
-         elsif ($command == 3) { $data_dir           = command33 (); }
-         elsif ($command == 4) { $attachment_dir     = command34 (); }
-         elsif ($command == 5) { $default_left_size  = command35 (); }
+         elsif ($command == 2) { $data_dir           = command33 (); }
+         elsif ($command == 3) { $attachment_dir     = command34 (); }
+         elsif ($command == 4) { $default_left_size  = command35 (); }
       } elsif ($menu == 5) {
          if ($command == 1) { 
             command41 (); 
@@ -614,8 +612,7 @@ sub command25 {
 sub command26 {
    print "By default, should messages get moved to the sent folder?  You\n";
    print "can specify the default sent folder in option 4.  If this is set\n";
-   print "to false, messages will get deleted immediately without moving\n";
-   print "to the sent folder.\n";
+   print "to false, messages will get sent an no copy will be made.\n";
    print "\n";
    print "Trash folder is currently: $sent_folder\n";
    print "\n";
@@ -778,32 +775,6 @@ sub command31 {
    return $new_default_charset;
 }
 
-# Auto Forward
-sub command32 {
-   print "There are some places that we will automatically forward the user\n";
-   print "rather than display pointless messages like 'Message sent!' or\n";
-   print "stuff like that.  Use this or not?\n";
-   print "\n";
-   print "NOTE:  This is not working currently as we are trying to find a\n";
-   print "       better way to handle this.  This option really doesn't do\n";
-   print "       much.\n";
-   print "\n";
-   
-   if ($auto_forward eq "true") {
-      $default_value = "y";
-   } else {
-      $default_value = "n";
-   }
-   print "Auto forward (y/n) [$WHT$default_value$NRM]: $WHT";
-   $new_show = <STDIN>;
-   if (($new_show =~ /^y\n/i) || (($new_show =~ /^\n/) && ($default_value eq "y"))) {
-      $auto_forward = "true";
-   } else {
-      $auto_forward = "false";
-   }
-   return $auto_forward;
-}
-
 # Data directory
 sub command33 {
    print "It is a possible security hole to have a writable directory\n";
@@ -1164,7 +1135,6 @@ sub save_data {
    print FILE "\n";
 
    print FILE "\t\$default_charset   = \"$default_charset\";\n";
-   print FILE "\t\$auto_forward      =  $auto_forward;\n";
    print FILE "\t\$data_dir          = \"$data_dir\";\n";
    print FILE "\t\$attachment_dir    = \"$attachment_dir\";\n";
    print FILE "\t\$default_left_size =  $default_left_size;\n";

+ 0 - 4
config/config_default.php

@@ -121,10 +121,6 @@
 //  since this implementation is faster than the alternatives.
     $default_charset = "iso-8859-1";
 
-//  Whether or not to use META tags and automatically forward after an
-//  action has been completed.
-    $auto_forward = true;
-
 //  Path to the data/ directory
 //    It is a possible security hole to have a writable directory
 //    under the web server's root directory (ex: /home/httpd/html).

+ 2 - 2
functions/page_header.php

@@ -87,7 +87,7 @@
       echo "</TABLE>\n\n";
       echo "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n";
       echo "   <TR>\n";
-      echo "      <TD ALIGN=left WIDTH=\"70%\">\n";
+      echo "      <TD ALIGN=left WIDTH=\"99%\">\n";
       $urlMailbox = $mailbox;
       displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right");
       echo "&nbsp;&nbsp;\n";
@@ -102,7 +102,7 @@
 
       do_hook("menuline");
 
-      echo "      </TD><TD ALIGN=right WIDTH=\"30%\">\n";
+      echo "      </TD><TD ALIGN=right nowrap WIDTH=\"1%\">\n";
       echo "         <A HREF=\"http://www.squirrelmail.org/index.php3?from=1\" TARGET=\"_top\">SquirrelMail</A>\n";
       echo "      </TD>\n";
       echo "   </TR>\n";

+ 7 - 2
functions/smtp.php

@@ -352,7 +352,12 @@
 
 
    function errorCheck($line) {
+      global $page_header_php;
       global $color;
+      if (!isset($page_header_php)) {
+         include "../functions/page_header.php";
+      }
+      
       // Status:  0 = fatal
       //          5 = ok
 
@@ -434,9 +439,9 @@
       }
 
       if ($status == 0) {
-         echo "<HTML><BODY BGCOLOR=#ffffff>";
+         displayPageHeader($color, "None");
          echo "<TT>";
-         echo "<BR><B>ERROR</B><BR><BR>";
+         echo "<br><b><font color=\"$color[1]\">ERROR</font></b><br><br>";
          echo "&nbsp;&nbsp;&nbsp;<B>Error Number: </B>$err_num<BR>";
          echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Reason: </B>$message<BR>";
          echo "<B>Server Response: </B>$line<BR>";

+ 2 - 2
src/read_body.php

@@ -39,7 +39,7 @@
       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></table>\n";
       echo "<table width=99% cellpadding=2 cellspacing=0 border=0 align=center>\n";
-      echo "<tr><td><small><pre>";
+      echo "<tr><td><tt>";
       for ($i=1; $i < count($read)-1; $i++) {
          $read[$i] = htmlspecialchars($read[$i]);
          if (substr($read[$i], 0, 1) != "\t" && 
@@ -51,7 +51,7 @@
          }
          echo "$read[$i]";
       }
-      echo "</pre></small></td></tr></table>\n";
+      echo "</tt></td></tr></table>\n";
       echo "</body></html>";
       exit;
    }