Ich hätte gern gewußt wie es wieder zum laufen bekomme!
Wo steckt der Fehler?
Wo steckt der Fehler?
Code:
<?
if(!$cat) {
} else {
$ncres=mysql_query("select count(id) from news where cat='$cat'");
}
$ncount = $ncerg[0];
$offset = addslashes($offset);
if($offset=="" OR $offset<="0" OR $offset>=$ncount)
$offset="0";
if($cat>=1) {
$res=mysql_query("select id, date_format(zeit,'%d.%m.') as time, hline from news where cat='$cat' order by id desc limit 5");
} else {
?>
<table width="498" border="0" cellspacing="0" cellpadding="0" class="txt">
<tr>
<td align="center"> <br>
<br>
Diese Kategorie enthält noch keine Newsbeiträge.
</td>
</tr>
</table>
<table width="498" border="0" cellspacing="0" cellpadding="0" class="navitxt">
<tr>
<td colspan="3"><img src="pics/pixel.gif" width="1" height="6"></td>
</tr>
<tr>
<td bgcolor="#000000" colspan="3"><img src="pics/pixel.gif" width="1" height="1"></td>
</tr>
<tr>
<td bgcolor="#990033" width="12"> </td>
<td bgcolor="#990033" width="476">Headlines</td>
<td bgcolor="#990033" width="12"> </td>
</tr>
<tr>
<td bgcolor="#000000" colspan="3"><img src="pics/pixel.gif" width="1" height="1"></td>
</tr>
<tr>
<td> </td>
<td class="txt"> <br>
<a href="index.php?page=newsedit.php&id="></a><br>
<? } ?>
</td>
<td> </td>
</tr>
<tr>
<td bgcolor="#990033" colspan="3"><img src="pics/pixel.gif" width="1" height="3"></td>
</tr>
</table>
<?
?>
<table width="476" border="0" cellspacing="0" cellpadding="0" class="txt">
<tr>
<td colspan="2"> <br>
<a name="<?=$r[id]?>"></a> <br>
</td>
</tr>
<tr>
<td bgcolor="#990033" nowrap><img src="pics/nleft.gif" width="10" height="15" align="absmiddle"><?="<b><font color=\"#FFFFFF\"> ".$r[time]." - ".$kat."</font></b>"?></td>
<td background="pics/nbgtop.gif" width="100%"><img src="pics/nright.gif" width="15" height="15"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2">
<table width="100%" border="0" cellspacing="6" cellpadding="0" class="txt">
<tr>
<td><?="<b><font color=\"#000000\">".$r[hline]."</font></b>"?><br>
<?=nl2br($r[content])?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right" background="pics/ndbg.gif"> <img src="pics/ndleft.gif" width="15" height="15" align="absmiddle"></td>
<td align="right" background="pics/ndbg2.gif">
<?=" <a href=\"mailto:".$g[email]."\" title=\"an ".$r[autor]." eine Email schreiben\">von ".$r[autor]."</a>"?>
<? if ($uid && $caps[news]) { ?>
| <a href="index.php?page=newsedit.php&id=<?=$r[id]?>">e</a>
<? } if ($uid && $caps[admin]) { ?>
| <a href="index.php?page=newsdel.php&id=<?=$r[id]?>">d</a>
<? } ?>
|
<?="<a href=\"index.php?page=comments.php&newsid=".$r[id]."\" title=\"Kommentar schreiben\">Kommentare: ".$r[cnt]."</a>"?>
| <a href="#" title="zum Seitenanfang">up</a> </td>
</tr>
</table>
<form name="archiv" action="index.php?page=narchiv.php" method="post">
<table width="498" border="0" cellspacing="0" cellpadding="0" class="txt">
<tr>
<td><b>
<? if ($offset>=5) { ?>
« </b><a href="index.php?page=news.php&offset=<?=$offset-5;?>&cat=<?=$cat;?>">neuere
Beiträge</a>
<? } ?>
</td>
<td align="right">
<? if (($ncount-6)>=$offset) { ?>
<a href="index.php?page=news.php&offset=<?=$offset+5;?>&cat=<?=$cat;?>">ältere
Beiträge</a> <b>»</b>
<? } ?>
</td>
</tr>
<tr align="center">
<td colspan="2"><br><b>Newsarchiv: </b>
<select name="month" size="1" class="combox">
<option value="1">Januar</option>
<option value="2">Februar</option>
<option value="3">März</option>
<option value="4">April</option>
<option value="5">Mai</option>
<option value="6">Juni</option>
<option value="7">Juli</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">Oktober</option>
<option value="11">November</option>
<option value="12">Dezember</option>
</select>
<select name="year" size="1" class="combox">
<option value="2004">2004</option>
<option value="2003">2003</option>
</select>
<input type="submit" name="send" value="GO" class="combox"></td>
</tr>
</table>
</form>
Zuletzt bearbeitet: