Файл: m/allStats.php
Строк: 81
<?php
define('NTOP', 1);
$title = 'Статистика рейтинга';
require_once ('../system/connect.php');
require_once ('../system/core.php');
require_once ('../system/function.php');
require_once ('head.php');
$can = 3;
$plaforms_ban = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `ban` = '1'"));
$plaforms_akt = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `status` = '1' AND `ban` = '0' AND `hosts` > '0'"));
$plaforms_all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait`"));
$user = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."users`"));
$plaforms_moder = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `status` = '0' AND `ban` = '0'"));
$news_all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."news`"));
$cat_all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."cat`"));
$day_start = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
$day_finish = mktime(23, 59, 59, date('m'), date('d'), date('Y'));
$day_host = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."hosts` WHERE `time` BETWEEN '".$day_start."' AND '".$day_finish."'"));
$day_hit = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."hits` WHERE `time` BETWEEN '".$day_start."' AND '".$day_finish."'"));
$day_in = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."go` WHERE `time` BETWEEN '".$day_start."' AND '".$day_finish."' AND `type` = 'in'"));
$day_out = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."go` WHERE `time` BETWEEN '".$day_start."' AND '".$day_finish."' AND `type` = 'out'"));
$day_out =$day_out*$can;
$online = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait_online`"));
echo '<div class="title2">Общее</div><div class="title">';
echo 'Всего пользователей: <strong>'.$user.'</strong><br/>';
echo 'Всего площадок: <strong>'.$plaforms_all.'</strong><br/>';
echo 'Активных сегодня: <strong>'.$plaforms_akt.'</strong><br/>';
echo 'На модерации: <strong>'.$plaforms_moder.'</strong><br/>';
echo 'Заблокированных: <strong><a href="http://'.$set['home'].'/m/ban">'.$plaforms_ban.'</a></strong><br/>';
echo 'Всего категорий: <strong>'.$cat_all.'</strong><br/>';
echo 'Всего новостей: <strong>'.$news_all.'</strong><br/>';
echo 'Сейчас на сайтах сидит: <strong>'.$online.'</strong> человек(а)</div>';
echo '<div class="title2">Сегодня </div><div class="title">';
echo 'Хостов: <strong>'.$day_host.'</strong><br/>';
echo 'Хитов: <strong>'.$day_hit.'</strong><br/>';
echo 'Пришло в топ: <strong>'.$day_in.'</strong><br/>';
echo 'Ушло из топа: <strong>'.$day_out.'</strong></div>';
echo '<div class="title2">Всего</div><div class="title">';
echo 'Хостов: <strong>'.@mysql_result(mysql_query("SELECT SUM(`all_hosts`) FROM `".$prefix."sait`"),0).'</strong><br/>';
echo 'Хитов: <strong>'.@mysql_result(mysql_query("SELECT SUM(`all_hits`) FROM `".$prefix."sait`"),0).'</strong><br/>';
echo 'В топ: <strong>'.@mysql_result(mysql_query("SELECT SUM(`all_in`) FROM `".$prefix."sait`"),0).'</strong><br/>';
echo 'Из топа: <strong>'.@mysql_result(mysql_query("SELECT SUM(`all_out`) FROM `".$prefix."sait`"),0).'</strong></div>';
require_once ('foot.php');
?>