Parašė Žmogus· 2009 Lap. 26 11:11:45
#3
echo "<table width='100%'>
<tr>
<td width='33%'>";
openside("Naujausia muzika");
echo "
<div class='side-label'><b></b></div>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 20");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while ($data = dbarray($result)) {
$kat = dbresult(dbquery("SELECT download_cat_name FROM ".$db_prefix."download_cats WHERE download_cat_id='$id'"), 0);
echo "<tr>
<td>$kat</td>
<td class='small'>
<img src='http://albumai.huh.lt/images/muzika.png'>
<a href='".BASEDIR."downloads.php?d_id=".$data['download_id']."' title='".$data['download_title']."'
class='side'>".trimlink($data['download_title'], 60)."</a>
</td>
<td align='right'><img src='http://albumai.huh.lt/images/muzika.png'<a> Komentarai:</td>
<td align='right'>".dbcount("(comment_id)", "comments", "comment_type='D' AND comment_item_id='".$data['download_id']."'")."</td>
<td align='right'><img src='http://albumai.huh.lt/images/muzika.png'<a> Atsiųsta:</td>
<td align='right'>".$data['download_count']."</td>
</tr>";
}
echo "</table>";
} else {
echo "<div style='text-align:center'>".$locale['004']."</div>\n";
}
$result = dbquery("SELECT count(download_id) FROM ".$db_prefix."downloads");
echo "<MARQUEE direction='left'>Mūsų grojaraštį palaiko <b>".dbresult($result, 0)."</b> dainos!</MARQUEE>\n";
$result = dbquery("SELECT SUM(download_count) FROM ".$db_prefix."downloads");
echo "<MARQUEE direction='right'>Atsisiusta: [".dbresult($result, 0)."]</MARQUEE> ";
closeside();
echo "</tr>
</table>";