<?php
// REGISTER A NEW USER
include "login.inc.php";
include "header.php";
?>
<!-- Content Start -->
<table class="text" bgcolor="#037bd1" width="470">
<tbody><tr>
<td><font color="#ffffff"><b><? echo date(Y);?> News</b></font></td>
<td align="right"><a href="http://myownspace.fr/myownRSS/myownnews.xml"><img border="0" src="images/rssbutton.png"></a></td>
</tr>
</tbody></table>
<br>
<?
include "myownnews/config.php";
/*
// include lastRSS
include "classes/lastrss.php";
$rss = new lastRSS;
// Set cache dir and cache time limit (1200 seconds)
// (don't forget to chmod cahce dir to 777 to allow writing)
$rss->cache_dir = './cache';
$rss->cache_time = 3600;
$rssfile = "myownRSS/myownnews.xml";
// Try to load and parse RSS file
if ($rs = $rss->get($rssfile)) {
// Show last published articles (title, link, description)
echo "<ul>\n";
$max=15;
$i=0;
foreach($rs['items'] as $item) {
$i++;
if($i>$max) break;
echo'<a name="'.$item[link].'"></a><img src="images/bullet_white.gif" height="9" width="9"> <font color="#ff0000">
<b>'.$item['date'].'</b></font> <u><b>'
.$item['title'].
'</b></u> , posted by <b>'.$item['creator'].'</b><br>
<br>'.html_entity_decode($item['description']).'
<br><hr align="left" noshade="noshade" size="1" width="99%"><br>';
}
}
else {
echo "Error: It's not possible to reach RSS file...\n";
}
*/
$max=15;
$n=count($myownnews);
if($max>$n)$max=$n;
echo '<table class="text" width="470">
<tbody><tr>
<td>';
for($i=$n;$i>($n-$max);$i--){
$txtfile="myownnews/news.".$i.".txt";
echo '<a name="'.$i.'"></a><img src="images/bullet_white.gif" height="9" width="9"> <font color="#ff0000">
<b>'.$myownnews[$i]['date'].'</b></font> <u><b>'
.$myownnews[$i]['titre'].
'</b></u> , posted by <b><a href="/'.$myownnews[$i]['author'].'">'.$myownnews[$i]['author'].'</a></b><br>
<br>'.file_get_contents($txtfile).'
<br><hr align="left" noshade="noshade" size="1" width="450"><br>';
}
echo '<a href="http://myownspace.fr/myownRSS/myownnews.xml"><img border="0" src="images/rssbutton.png"></a></td></tr></table>';
// REGISTER A NEW USER
include "footer.php";
?>