X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fread_body.php;h=1440363b5ee3c722c52f127e6aafa9727459b79c;hp=8a8f0c00ebb13629cc056e7e6e4523d11518e360;hb=d68a3926944cc2ecf743b0e9389fa5f463445910;hpb=078a40a425c8f7dd8120128e55212464e3051ca0 diff --git a/src/read_body.php b/src/read_body.php index 8a8f0c00..1440363b 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -1,39 +1,137 @@ - - include("../config/config.php"); - include("../functions/strings.php"); - include("../functions/page_header.php"); - include("../functions/imap.php"); - include("../functions/mailbox.php"); - include("../functions/date.php"); - - $imapConnection = loginToImapServer($username, $key, $imapServerAddress); - selectMailbox($imapConnection, $mailbox, $numMessages); - - echo "
\n"; - displayPageHeader($mailbox); - $body = fetchBody($imapConnection, $passed_id); - getMessageHeaders($imapConnection, $passed_id, $passed_id, $f, $s, $d); - getMessageHeadersTo($imapConnection, $passed_id, $t); - getMessageHeadersCc($imapConnection, $passed_id, $c); - - $subject = $s[0]; - $url_subj = urlencode(trim($subject)); - - $d[0] = ereg_replace(" ", " ", $d[0]); - $dateParts = explode(" ", trim($d[0])); - $dateString = getLongDateString($dateParts); - - $from_name = getSenderName($f[0]); +"; + echo ""; + for ($i=1; $i < count($read)-1; $i++) { + $read[$i] = htmlspecialchars($read[$i]); + if (substr($read[$i], 0, 1) != "\t" && + substr($read[$i], 0, 1) != " " && + substr($read[$i], 0, 1) != "&" && + trim($read[$i])) { + $pre = substr($read[$i], 0, strpos($read[$i], ":")); + $read[$i] = str_replace("$pre", "$pre", decodeHeader($read[$i])); + } + echo "$read[$i]"; + } + echo " |
";
- echo "
|