X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fread_body.php;h=05462549a88987a26c702247754b207f4e615640;hb=ca29b81004eea3cff3f249e95235ba544730a4e7;hp=022ddd014ba3748316cc00112fb990f6b8ed31d7;hpb=1195c34026fc65eb8e0ca7a337fe4b406764dee8;p=squirrelmail.git
diff --git a/src/read_body.php b/src/read_body.php
index 022ddd01..05462549 100644
--- a/src/read_body.php
+++ b/src/read_body.php
@@ -27,6 +27,7 @@
include("../src/load_prefs.php");
$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
sqimap_mailbox_select($imapConnection, $mailbox);
+ do_hook("html_top");
displayPageHeader($color, $mailbox);
if ($view_hdr) {
@@ -34,24 +35,41 @@
$read = sqimap_read_data ($imapConnection, "a003", true, $a, $b);
echo "
";
- echo "
\n";
+ echo "\n";
+ echo "\n";
+ echo "";
+
+ 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", $read[$i]);
+ $line = htmlspecialchars($read[$i]);
+ if (eregi("^[ |\t]", $line)) {
+ $second = $line;
+ $first = "";
+ } else if (eregi("^([^:|^\s]+):(.+)", $line, $regs)) {
+ $first = $regs[1];
+ $second = $regs[2];
+ } else {
+ $second = trim($line);
+ $first = "";
}
- echo "$read[$i]";
+ echo "";
+ if ($first) echo "$first:";
+ else echo " ";
+ echo " | $second | ";
}
- echo " \n";
+ echo " |
";
+ echo "
\n";
echo "