- 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
// 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>";
// 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;
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> <A HREF=\"../src/download.php?where=".urlencode($where)."&what=".urlencode($what)."&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A> (TYPE: $type0/$type1)";
+ $body .= "<TT> <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> (TYPE: $type0/$type1)";
- $body .= "<TT> <A HREF=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A> (TYPE: $type0/$type1)";
+ $body .= "<TT> <A HREF=\"../src/download.php?startMessage=$startMessage&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A> (TYPE: $type0/$type1)";
}
if ($message->header->description)
$body .= " <b>" . htmlspecialchars($message->header->description)."</b>";
}
if ($message->header->description)
$body .= " <b>" . htmlspecialchars($message->header->description)."</b>";
#Possible ways a URL could finish.
$poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ". ", " ", ")", "(",
#Possible ways a URL could finish.
$poss_ends=array(" ", "\n", "\r", "<", ">", ".\r", ".\n", ". ", " ", ")", "(",
- """, "<", ">", ".<");
+ """, "<", ">", ".<", "]", "[", "{", "}", "--");
$done=False;
while (!$done) {
#Look for when a URL starts
$done=False;
while (!$done) {
#Look for when a URL starts
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";
}
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;
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
- 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]\"> </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]\"> </TD></TR>";
echo "</TABLE>\n";