X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=ctdlphp%2Fctdlelements.php;h=e03b0783213f78398b89fe7c1e4dec4b0547a1d5;hb=fa2dd842abb5feedea3e2253255722fcaecc3c6f;hp=a60a7b8523e28864e484be3f223bacca5e7c60dc;hpb=7ebbdfce57fed408081f1623e98f0ef10ebd3020;p=citadel.git
diff --git a/ctdlphp/ctdlelements.php b/ctdlphp/ctdlelements.php
index a60a7b852..e03b07832 100644
--- a/ctdlphp/ctdlelements.php
+++ b/ctdlphp/ctdlelements.php
@@ -30,7 +30,7 @@ function display_message($msgnum) {
echo strftime("%b %d %Y %I:%M%p ", $fields["time"]) ;
echo " from " . htmlspecialchars($fields["from"]) ;
- if (strlen($fields["rfca"]) > 0) {
+ if (isset($fields["rfca"]) && strlen($fields["rfca"]) > 0) {
echo " <" . htmlspecialchars($fields["rfca"]) . ">" ;
}
else if ( (strlen($fields["node"]) > 0)
@@ -41,17 +41,47 @@ function display_message($msgnum) {
}
}
- if (strlen($fields["rcpt"]) > 0) {
+ if (isset($fields["rcpt"]) && strlen($fields["rcpt"]) > 0) {
echo " to " . htmlspecialchars($fields["rcpt"]) ;
}
echo "
\n" ;
+ // Subject
+ if (strlen($fields["subj"]) > 0) {
+ echo"Subject: " .
+ htmlspecialchars($fields["subj"]) .
+ "
\n" ;
+ }
+
// Do message text
- echo $fields["text"] . "
";
+ if ($fields['formatet_text'] != "")
+ echo $fields['formatet_text'] . "
";
+ else
+ echo $fields["text"] . "
";
echo '
' ;
}
+function get_message_partlist($msgnum) {
+
+ // Fetch the message from the server
+ list($ok, $response, $fields) = ctdl_fetch_message($msgnum);
+
+ // Bail out gracefully if the message isn't there.
+ if (!$ok) {
+ echo "Error: " . htmlspecialchars($response) . "
" ;
+ return false;
+ }
+ if (isset($fields['part']))
+ {
+ $parts = explode('|', $fields['part']);
+ print_r($parts);
+ return $parts;
+
+ }
+ return false;
+}
+
?>