openside("Kategorijos");
$result = dbquery("SELECT * FROM ".$db_prefix."download_cats WHERE ".groupaccess('download_cat_access')." ORDER BY download_cat_name");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 4;
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 2)) echo "";
$num = dbcount("(download_cat)", "downloads", "download_cat='".$data['download_cat_id']."'");
echo "<img src='http://mp3doze.lt/images/failas.gif'> <a style='color:#4434;' href='".BASEDIR.seoname($data['download_cat_name']).",dainos-kategorija".$data['download_cat_id'].".html'>".$data['download_cat_name']." </a><span class='".$data['download_cat_name']."' title='".$data['download_cat_name']."'>($num)</span>";
echo "<hr>" ;
$counter++;
}
echo "";
$diena = date("d", time());
$menesis = date("m", time());
$metai = date("Y", time());
$savaite = date("w", time());
$savaite == 0 ? $savaite = 7 : "";
$savaite = $savaite - 1;
$dabar = time();
$siandien2 = mktime(0,0,0,$menesis,$diena,$metai);
$vakar2 = mktime(0,0,0,$menesis,$diena-1,$metai);
$savaite2 = mktime(0,0,0,$menesis,$diena-$savaite,$metai);
$menesi2 = mktime(0,0,0,$menesis,1,$metai);
$metais2 = mktime(0,0,0,1,1,$metai);
$dainos = dbcount("(download_id)", "downloads");
$siandien = dbcount("(download_id)", "downloads", "download_datestamp>='".$siandien2."'");
$vakar = dbcount("(download_id)", "downloads", "download_datestamp>='".$vakar2."' && download_datestamp<='".$siandien2."'");
$savaite = dbcount("(download_id)", "downloads", "download_datestamp>='".$savaite2."'");
$menesi = dbcount("(download_id)", "downloads", "download_datestamp>='".$menesi2."'");
$metais = dbcount("(download_id)", "downloads", "download_datestamp>='".$metais2."'");
$diena = date("d", time());
$menesis = date("m", time());
$metai = date("Y", time());
$savaite = date("w", time());
$savaite == 0 ? $savaite = 7 : "";
$savaite = $savaite - 1;
$dabar = time();
$siandien2 = mktime(0,0,0,$menesis,$diena,$metai);
$vakar2 = mktime(0,0,0,$menesis,$diena-1,$metai);
$savaite2 = mktime(0,0,0,$menesis,$diena-$savaite,$metai);
$menesi2 = mktime(0,0,0,$menesis,1,$metai);
$metais2 = mktime(0,0,0,1,1,$metai);
$dainos = dbcount("(download_id)", "downloads");
$siandien = dbcount("(download_id)", "downloads", "download_datestamp>='".$siandien2."'");
$vakar = dbcount("(download_id)", "downloads", "download_datestamp>='".$vakar2."' && download_datestamp<='".$siandien2."'");
$savaite = dbcount("(download_id)", "downloads", "download_datestamp>='".$savaite2."'");
$menesi = dbcount("(download_id)", "downloads", "download_datestamp>='".$menesi2."'");
$metais = dbcount("(download_id)", "downloads", "download_datestamp>='".$metais2."'");
$parsi = dbresult(dbquery("SELECT SUM(download_count) FROM ".$db_prefix."downloads"), 0);
echo "<img src='http://emp3.wu.lt/images/icons/audio_file.png'>Įdėta dainų: <b>$dainos</b><br />\n";
echo "<img src='http://emp3.wu.lt/images/icons/music_cd.png'>Šiandien: <b>$siandien</b><br />\n";
echo "<img src='http://emp3.wu.lt/images/icons/sounds.png'>Vakar: <b>$vakar</b><br />\n";
echo "<img src='http://emp3.wu.lt/images/icons/cd.png'>Šią savaitę: <b>$savaite</b><br />\n";
echo "<img src='http://emp3.wu.lt/images/icons/cdr.png'>Šį mėnesį: <b>$menesi</b><br />\n";
echo "<img src='http://emp3.wu.lt/images/icons/folderis.png'>Šiais metais: <b>$metais</b><br/>\n";
echo "<img src='http://emp3.wu.lt/images/icons/dashboard.png'>Atsisiųsta <b>".$parsi."</b>\n";
} else {
echo "<center><br><span style='color:lime'><b>Muziką siunčiasi tik nariai </b></span><a href='http://emp3.wu.lt/register.php' target='_blank'><span style='color:red'><b>Registruokis!</b></span></a><br><br></center>\n";
}
closeside();