Download BOX:
Fehler
<?php
//Copyright by Stefan Jungbauer
//www.zocker-eppingen.de
//V 1.1
defined ('main') or die ( 'no direct access' );
echo '<b>Newest Download</b>';
$erg = db_query("SELECT prefix_downloads.cat,prefix_downloads.name,prefix_downloads.id,DATE_FORMAT(time,'%d.%m.%Y') as datum FROM prefix_downloads LEFT JOIN prefix_downcats ON prefix_downcats.id = prefix_downloads.cat WHERE ".$_SESSION['authright']." <= prefix_downcats.recht order by prefix_downloads.id DESC LIMIT 0,5");
$i = 0;
while ($row = db_fetch_object($erg)) {
$i++;
$user = $row->name;
echo'
<table width="100%" cellspacing="0" cellpadding="0" height="13">
<tr><td> '.$i.'. <a href="?downloads-show-'.$row->id.'"> '.$user.'</a></td><td> '.$row->datum.'</td></tr>
</table>';
}
echo '<b>Top Download</b>';
$a = 0;
$erg = db_query("SELECT prefix_downloads.cat,hits,prefix_downloads.name,prefix_downloads.id,DATE_FORMAT(time,'%d.%m.%Y') as datum FROM prefix_downloads LEFT JOIN prefix_downcats ON prefix_downcats.id = prefix_downloads.cat WHERE ".$_SESSION['authright']." <= prefix_downcats.recht order by hits DESC LIMIT 0,5");
while ($row = db_fetch_object($erg)) {
$a++;
$name = $row->name;
echo'
<table width="100%" cellspacing="0" cellpadding="0" height="13">
<tr><td>'.$a.'. <a href="?downloads-show-'.$row->id.'"> '.$name.'</a></td><td>'.$row->hits.'</td></tr>
</table>';
}
?>
News box so sollte es sein:
<?php
# Copyright by Manuel
# Support www.ilch.de
defined ('main') or die ( 'no direct access' );
$abf = 'SELECT *
FROM prefix_news
WHERE news_recht >= '.$_SESSION['authright'].'
ORDER BY news_time DESC
LIMIT 0,5';
$erg = db_query($abf);
echo '<table>';
while ($row = db_fetch_object($erg)) {
echo '<tr><td valign="top"><b> » </b></td><td><a class="box" href="index.php?news-'.$row->news_id.'">'.$row->news_title.'</a></td></tr>';
}
echo '</table>';
?>
mfg slavka