// This program is released under the terms of the GNU General Public License. // // Fetch and display a message. // function display_message($msgnum) { echo '
' ; // 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) . "
" ; echo '
' ; return; } // Begin header echo "" ; echo strftime("%b %d %Y %I:%M%p ", $fields["time"]) ; echo " from " . htmlspecialchars($fields["from"]) ; if (strlen($fields["rfca"]) > 0) { echo " <" . htmlspecialchars($fields["rfca"]) . ">" ; } else if ( (strlen($fields["node"]) > 0) && (strcasecmp($fields["node"], $_SESSION["serv_nodename"])) ) { echo " @" . htmlspecialchars($fields["node"]) ; if (strlen($fields["hnod"]) > 0) { echo " (" . htmlspecialchars($fields["hnod"]) . ")" ; } } if (strlen($fields["rcpt"]) > 0) { echo " to " . htmlspecialchars($fields["rcpt"]) ; } echo "
\n" ; // Do message text echo $fields["text"] . "
"; echo '
' ; } ?>