Файл: modules/inculd/info.php
Строк: 117
<?php
define('NTOP', 1);
$title = 'Статистика топа';
require_once ('../../system/connect.php');
require_once ('../../system/core.php');
require_once ('../../system/function.php');
require_once ('../../system/head.php');
require_once ('../../system/panel.php');
echo '<div class="container" id="page"><h1>Статистика топа</h1><hr/>';
$plaforms_ban = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `ban` = '1'"));
$sait_count = mysql_result(mysql_query("SELECT SUM(`count`) FROM `".$prefix."sait`;"), 0);
$plaforms_moder = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait` WHERE `status` = '1' AND `hosts` > '0'"));
$plaforms_all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait`"));
$users_all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."users`"));
$news_all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."news`"));
$cat_all = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."cat`"));
$yday_start = mktime(0, 0, 0, date("m"), (date("d")-1), date("Y"));
$yday_finish = mktime(23, 59, 59, date('m'), (date('d')-1), date('Y'));
$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."'"));
$yday_host = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."hosts` WHERE `time` BETWEEN '".$yday_start."' AND '".$yday_finish."'"));
$yday_hit = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."hits` WHERE `time` BETWEEN '".$yday_start."' AND '".$yday_finish."'"));
$all_host = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."hosts`"));
$all_hit = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."hits`"));
$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'"));
$yday_in = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."go` WHERE `time` BETWEEN '".$yday_start."' AND '".$yday_finish."' AND `type` = 'in'"));
$yday_out = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."go` WHERE `time` BETWEEN '".$yday_start."' AND '".$yday_finish."' AND `type` = 'out'"));
$all_in = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."go` WHERE `type` = 'in'"));
$all_out = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."go` WHERE `type` = 'out'"));
$online = mysql_num_rows(mysql_query("SELECT * FROM `".$prefix."sait_online`"));
echo '<hr/>';
echo '<center><h1>Общее</h1></center>';
echo '<hr/>';
echo'<div class="server-block-right"><div class="server-votes"><br/><br/>';
echo '<p>Всего пользователей: <strong>'.$users_all.'</strong></p><br/>';
echo '<p>Всего площадок: <strong>'.$plaforms_all.'</strong></p><br/>';
echo '<p>Активированных сегодня: <strong>'.$plaforms_moder.'</strong></p><br/>';
echo '<p>Заблокированных: <strong><a href="http://'.$set['home'].'/m/ban">'.$plaforms_ban.'</a></strong></p><br/>';
echo'</div></div><br/><div class="server-block-right"><div class="server-votes"><br/>';
echo '<p>Всего категорий: <strong>'.$cat_all.'</strong></p><br/>';
echo '<p>Всего просмотров: <strong>'.$sait_count.'</strong></p><br/>';
echo '<p>Всего новостей: <strong>'.$news_all.'</strong></p><br/>';
echo '<p>Сейчас на сайтах сидит: <strong>'.$online.'</strong> человек(а)</p>';
echo'</div></div>';
echo '<hr/>';
echo '<center><h1>Сегодня</h1></center>';
echo '<hr/>';
echo'<div class="server-block-right"><div class="server-votes"><br/>';
echo '<p>Хостов: <strong>'.$day_host.'</strong></p><br/>';
echo '<p>Хитов: <strong>'.$day_hit.'</strong></p><br/>';
echo '<p>Пришло в топ: <strong>'.$day_in.'</strong></p><br/>';
echo '<p>Ушло из топа: <strong>'.$day_out.'</strong></p>';
echo'</div></div>';
echo '<hr/>';
echo '<center><h1>Вчера</h1></center>';
echo '<hr/>';
echo'<div class="server-block-right"><div class="server-votes"><br/>';
echo '<p>Хостов: <strong>'.$yday_host.'</strong></p><br/>';
echo '<p>Хитов: <strong>'.$yday_hit.'</strong></p><br/>';
echo '<p>Пришло в топ: <strong>'.$yday_in.'</strong></p><br/>';
echo '<p>Ушло из топа: <strong>'.$yday_out.'</strong></p>';
echo'</div></div>';
echo '<hr/>';
echo '<center><h1>За весь период</h1></center>';
echo '<hr/>';
echo'<div class="server-block-right"><div class="server-votes"><br/>';
echo '<p>Хостов: <strong>'.$all_host.'</strong></p><br/>';
echo '<p>Хитов: <strong>'.$all_hit.'</strong></p><br/>';
echo '<p>Пришло в топ: <strong>'.$all_in.'</strong></p><br/>';
echo '<p>Ушло из топа: <strong>'.$all_out.'</strong></p>';
echo'</div></div>';
require_once ('../../modules/foot.php');
?>