require_once('../functions/mime.php');
require_once('../functions/date.php');
require_once('../functions/url_parser.php');
-
+
/**
* Given an IMAP message id number, this will look it up in the cached
* and sorted msgs array and return the index. Used for finding the next
displayPageHeader($color, $mailbox);
if (isset($view_hdr)) {
- fputs ($imapConnection, sqimap_session_id() . " FETCH $passed_id BODY[HEADER]\r\n");
- $read = sqimap_read_data ($imapConnection, sqimap_session_id(), true, $a, $b);
+ $read = sqimap_run_command ($imapConnection, "FETCH $passed_id BODY[HEADER]", true, $a, $b);
echo '<BR>' .
'<TABLE WIDTH="100%" CELLPADDING="2" CELLSPACING="0" BORDER="0" ALIGN="CENTER">' . "\n" .
switch($priority_level) {
/* check for a higher then normal priority. */
case '1':
- case '2':
- $priority_string = _("High");
+ case '2':
+ $priority_string = _("High");
break;
/* check for a lower then normal priority. */
case '4':
- case '5':
- $priority_string = _("Low");
+ case '5':
+ $priority_string = _("Low");
break;
-
+
/* check for a normal priority. */
- case '3':
+ case '3':
default:
$priority_level = '3';
- $priority_string = _("Normal");
+ $priority_string = _("Normal");
break;
-
+
}
}
}
echo "search.php?where$pos=".urlencode($where)."&pos=$pos&what$pos=".urlencode($what)."&mailbox=$urlMailbox\">";
} else {
- echo "right_main.php?use_mailbox_cache=1&sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">";
+ echo "right_main.php?sort=$sort&startMessage=$startMessage&mailbox=$urlMailbox\">";
}
echo _("Message List") .
'</A> | ' .
' </TD><TD WIDTH="33%" ALIGN="RIGHT">' .
' <SMALL>' .
' <A HREF="' . $base_uri . "src/compose.php?forward_id=$passed_id&forward_subj=$url_subj&".
- (isset($default_use_priority)?"mailprio=$priority_level&":"")
+ ($default_use_priority?"mailprio=$priority_level&":"")
."mailbox=$urlMailbox&ent_num=$ent_num\">" .
_("Forward") .
'</A> | ' .
' <A HREF="' . $base_uri . "src/compose.php?send_to=$url_replyto&reply_subj=$url_subj&".
- (isset($default_use_priority)?"mailprio=$priority_level&":"").
+ ($default_use_priority?"mailprio=$priority_level&":"").
"reply_id=$passed_id&mailbox=$urlMailbox&ent_num=$ent_num\">" .
_("Reply") .
'</A> | ' .
' <A HREF="' . $base_uri . "src/compose.php?send_to=$url_replytoall&send_to_cc=$url_replytoallcc&reply_subj=$url_subj&".
- (isset($default_use_priority)?"mailprio=$priority_level&":"").
+ ($default_use_priority?"mailprio=$priority_level&":"").
"reply_id=$passed_id&mailbox=$urlMailbox&ent_num=$ent_num\">" .
_("Reply All") .
'</A> ' .
}
if ($show_xmailer_default) {
- fputs ($imapConnection, sqimap_session_id() .
- " FETCH $passed_id BODY.PEEK[HEADER.FIELDS (X-Mailer User-Agent)]\r\n");
- $read = sqimap_read_data ($imapConnection, sqimap_session_id(), true,
+ $read = sqimap_run_command ($imapConnection, "FETCH $passed_id BODY.PEEK[HEADER.FIELDS (X-Mailer User-Agent)]", true,
$response, $readmessage);
$mailer = substr($read[1], strpos($read[1], " "));
if (trim($mailer)) {
echo printer_friendly_link(true);
}
-do_hook("read_body_header");
+do_hook('read_body_header');
echo '</TABLE>' .
' </TD></TR>' .
'</TABLE>';
flush();
+
echo "<TABLE CELLSPACING=0 WIDTH=\"97%\" BORDER=0 ALIGN=CENTER CELLPADDING=0>\n" .
" <TR><TD BGCOLOR=\"$color[4]\" WIDTH=\"100%\">\n" .
'<BR>'.
'</TABLE>' . "\n";
/* show attached images inline -- if pref'fed so */
-if (($attachment_common_show_images) and
+if (($attachment_common_show_images) &&
is_array($attachment_common_show_images_list)) {
+
foreach ($attachment_common_show_images_list as $img) {
+ $imgurl = '../src/download.php' .
+ '?' .
+ 'passed_id=' . urlencode($img['passed_id']) .
+ '&mailbox=' . urlencode($mailbox) .
+ '&passed_ent_id=' . urlencode($img['ent_id']) .
+ '&absolute_dl=true';
+
echo "<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER>\n" .
" <TR>\n" .
" <TD>\n" .
- ' <img src="../src/download.php' .
- '?passed_id=' . urlencode($img['passed_id']) .
- '&mailbox=' . urlencode($img['mailbox']) .
- '&passed_ent_id=' . urlencode($img['ent_id']) .
- '&absolute_dl=true">' . "\n" .
+ " <img src=\"$imgurl\">\n" .
" </TD>\n" .
" </TR>\n" .
"</TABLE>\n";
+
}
}
+
do_hook('read_body_bottom');
do_hook('html_bottom');
sqimap_logout($imapConnection);