Parašė Ponas24· 2011 Lie. 8 19:07:39
#3
if (date("m", time()) != $settings['menesis']) {
$result = dbquery("UPDATE ".$db_prefix."downloads SET download_count_m='0'");
$result = dbquery("UPDATE ".$db_prefix."settings SET menesis='".date("m", time())."'");
}
if (date("W", time()) != $settings['savaite']) {
$result = dbquery("UPDATE ".$db_prefix."downloads SET download_count_s='0'");
$result = dbquery("UPDATE ".$db_prefix."settings SET savaite='".date("W", time())."'");
}
echo "<table width='100%'>
<tr>
<td width='33%'>";
openside("Savaites topas");
echo "<div class='side-label'><b></b></div>\n";
$result = dbquery("SELECT download_cat, download_title, download_count_s FROM ".$db_prefix."downloads ORDER BY download_count_s DESC LIMIT 20");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 40);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?page_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count_s']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</td>
<td width='33%'>";
openside("Menesio topas");
echo "<div class='side-label'><b></b></div>\n";
$result = dbquery("SELECT download_cat, download_title, download_count_m FROM ".$db_prefix."downloads ORDER BY download_count_m DESC LIMIT 20");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 40);
echo "<tr>\n<td class='small'><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."downloads.php?page_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>".$data['download_count_m']."</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</tr>
</table>";
Bandyk.