- fixed some more HTML bugs
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 2 Aug 2000 12:51:17 +0000 (12:51 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 2 Aug 2000 12:51:17 +0000 (12:51 +0000)
- fixed bug that threw message index into infinite loop
- changed compose.php to have ENCTYPE=multipart/form-data again

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

functions/mime.php
functions/url_parser.php
src/compose.php
src/download.php
src/read_body.php

index e864b7b7a8476f2d00d2eec39e34fa0241209cb5..357aecae00ee1c6134d001888e8670e2f47a74f9 100644 (file)
       // 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.
       // 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.
-      global $username, $key, $imapServerAddress, $imapPort;
+      global $startMessage, $username, $key, $imapServerAddress, $imapPort;
 
       $id = $message->header->id;
       $urlmailbox = urlencode($message->header->mailbox);
 
       $id = $message->header->id;
       $urlmailbox = urlencode($message->header->mailbox);
 
       /** Display the ATTACHMENTS: message if there's more than one part **/
       if ($message->entities) {
 
       /** Display the ATTACHMENTS: message if there's more than one part **/
       if ($message->entities) {
+         $body .= "</TD></TR></TABLE>";
          $body .= "<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=4 BORDER=0><TR><TD BGCOLOR=\"$color[0]\">";
          $body .= "<TT><B>ATTACHMENTS:</B></TT>";
          $body .= "</TD></TR><TR><TD BGCOLOR=\"$color[0]\">";
          $body .= "<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=4 BORDER=0><TR><TD BGCOLOR=\"$color[0]\">";
          $body .= "<TT><B>ATTACHMENTS:</B></TT>";
          $body .= "</TD></TR><TR><TD BGCOLOR=\"$color[0]\">";
 
          $body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
          $body .= "</TD></TR></TABLE>";
 
          $body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
          $body .= "</TD></TR></TABLE>";
+      } else {
+         $body .= "</TD></TR></TABLE>";
       }
       return $body;
    }
       }
       return $body;
    }
    // to where to download these attachments
    function formatAttachments ($message, $ent_id, $mailbox, $id) {
       global $where, $what;
    // to where to download these attachments
    function formatAttachments ($message, $ent_id, $mailbox, $id) {
       global $where, $what;
+      global $startMessage;
       if ($message) {
          if (!$message->entities) {
             $type0 = strtolower($message->header->type0);
       if ($message) {
          if (!$message->entities) {
             $type0 = strtolower($message->header->type0);
                $ent = urlencode($message->header->entity_id);
                if ($where && $what) {   
                   // from a search
                $ent = urlencode($message->header->entity_id);
                if ($where && $what) {   
                   // from a search
-                  $body .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../src/download.php?where=".urlencode($where)."&what=".urlencode($what)."&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A>&nbsp;&nbsp;(TYPE: $type0/$type1)";
+                  $body .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../src/download.php?startMessage=$startMessage&where=".urlencode($where)."&what=".urlencode($what)."&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A>&nbsp;&nbsp;(TYPE: $type0/$type1)";
                } else {   
                } else {   
-                  $body .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A>&nbsp;&nbsp;(TYPE: $type0/$type1)";
+                  $body .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../src/download.php?startMessage=$startMessage&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A>&nbsp;&nbsp;(TYPE: $type0/$type1)";
                }
                if ($message->header->description)
                   $body .= "&nbsp;&nbsp;<b>" . htmlspecialchars($message->header->description)."</b>";
                }
                if ($message->header->description)
                   $body .= "&nbsp;&nbsp;<b>" . htmlspecialchars($message->header->description)."</b>";
index 05aca966c2e3567b45cd324689cfa1134b29fdb0..9d44543acb3ee0b2b869c3845ffec05985c69e5f 100644 (file)
@@ -35,7 +35,7 @@
       #Possible ways a URL could finish.
 
       $poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ".&nbsp;", "&nbsp;", ")", "(", 
       #Possible ways a URL could finish.
 
       $poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ".&nbsp;", "&nbsp;", ")", "(", 
-                       "&quot;", "&lt;", "&gt;", ".<");
+                       "&quot;", "&lt;", "&gt;", ".<", "]", "[", "{", "}", "--");
       $done=False;
       while (!$done) {
          #Look for when a URL starts
       $done=False;
       while (!$done) {
          #Look for when a URL starts
index 1fc27a8dccb8a0cd46052f3393b5bdae00003ffa..3936710f15aa8e0d2c96c58e2b0ebfb49ffa5890 100644 (file)
          echo "// --></SCRIPT>\n\n";
       }
 
          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";
       }                 
       if ($reply_id) {
          echo "<input type=hidden name=reply_id value=$reply_id>\n";
       }                 
index bb7adb366c16b47cdcfd376184ad5da3ee1cd331..7c92975b79016db4216da3cd6333ce85675d742a 100644 (file)
 
    function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at) {
       global $where, $what, $charset;
 
    function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at) {
       global $where, $what, $charset;
+      global $startMessage;
       displayPageHeader($color, "None");
 
       displayPageHeader($color, "None");
 
-      echo "<BR><TABLE WIDTH=90% BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\">";
+      echo "<BR><TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\">";
       echo "<B><CENTER>";
       echo _("Viewing a text attachment") . " - ";
       if ($where && $what) {
       echo "<B><CENTER>";
       echo _("Viewing a text attachment") . " - ";
       if ($where && $what) {
       } else {   
          echo "<a href=\"read_body.php?mailbox=".urlencode($mailbox)."&passed_id=$id&startMessage=$startMessage&show_more=0\">". _("View message") . "</a>";
       }   
       } else {   
          echo "<a href=\"read_body.php?mailbox=".urlencode($mailbox)."&passed_id=$id&startMessage=$startMessage&show_more=0\">". _("View message") . "</a>";
       }   
-      echo "</CENTER></B>";
-      echo "</TD></TR><TR><TD BGCOLOR=\"$color[4]\">";
+
       $urlmailbox = urlencode($mailbox);
       $urlmailbox = urlencode($mailbox);
-      echo "<CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$entid&mailbox=$urlmailbox\">";
+      echo "</b></td><tr><tr><td><CENTER><A HREF=\"../src/download.php?absolute_dl=true&passed_id=$id&passed_ent_id=$entid&mailbox=$urlmailbox\">";
       echo _("Download this as a file");
       echo _("Download this as a file");
-      echo "</A></CENTER><BR><BR><TT>";
+      echo "</A></CENTER><BR>";
+      echo "</CENTER></B>";
+      echo "</TD></TR></TABLE>";
+
+      echo "<TABLE WIDTH=98% BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER><TR><TD BGCOLOR=\"$color[0]\">";
+      echo "<TR><TD BGCOLOR=\"$color[4]\"><TT>";
+
       if ($type1 == "html")
          echo $body;
       else
       if ($type1 == "html")
          echo $body;
       else
index 197523ebd69ec188995eb470bada9f621379bd9c..740dc714703a220f99c7ba1ee5ea4b6db87c20aa 100644 (file)
 
    echo "$body";
 
 
    echo "$body";
 
-   echo "   </TD></TR>\n";
-   echo "</table>";
    echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=100% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
    echo "   <TR><TD BGCOLOR=\"$color[9]\">&nbsp;</TD></TR>";
    echo "</TABLE>\n";
    echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=100% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
    echo "   <TR><TD BGCOLOR=\"$color[9]\">&nbsp;</TD></TR>";
    echo "</TABLE>\n";