X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fread_body.php;h=d73fd0e0ca524da937d0a4b3857ba37c59fced09;hp=838e402c915bfb8c4803ed5a0d10a8a81a493e65;hb=5bc39e3fc7064e14c4257f4c36bf22a35d056a36;hpb=32c7898caf59016a8b858f2dc3beb7f9e0049064 diff --git a/src/read_body.php b/src/read_body.php index 838e402c..d73fd0e0 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -1,34 +1,198 @@ - - include("../config/config.php"); - include("../functions/strings.php"); - include("../functions/page_header.php"); - include("../functions/imap.php"); - include("../functions/mime.php"); - include("../functions/mailbox.php"); - include("../functions/date.php"); +"; + echo "
";
+
+ for ($i=1; $i < count($read)-1; $i++) {
+ $line = htmlspecialchars($read[$i]);
+ if (eregi("^>", $line)) {
+ $second[$i] = $line;
+ $first[$i] = " ";
+ $cnum++;
+ } else if (eregi("^[ |\t]", $line)) {
+ $second[$i] = $line;
+ $first[$i] = "";
+ } else if (eregi("^([^:]+):(.+)", $line, $regs)) {
+ $first[$i] = $regs[1] . ":";
+ $second[$i] = $regs[2];
+ $cnum++;
+ } else {
+ $second[$i] = trim($line);
+ $first[$i] = "";
+ }
+ }
+ for ($i=0; $i < count($second); $i = $j) {
+ $f = $first[$i];
+ $s = nl2br($second[$i]);
+ $j = $i + 1;
+ while ($first[$j] == "" && $j < count($first)) {
+ $s .= " " . nl2br($second[$j]);
+ $j++;
+ }
+ parseEmail($s);
+ echo " |