X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fread_body.php;h=866422d54163c0119445eaa163172c725d95fbb6;hb=ab38c6cf9e26f78a3a168dec7c402214e4ebde7f;hp=5ae9b032c3ac71df3ff8fdf2e439d8c2bf214727;hpb=09278ebf0a2f09c476dcf9eb8ce684c69ee63936;p=squirrelmail.git diff --git a/src/read_body.php b/src/read_body.php index 5ae9b032..866422d5 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -17,7 +17,7 @@ require_once('../functions/imap.php'); 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 @@ -147,8 +147,7 @@ do_hook('html_top'); 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 '
' . '' . "\n" . @@ -421,23 +420,23 @@ if ($default_use_priority) { 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; - + } } @@ -461,7 +460,7 @@ if ($where && $what) { } 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") . ' | ' . @@ -510,17 +509,17 @@ echo ' ' . "\n" . '
' . ' ' . ' " . _("Forward") . ' | ' . ' " . _("Reply") . ' | ' . ' " . _("Reply All") . '  ' . @@ -620,9 +619,7 @@ if ($default_use_priority) { } 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)) { @@ -641,11 +638,12 @@ if (!$pf_subtle_link) { echo printer_friendly_link(true); } -do_hook("read_body_header"); +do_hook('read_body_header'); echo '
' . ' ' . ''; flush(); + echo "\n" . "
\n" . '
'. @@ -656,23 +654,29 @@ echo "\n" '
' . "\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 "\n" . " \n" . " \n" . " \n" . "
\n" . - ' ' . "\n" . + " \n" . "
\n"; + } } + do_hook('read_body_bottom'); do_hook('html_bottom'); sqimap_logout($imapConnection);