X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fread_body.php;h=05462549a88987a26c702247754b207f4e615640;hb=ca29b81004eea3cff3f249e95235ba544730a4e7;hp=cc06a47888fed68166ccf61615b05f1a95d0e40a;hpb=ef8703220ec8e7573417b08881f636082e4b8d58;p=squirrelmail.git
diff --git a/src/read_body.php b/src/read_body.php
index cc06a478..05462549 100644
--- a/src/read_body.php
+++ b/src/read_body.php
@@ -9,11 +9,6 @@
** the resulting emails in the right frame.
**/
-
-
-
-
-
session_start();
if (!isset($config_php))
@@ -29,39 +24,102 @@
if (!isset($date_php))
include("../functions/date.php");
+ 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) {
+ fputs ($imapConnection, "a003 FETCH $passed_id BODY[HEADER]\r\n");
+ $read = sqimap_read_data ($imapConnection, "a003", true, $a, $b);
+
+ echo "
";
+ echo "
\n";
+ echo "\n";
+ echo "";
+
+ echo "";
+ for ($i=1; $i < count($read)-1; $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 "";
+ if ($first) echo "$first:";
+ else echo " ";
+ echo " | $second | ";
+ }
+ echo " ";
+ echo " |
\n";
+ echo "