Создаем файл block-release.php с вот таким содержимым
Код:
<?php
if (!defined('BLOCK_FILE')) {
Header("Location: ../index.php");
exit;
}
// Мод последних раздач с балонами by catarr
$blocktitle = "Последние 10 раздач";
$sql = "SELECT torrents.name, torrents.image1 AS image1, torrents.id, visible, category FROM torrents LEFT JOIN categories ON torrents.category = categories.id WHERE visible='yes' ORDER BY added DESC LIMIT 10";
$result = sql_query($sql) or die('No torrents found');
while( $row = mysql_fetch_assoc($result) ) {
$image1 = "" .$row["image1"]. "";
$content .= "<table>";
if( mysql_num_rows($result) != 0 )
{
$content .= '<table class="main" border="1" cellpadding="5" cellspacing="0" width="100%"><tbody><tr><td colspan="2" align="left">';
$content .= "<a onmouseover=\"return overlib('<div style=\'padding: 5px;\'><table id=\'thumbs\'><tr style=\'background: #f0f0f0;\'><td><img src=\'torrents/images/".$image1."\' width=\'250\'></td></tr></table></div>');\" onmouseout=\"return nd();\" href=\"details.php?id=" . $row['id'] . "&hit=1\"><b>" . $row['name'] . "</b></a></td>";
$content .= '</tr></table>';
}
else
{
$content .= 'No torrents found';
}
}
?>