cvs: pear(MAINT_0_10) /Net_NNTP/examples/news.php.net read.php
| From: | Heino H. Gehlsen | Date: | Tue, 14 Oct 2003 16:08:43 +0000 |
| Subject: | cvs: pear(MAINT_0_10) /Net_NNTP/examples/news.php.net read.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-13600@lists.php.net to get a copy of this message | ||
heino Tue Oct 14 12:08:43 2003 EDT
Modified files: (Branch: MAINT_0_10)
/pear/Net_NNTP/examples/news.php.net read.php
Log:
Print header in '<pre>'-tag
Index: pear/Net_NNTP/examples/news.php.net/read.php
diff -u pear/Net_NNTP/examples/news.php.net/read.php:1.6.2.1
pear/Net_NNTP/examples/news.php.net/read.php:1.6.2.2
--- pear/Net_NNTP/examples/news.php.net/read.php:1.6.2.1 Fri Oct 10 12:16:54 2003
+++ pear/Net_NNTP/examples/news.php.net/read.php Tue Oct 14 12:08:43 2003
@@ -17,7 +17,7 @@
// | Heino H. Gehlsen <heino@gehlsen.dk> |
// +----------------------------------------------------------------------+
//
-// $Id: read.php,v 1.6.2.1 2003/10/10 16:16:54 heino Exp $
+// $Id: read.php,v 1.6.2.2 2003/10/14 16:08:43 heino Exp $
?>
<html>
<head>
@@ -41,12 +41,14 @@
echo '<font
color="red">'.$msgdata->getMessage().'</font><br>' ;
} else {
$header = $nntp->getHeader($_GET['msgid']);
- $fields = $header->getFieldsArray();
- echo '<h2>Headers:</h2>';
- foreach( $fields as $fieldname => $fieldcontent) {
- echo
'<b>'.$fieldname.'</b>: '.$fieldcontent."<br>";
+ echo '<hr>';
+ echo '<h2>Header</h2>';
+ echo '<pre>';
+ foreach( $header->getFieldsArray() as $line) {
+ echo $line.'<br>';
}
- echo "<hr>";
+ echo '</pre>';
+ echo '<hr>';
echo '<h2>Body</h2>';
echo '<form><textarea wrap="off" cols="79",
rows="25">'.
$nntp->getBodyRaw($_GET['msgid'], true).