Parašė blist· 2010 Kov. 27 16:03:31
#79
čia V6 kodas:
$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);
openside("Siuntinių statistika");
echo "Įdėta siuntinių: <b>$dainos</b><br />\n";
echo "Šiandien: <b>$siandien</b><br />\n";
echo "Vakar: <b>$vakar</b><br />\n";
echo "Šią savaitę: <b>$savaite</b><br />\n";
echo "Šį mėnesį: <b>$menesi</b><br />\n";
echo "Šiais metais: <b>$metais</b><br />\n<br />\n";
echo "Atsisiųsta [".$parsi."]\n";
closeside();
išvis nieko net nerodo..
Redagavo blist· 2010 Kov. 27 16:03:19