Ich erstellt mir z.Z. eine kleine Linkverwaltung.
Jetzt möchte ich gerne dem Benutzer anzeigen welcher link neu ist und welcher nicht.
Das Problem ist das das Anzeigen der Grafiken für alte bzw. neue Einträge nicht funktioniert. Er zeigt mir immer die gleiche Grafik an.
PHP-Code:
while ($row = mysql_fetch_object($r_sql))
{
// Kategorien
if($row->rid != $alt)
{
echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" width=\"100%\" bgcolor=\"#333333\">";
echo "<tr>";
echo "<td width=\"100%\" height=\"14\" class=\"cattitel\">.: $row->rubrik</td>";
echo "</tr>";
echo "</table> ";
}
// Wenn die Kategorien gleich sind dann
echo "<p><table width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"1\" bgcolor=\"#f5f6fa\">";
echo "<tr class=\"txt\">";
echo "<p>";
// Eintrag als neu oder alt Ausgeben
if ($alt = $row->rid);
$isnew = '1';
$isnewtime = time() - $isnew;
if ( $row->zeit > $isnewtime ){
echo "<td rowspan=\"2\" width=\"30\" height=\"14\">
<div align=\"center\"><img src=\"new.gif\" alt=\"Neu\" align=\"absmiddle\" width=\"30\" height=\"14\"></div></td>";
}
if ( $row->zeit < $isnewtime ){
echo "<td rowspan=\"2\" width=\"30\" height=\"14\">
<div align=\"center\"><img src=\"cat.gif\" alt=\"Cat\" align=\"absmiddle\" width=\"10\" height=\"9\"></div></td>";
}
echo "<td colspan=\"4\" width=\"100%\"><a href =$row->url class=\"menü\">$row->titel </a> </td>";
echo "</tr>";
echo "<tr>";
echo "<td height=\"15\" width=\"450\" >$row->beschreibung</td>";
echo "<td height=\"15\" width=\"50\"><div align=\"center\"> ($row->hits) </div></td>";
echo "<td height=\"15\" width=\"50\"></td>";
echo "<td height=\"15\" width=\"50\"></td>";
echo "</tr>";
echo "</table> <p>";
}
}