Parašė fLaps· 2011 Sau. 3 14:01:56
opentable("Naujausia Muzika");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 20");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 1;
echo "<table align='center' cellpadding='0' cellspacing='2'>\n<tr>\n";
echo "<td align='center'><b>Pavadinimas</b></td>
<td align='center'><b>Data</b></td>
<td align='center'><b>Siuntesi</b></td>
<td align='center'><b>Pateike</b></td></tr><tr>";
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "</tr>\n<tr>\n";
echo "<td align='left' valign='top'><a href='".BASEDIR.seoname($data['download_title']).",daina".$data['download_id'].".html' title='".$data['download_title']."'>".trimlink($data['download_title'], 40)."</a>";
echo "</td><td align='center'>".date('y.m.d', $data['download_datestamp'])."</td>
<td align='center'>".$data['download_count']."</td>
<td align='left'><a href='".BASEDIR."".seoname($data['download_license']).",u".$data['user_id'].".html' title='".$data['download_title']."'>".$data['download_license']."</a></td>\n" ;
$counter++;
}
echo "</tr>\n</table>\n";
} else {
echo "<center><br>\n".$locale['430']."<br><br>\n</center>\n";
}
closetable();