<? include "newsconfig.php";?>
<html>
<head>
<title>xxx</title>
<link rel="STYLESHEET" type="text/css" href="style.css">
</head>
<body bgcolor="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center">
<tr>
<td>
<?php
$conn_id = mysql_connect($host,$nick,$pw);
mysql_select_db($database,$conn_id);
if ($do == "comments" ) {
include ("comments.php");
}
?>
<?php
$result = mysql_query("select * from $table ORDER BY datum DESC LIMIT 0, 4");
if ($num = mysql_num_rows($result)) {
for($i=0;$i < $num; $i++) {
$id = mysql_result($result,$i,"id");
$titel = mysql_result($result,$i,"titel");
$autor = mysql_result($result,$i,"autor");
$bild = mysql_result($result,$i,"bild");
$datum = mysql_result($result,$i,"datum");
$text = mysql_result($result,$i,"text");
echo "
<table align=\"center\" width=\"600\" border=\"0\" bgcolor=\"black\" cellpadding=\"0\" cellspacing=\"1\">
<!--DWLayoutTable-->
<tr>
<td height=\"28\" colspan=\"2\" valign=\"top\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<!--DWLayoutTable-->
<tr>
<td width=\"478\" style=\"background-image:url(images/content_bg.jpg)\" height=\"28\"><strong>$titel</strong></td>
<td width=\"120\" style=\"background-image:url(images/1stmc.jpg)\" valign=\"top\"><!--DWLayoutEmptyCell--> </td>
</tr>
</table></td>
</tr>
<tr>
<td height=\"151\" colspan=\"2\" valign=\"top\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<!--DWLayoutTable-->
<tr>
<td class=\"newstext\" width=\"520\" rowspan=\"2\" valign=\"top\">$neuertext</td>
<td class=\"newstext\" width=\"80\" height=\"80\"><div align=\"center\"><img src=\"images/$bild.gif\" width=\"70\" height=\"70\"></div></td>
</tr>
<tr>
<td class=\"newstext\" height=\"71\"> </td>
</tr>
</table></td>
</tr>
<tr>
<td class=\"newsunten\" width=\"199\" height=\"24\">geschrieben von $autor</td>
<td class=\"newsunten\" width=\"199\"><div align=\"right\"><A href=\"news.php?do=comments&id=$id\" target=\"_blank\">Comments</A></div></td>
<td class=\"newsunten\" width=\"199\"><div align=\"right\">$datum</div></td>
</tr>
</table><br>
";
}
} else echo "No News written";
?>
</td>
</tr>
</table>
</body>
</html>