Added a comma after each msgnum exported. The parser was globbing them all together...
[citadel.git] / ctdlphp / ctdlelements.php
index 8834601c4e7657a03c4cd235cefd8d127072e8d2..e03b0783213f78398b89fe7c1e4dec4b0547a1d5 100644 (file)
@@ -54,11 +54,34 @@ function display_message($msgnum) {
        }
 
        // Do message text
-       echo $fields["text"] . "<BR>";
+       if ($fields['formatet_text'] != "")
+               echo $fields['formatet_text'] . "<BR>";
+       else 
+               echo $fields["text"] . "<BR>";
 
        echo '</TD></TR></TABLE><BR>' ;
 }
 
+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) . "<BR>" ;
+               return false;
+       }
+       if (isset($fields['part']))
+       {
+               $parts = explode('|', $fields['part']);
+               print_r($parts);
+               return $parts;
+
+       }
+       return false;
+}
+
 
 
 ?>