Преглед на файлове

fixed some html errors, added endlines

Luke Ehresman преди 25 години
родител
ревизия
33c369d337
променени са 8 файла, в които са добавени 35 реда и са изтрити 26 реда
  1. 6 6
      functions/imap_general.php
  2. 9 1
      functions/imap_mailbox.php
  3. 3 3
      functions/mime.php
  4. 1 1
      functions/page_header.php
  5. 2 2
      src/compose.php
  6. 4 4
      src/help.php
  7. 3 2
      src/left_main.php
  8. 7 7
      src/right_main.php

+ 6 - 6
functions/imap_general.php

@@ -40,18 +40,18 @@
 
       if ($handle_errors == true) {
          if ($response == "NO") {
-            echo "<br><b><font color=$color[2]>";
+            echo "<br><b><font color=$color[2]>\n";
             echo _("ERROR : Could not complete request.");
-            echo "</b><br>";
+            echo "</b><br>\n";
             echo _("Reason Given: ");
-            echo "$message</font><br>";
+            echo "$message</font><br>\n";
             exit;
          } else if ($response == "BAD") {
-            echo "<br><b><font color=$color[2]>";
+            echo "<br><b><font color=$color[2]>\n";
             echo _("ERROR : Bad or malformed request.");
-            echo "</b><br>";
+            echo "</b><br>\n";
             echo _("Server responded: ");
-            echo "$message</font><br>";
+            echo "$message</font><br>\n";
             exit;
          }
       }

+ 9 - 1
functions/imap_mailbox.php

@@ -35,9 +35,17 @@
    /******************************************************************************
     **  Selects a mailbox
     ******************************************************************************/
-   function sqimap_mailbox_select ($imap_stream, $mailbox, $hide=true) {
+   function sqimap_mailbox_select ($imap_stream, $mailbox, $hide=true, $recent=false) {
       fputs ($imap_stream, "a001 SELECT \"$mailbox\"\r\n");
      	$read = sqimap_read_data($imap_stream, "a001", true, $response, $message);
+      if ($recent) {
+         for ($i=0; $i<count($read); $i++) {
+            if (strpos(strtolower($read[$i]), "recent")) {
+               $r = explode(" ", $read[$i]);
+            }
+         }
+         return $r[1];
+      }
    }
 
    

+ 3 - 3
functions/mime.php

@@ -68,7 +68,7 @@
    //   $read = strtolower($bodystructure);
       $read = $bodystructure;
 
-      if ($debug_mime) echo "<tt>$read</tt><br><br>";
+      if ($debug_mime) echo "<tt>$read</tt><br><br>\n";
       // isolate the body structure and remove beginning and end parenthesis
       $read = trim(substr ($read, strpos(strtolower($read), "bodystructure") + 13));
       $read = trim(substr ($read, 0, -1));
@@ -79,7 +79,7 @@
          $end = mime_match_parenthesis(0, $read);
       }
 
-      if ($debug_mime) echo "<tt>$read</tt><br><br>";
+      if ($debug_mime) echo "<tt>$read</tt><br><br>\n";
 
       $msg = mime_parse_structure ($read, 0);
       $msg->header = $header;
@@ -95,7 +95,7 @@
    // to mime_get_elements()
    function mime_parse_structure ($structure, $ent_id) {
       global $debug_mime;
-      if ($debug_mime) echo "<font color=008800><tt>START: mime_parse_structure()</tt></font><br>";
+      if ($debug_mime) echo "<font color=008800><tt>START: mime_parse_structure()</tt></font><br>\n";
       $msg = new message();
       if (substr($structure, 0, 1) == "(") {
          $ent_id = mime_new_element_level($ent_id);

+ 1 - 1
functions/page_header.php

@@ -53,7 +53,7 @@
       
       do_hook ("generic_header");
 
-      echo "<TITLE>$title</TITLE>";
+      echo "<TITLE>$title</TITLE>\n";
       echo "</HEAD>\n\n";
    }
 

+ 2 - 2
src/compose.php

@@ -152,8 +152,8 @@
          echo "// --></SCRIPT>\n\n";
       }
 
-      echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
-      //echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
+      //echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
+      echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
       if ($reply_id) {
          echo "<input type=hidden name=reply_id value=$reply_id>\n";
       }		 

+ 4 - 4
src/help.php

@@ -171,14 +171,14 @@
          else echo "<a href=\"../src/help.php?chapter=".($chapter-1)."\">Previous</a> | ";
          echo "<a href=\"../src/help.php\">Table of Contents</a>";
          if ($chapter >= count($helpdir)) echo " | <font color=\"$color[9]\">Next</font>";
-         else echo " | <a href=\"../src/help.php?chapter=".($chapter+1)."\">Next</a>";
+         else echo " | <a href=\"../src/help.php?chapter=".($chapter+1)."\">Next</a>\n";
          echo "</center></small><br>\n";
 
          echo "<font size=5><b>$chapter - $help_info[0]</b></font><br><br>\n";
          if ($help_info[1])
-            echo "$help_info[1]";
+            echo "$help_info[1]\n";
          else   
-            echo "<p>$help_info[2]</p>";
+            echo "<p>$help_info[2]</p>\n";
 
          for ($n = $help_info[3]; $n < count($doc); $n++) {
             $section++;
@@ -190,7 +190,7 @@
             $n = $help_info[3];
          }
 
-         echo "<br><center><a href=\"#pagetop\">" . _("Top") . "</a></center>";
+         echo "<br><center><a href=\"#pagetop\">" . _("Top") . "</a></center>\n";
       }
    }
    do_hook("help_bottom"); 

+ 3 - 2
src/left_main.php

@@ -40,6 +40,7 @@
 
    displayHtmlHeader();
 
+
    function formatMailboxName($imapConnection, $mailbox, $real_box, $delimeter, $unseen) {
 		global $folder_prefix, $trash_folder, $sent_folder;
 		global $color, $move_to_sent, $move_to_trash;
@@ -112,7 +113,7 @@
       echo "<META HTTP-EQUIV=\"REFRESH\" CONTENT=\"$left_refresh;URL=left_main.php\">\n";
    }
    
-   echo "\n<BODY BGCOLOR=\"$color[3]\" TEXT=\"$color[6]\" LINK=\"$color[6]\" VLINK=\"$color[6]\" ALINK=\"$color[6]\">\n\n";
+   echo "\n<BODY BGCOLOR=\"$color[3]\" TEXT=\"$color[6]\" LINK=\"$color[6]\" VLINK=\"$color[6]\" ALINK=\"$color[6]\">\n";
 
    do_hook("left_main_before");
 
@@ -146,7 +147,7 @@
       } else {
          $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
       }
-      echo "\n$line<BR>\n";
+      echo "$line<BR>\n";
    }
    sqimap_logout($imapConnection);
    do_hook("left_main_after");

+ 7 - 7
src/right_main.php

@@ -77,13 +77,13 @@
    do_hook("right_main_after_header");
    
    if ($just_logged_in == 1 && strlen(trim($motd)) > 0) {
-      echo "<center><br>";
-      echo "<table width=70% cellpadding=0 cellspacing=0 border=0><tr><td bgcolor=\"$color[9]\">";
-      echo "<table width=100% cellpadding=5 cellspacing=1 border=0><tr><td bgcolor=\"$color[4]\">";
-      echo "$motd";
-      echo "</td></tr></table>";
-      echo "</td></tr></table>";
-      echo "</center><br>";
+      echo "<center><br>\n";
+      echo "<table width=70% cellpadding=0 cellspacing=0 border=0><tr><td bgcolor=\"$color[9]\">\n";
+      echo "<table width=100% cellpadding=5 cellspacing=1 border=0><tr><td bgcolor=\"$color[4]\">\n";
+      echo "$motd\n";
+      echo "</td></tr></table>\n";
+      echo "</td></tr></table>\n";
+      echo "</center><br>\n";
    }
 
 	if (isset($newsort)) {