| 1 |
<? |
|---|
| 2 |
|
|---|
| 3 |
$page = "news"; |
|---|
| 4 |
$page_description = "Latest Hydrogen news"; |
|---|
| 5 |
|
|---|
| 6 |
include "header.inc"; |
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
$allnews = file("data/news.txt"); |
|---|
| 11 |
$allnews = array_reverse($allnews); |
|---|
| 12 |
|
|---|
| 13 |
echo '<table border="0" width="100%" cellspacing="5px" cellpadding="0">'; |
|---|
| 14 |
|
|---|
| 15 |
echo '<tr><td colspan="2">'; |
|---|
| 16 |
|
|---|
| 17 |
echo '<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>'; |
|---|
| 18 |
echo '<td valign="middle" align="right" width="100%" nowrap><a href="rss_news.php"><b>Subscribe to RSS feed </b></a></td>'; |
|---|
| 19 |
echo '<td align="left"><a href="rss_news.php"><img border="0" src="images/rssfeed_icon.png"></a></td></tr></table>'; |
|---|
| 20 |
|
|---|
| 21 |
echo '</td></tr>'; |
|---|
| 22 |
|
|---|
| 23 |
echo '<tr height="20px"><td></td></tr>'; |
|---|
| 24 |
|
|---|
| 25 |
$counter = 0; |
|---|
| 26 |
|
|---|
| 27 |
foreach ($allnews as $news) { |
|---|
| 28 |
$counter = $counter + 1; |
|---|
| 29 |
if ($counter == 10) { |
|---|
| 30 |
|
|---|
| 31 |
break; |
|---|
| 32 |
} |
|---|
| 33 |
|
|---|
| 34 |
$news = trim( $news ); |
|---|
| 35 |
if ( $news == "" ) { |
|---|
| 36 |
continue; |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
$news_data = split("###", $news); |
|---|
| 40 |
|
|---|
| 41 |
$item_title = $news_data[1]; |
|---|
| 42 |
$item_description = $news_data[2]; |
|---|
| 43 |
|
|---|
| 44 |
$item_pubdate = $news_data[0]; |
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
?> |
|---|
| 48 |
<tr height="25px"><td colspan="2"> |
|---|
| 49 |
<table border="0" width="100%" height="25px" cellspacing="0" cellpadding="0"> |
|---|
| 50 |
<tr> |
|---|
| 51 |
<td><img src="images/title_background_left.png"></td> |
|---|
| 52 |
<td width="100%" background="images/title_background.png"> |
|---|
| 53 |
<font color="#EEEEEE"> |
|---|
| 54 |
<b><? echo $item_pubdate ?> - <? echo $item_title ?></b> |
|---|
| 55 |
</font> |
|---|
| 56 |
</td> |
|---|
| 57 |
<td><img src="images/title_background_right.png"></td> |
|---|
| 58 |
</tr> |
|---|
| 59 |
</table> |
|---|
| 60 |
</td></tr> |
|---|
| 61 |
<? |
|---|
| 62 |
$image_box = '<div class="img-shadow"><img src="images/hydrogen_icon64x64.png" width="64px" height="64px"></div>'; |
|---|
| 63 |
|
|---|
| 64 |
echo '<tr><td valign="top">'.$image_box.'</td>'; |
|---|
| 65 |
echo '<td width="100%" valign="top">'.$item_description.'</td></tr>'; |
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
echo '<tr height="1px"><td colspan="2"> </td></tr>'; |
|---|
| 69 |
|
|---|
| 70 |
//echo '<tr height="20px"><td></td></tr>'; // spacer |
|---|
| 71 |
} |
|---|
| 72 |
|
|---|
| 73 |
echo '<tr height="20px"><td></td></tr>'; |
|---|
| 74 |
echo '</table>'; |
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
include "footer.inc"; |
|---|
| 81 |
?> |
|---|
| 82 |
|
|---|