<table width="100%">
<tr>
- <td class="contentTopic">
- Actualités
- </td>
+ <td class="contentTopic">
+ Actualités
+ </td>
</tr>
</table>
<table width="90%" align="center">
<tr>
- <td class="content">
- <table class="news" style="width: 99%">
+ <td class="content">
+ <table class="news" style="width: 99%">
<?
$max_news = 5;
//
$file = "news.txt";
$lines = array_reverse(file($file)) or
- die("No newsfile!");
+ die("No newsfile!");
// as long as there are lines ...
//
while(count($lines) > 0 && $news_counter < $max_news) {
- // next line
- $line = array_pop($lines);
+ // next line
+ $line = array_pop($lines);
- // start of news
- if(eregi("^[a-z0-9]+;;;", $line)) {
- // news header
- list($author,$date,$time) = explode(";;;",$line);
+ // start of news
+ if(eregi("^[a-z0-9]+;;;", $line)) {
+ // news header
+ list($author,$date,$time) = explode(";;;",$line);
- // news subject
- $subject = array_pop($lines);
- printf('<tr><td class="newsHeader">%s</td></tr>', $subject);
- printf('<tr><td class="newsContent"><pre class="newsContent">');
+ // news subject
+ $subject = array_pop($lines);
+ printf('<tr><td class="newsHeader">%s</td></tr>', $subject);
+ printf('<tr><td class="newsContent"><pre class="newsContent">');
- continue;
- }
+ continue;
+ }
- // end of news
- if(eregi("^;;;", $line)) {
- printf('</pre></td></tr>');
- printf('<tr>');
- printf('<td class="newsFooter">%s - %s, %s</td>', $date, $time, $author);
- printf('</tr>');
- printf('<tr><td><img src="../images/spacer.gif" alt="spacer" width="1" height="15"></td></tr>');
- $news_counter++;
- continue;
- }
+ // end of news
+ if(eregi("^;;;", $line)) {
+ printf('</pre></td></tr>');
+ printf('<tr>');
+ printf('<td class="newsFooter">%s - %s, %s</td>', $date, $time, $author);
+ printf('</tr>');
+ printf('<tr><td><img src="../images/spacer.gif" alt="spacer" width="1" height="15"></td></tr>');
+ $news_counter++;
+ continue;
+ }
- // news content
- printf('%s', $line);
+ // news content
+ printf('%s', $line);
}
?>
- </table>
- </td>
+ </table>
+ </td>
</tr>
</table>
<? require_once("inc/header.php"); ?>