rendered paste bodyif ($CURUSER)
{
//Letzen 10 torrents mit bild
if ($CURUSER[xxx]=='yes'){
$sql = "SELECT * FROM torrents where visible='yes' AND numpics >=1 ORDER BY added DESC LIMIT 9";
}
else
{
$sql = "SELECT * FROM torrents where visible='yes' AND numpics >=1 AND category != '32' ORDER BY added DESC LIMIT 9";
}
$result = mysql_query($sql) or die('No torrents found');
if( mysql_num_rows($result) != 0 )
{
print "<center><h2>Die neuesten Torrents mit Bild</h2></center>";
print '<center><table border=0 cellspacing=0 cellpadding=5><tr>';
while( $row = mysql_fetch_assoc($result) )
{
print'<td>';
print'<a href="details.php?id=' . $row['id'] . '&hit=1" ><img src='. $GLOBALS["BITBUCKET_DIR"] .'/t-' . $row['id'] . '-1.jpg
width=80 height="100" title=' . $row['name'] . ' border=0 ></a>';
print'</td>';
}
print '</Tr></table>';
}
else
{
print 'Keine Torrents gefunden';
}
}
//Letzen 10 torrents mit bild end