View file games/stat.php

File size: 1.16Kb
<?
include("modul/config.php"); include("modul/fun.php");  include("head.php");
$all_file=0; $all_size=0; $all_new=0; $all_loads=0; $com=0;
$all_files=mysql_query("SELECT COUNT(*) FROM `files` WHERE dir=0");  $all_file=mysql_result($all_files,0);
$data=time()-3600*24; $news=mysql_query("SELECT SUM(`loads`) FROM `files` WHERE `timeload`>$data");  $newcom=mysql_result($news,0);
$coms=mysql_query("SELECT COUNT(`id`) FROM `com`");  $com=mysql_result($coms,0);
$all_new=mysql_query("SELECT COUNT(`id`) FROM `files` WHERE `time`>".$nast['newfile']."");  $all_news=mysql_result($all_new,0);
$all_load=mysql_query("SELECT SUM(`loads`) FROM `files` WHERE dir=0");  $all_loads=mysql_result($all_load,0);
$size=mysql_query("SELECT SUM(`size`) FROM `files` WHERE dir=0"); $all_size=mysql_result($size,0);
if($newcom<1){ $newcom=0; }
echo 'Общая статистика<div class=list><div class=hre>Всего файлов: '.$all_file.'<br> 
Общий размер: '.size($all_size).'<br>Всего скачиваний: '.$all_loads.'<br>
Новых файлов: '.$all_news.'<br>Всего комментариев: '.$com.'<br>
Скачиваний за 24 часа: '.$newcom.'<br>
';
?>