Файл: top_reit/rustats.su/system/view/site/statistic.tpl
Строк: 29
<?php
echo '<div class="rr"><span class =
"t100"><b>Общее</b></span></div>';
echo
'<div class="h5">';
$user_k= Core::count("SELECT
COUNT(*) FROM `users`");
echo 'Всего пользователей:
<b>'.$user_k.'</b><br/>';
$site =
Core::count("SELECT COUNT(*) FROM `user_sites`");
echo
'Всего сайтов: <b>'.$site.'</b><br/>';
$akt =
Core::count("SELECT COUNT(*) FROM `user_sites` WHERE `category`!='27'
&& `ban` = '0' && `mod` = '0' && `host` >
'0'");
echo 'Активных:
<b>'.$akt.'</b><br/>';
$mod = Core::count("SELECT
COUNT(*) FROM `user_sites` WHERE `mod` = '1'");
echo 'На
модерации: <b>'.$mod.'</b><br/>';
$blok =
Core::count("SELECT COUNT(*) FROM `user_sites` WHERE `ban` = '1'
");
echo 'Заблокированных:
<b>'.$blok.'</b><br/>';
$categors=
Core::count("SELECT COUNT(*) FROM `category`");
echo 'Всего
категорий: <b>'.$categors.'</b><br/>';
echo
'</div>';
echo '<div class="rr"><span class =
"t100"><b>Статистика на
сегодня</b></span></div>';
echo '<div
class="h5">';
$host=Core::count("SELECT SUM(`host`) FROM
`user_sites` where `category`!='27'");
echo 'Хостов:
<b>'.$host.'</b><br/>';
$hit=Core::count("SELECT
SUM(`hit`) FROM `user_sites` where `category`!='27'");
echo
'Хитов:
<b>'.$hit.'</b><br/>';
$v_top=Core::count("SELECT
SUM(`v_top`) FROM `user_sites` where `category`!='27'");
echo 'В
топ:
<b>'.$v_top.'</b><br/>';
$iz_top=Core::count("SELECT
SUM(`iz_top`) FROM `user_sites` where `category`!='27'");
echo 'Из
топа: <b>'.$iz_top.'</b><br/>';
echo
'</div>';
echo '<div class="rr"><span class =
"t100"><b>Статистика за
вчера</b></span></div>';
echo '<div
class="h5">';
$host_d=Core::count("SELECT SUM(`host_day`)
FROM `user_sites` where `category`!='27'");
echo 'Хостов:
<b>'.$host_d.'</b><br/>';
$hit_d=Core::count("SELECT
SUM(`hit_day`) FROM `user_sites` where `category`!='27'");
echo
'Хитов:
<b>'.$hit_d.'</b><br/>';
$v_top_day=Core::count("SELECT
SUM(`v_top_day`) FROM `user_sites` where `category`!='27'");
echo 'В
топ:
<b>'.$v_top_day.'</b><br/>';
$iz_top_day=Core::count("SELECT
SUM(`iz_top_day`) FROM `user_sites` where `category`!='27'");
echo
'Из топа: <b>'.$iz_top_day.'</b><br/>';
echo
'</div>';
echo '<div class="rr"><span class =
"t100"><b>Статистика за все
время</b></span></div>';
echo '<div
class="h5">';
$host_d=Core::count("SELECT SUM(`host_all`)
FROM `user_sites` where `category`!='27'");
echo 'Хостов:
<b>'.$host_d.'</b><br/>';
$hit_d=Core::count("SELECT
SUM(`hit_all`) FROM `user_sites` where `category`!='27'");
echo
'Хитов:
<b>'.$hit_d.'</b><br/>';
$v_top_day=Core::count("SELECT
SUM(`v_top_all`) FROM `user_sites` where `category`!='27'");
echo 'В
топ:
<b>'.$v_top_day.'</b><br/>';
$iz_top_day=Core::count("SELECT
SUM(`iz_top_all`) FROM `user_sites` where `category`!='27'");
echo
'Из топа: <b>'.$iz_top_day.'</b><br/>';
echo
'</div>';
?>