|
@@ -427,7 +427,7 @@
|
|
// this if statement checks for the entity to show as the
|
|
// this if statement checks for the entity to show as the
|
|
// primary message. To add more of them, just put them in the
|
|
// primary message. To add more of them, just put them in the
|
|
// order that is their priority.
|
|
// order that is their priority.
|
|
- global $username, $key, $imapServerAddress, $imapPort;
|
|
|
|
|
|
+ global $startMessage, $username, $key, $imapServerAddress, $imapPort;
|
|
|
|
|
|
$id = $message->header->id;
|
|
$id = $message->header->id;
|
|
$urlmailbox = urlencode($message->header->mailbox);
|
|
$urlmailbox = urlencode($message->header->mailbox);
|
|
@@ -449,6 +449,7 @@
|
|
|
|
|
|
/** Display the ATTACHMENTS: message if there's more than one part **/
|
|
/** Display the ATTACHMENTS: message if there's more than one part **/
|
|
if ($message->entities) {
|
|
if ($message->entities) {
|
|
|
|
+ $body .= "</TD></TR></TABLE>";
|
|
$body .= "<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=4 BORDER=0><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 .= "<TT><B>ATTACHMENTS:</B></TT>";
|
|
$body .= "</TD></TR><TR><TD BGCOLOR=\"$color[0]\">";
|
|
$body .= "</TD></TR><TR><TD BGCOLOR=\"$color[0]\">";
|
|
@@ -456,6 +457,8 @@
|
|
|
|
|
|
$body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
|
|
$body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
|
|
$body .= "</TD></TR></TABLE>";
|
|
$body .= "</TD></TR></TABLE>";
|
|
|
|
+ } else {
|
|
|
|
+ $body .= "</TD></TR></TABLE>";
|
|
}
|
|
}
|
|
return $body;
|
|
return $body;
|
|
}
|
|
}
|
|
@@ -464,6 +467,7 @@
|
|
// to where to download these attachments
|
|
// to where to download these attachments
|
|
function formatAttachments ($message, $ent_id, $mailbox, $id) {
|
|
function formatAttachments ($message, $ent_id, $mailbox, $id) {
|
|
global $where, $what;
|
|
global $where, $what;
|
|
|
|
+ global $startMessage;
|
|
if ($message) {
|
|
if ($message) {
|
|
if (!$message->entities) {
|
|
if (!$message->entities) {
|
|
$type0 = strtolower($message->header->type0);
|
|
$type0 = strtolower($message->header->type0);
|
|
@@ -481,9 +485,9 @@
|
|
$ent = urlencode($message->header->entity_id);
|
|
$ent = urlencode($message->header->entity_id);
|
|
if ($where && $what) {
|
|
if ($where && $what) {
|
|
// from a search
|
|
// 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)";
|
|
} else {
|
|
} else {
|
|
- $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)
|
|
if ($message->header->description)
|
|
$body .= " <b>" . htmlspecialchars($message->header->description)."</b>";
|
|
$body .= " <b>" . htmlspecialchars($message->header->description)."</b>";
|