View file sea/stat.php

File size: 2.44Kb
<?
#-----------------------------------------------------#
#     ============ЗАГРУЗ-ЦЕНТР=============           #
#             	 Автор  :  Sea                   	  #
#               E-mail  :  [email protected]              #
#                  ICQ  :  355152215                   #
#   Вы не имеете права распространять данный скрипт.  #
#   		По всем вопросам пишите в ICQ.            #
#-----------------------------------------------------#
include 'moduls/ini.php';
include 'moduls/head.php';
include 'moduls/fun.php';
include 'moduls/connect.php';
include 'moduls/header.php';
###############Если статистика выключена###############
if($setup['stat_change'] == 0) die('Not found');
#######################################################
$all_files = 0;
$all_size = 0;
$all_size = mysql_fetch_array(mysql_query("SELECT SUM(`size`) FROM `files` WHERE `size` > '0';"));
$info = mysql_fetch_array($query);
if($all_size[0] < 1048576 and $all_size[0] >= 1024) $all_size[0] = "".round($all_size[0]/1024, 2)."Kb";
if($all_size[0] > 1048576) $all_size[0] = "".round($all_size[0]/1024/1024, 2)."Mb";
$all_files = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM `files` WHERE `size` > '0';"));
$all_loads = mysql_fetch_array(mysql_query("SELECT SUM(`loads`) FROM `files` WHERE `size` > '0';"));
$today_loads = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM `files` WHERE `timeload` > '".($time - (3600*24))."';"));
if(!$today_loads[0]) $today_loads[0] = 0;
$new_all_files = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM `files` WHERE `timeupload` > '".($time-(3600*24*$setup['day_new']))."' AND `size` > '0';"));
$max_online = mysql_fetch_array(mysql_query("SELECT `time` FROM `online` WHERE `id` = '1';"));
echo '<div class="mblock"><img src="dis/in.png" alt="">Статистика:</div>';
echo '<div class="row">';
echo "Всего файлов: $all_files[0]<br>";
echo "Всего новых файлов: $new_all_files[0]<br>";
echo "Общий объем: $all_size[0]<br>";
echo "Скачиваний за 24 часа: $today_loads[0]<br>";
echo "Всего скачиваний: $all_loads[0]<br>";
echo "Максимум онлайн: $max_online[0]<br>";
echo "
</div><div class=iblock>
- <a href=\"index.php\">Загрузки</a><br/>
- <a href=\"$setup[site_url]\">На главную</a></div>";
include 'moduls/foot.php';
?>