Просмотр файла admin/stat.php

Размер файла: 11.85Kb
<?php
#############################################
# 0JXRgdC70Lgg0YLRiyDRh9C40YLQsNC10YjRjCDRj #
# dGC0L4g0YHQvtC+0LHRidC10L3QuNC1LCDQt9C90L #
# DRh9C40YIg0YLRiyDQvdC10LzQvdC+0LPQviDQt9C #
#          90LDQtdGI0YwgUEhQIQ==            #
#__---------------------------------------__#
#__        0JrQu9C40Log0JrQu9GD0LE=       __#
#  ---------------------------------------  #
# 0JDQstGC0L7RgCA6IE1vcmdhbg==              #
# SUNRIDog0L3QtSDRgdC60LDQttGDIHhE          #
#                                           #
#############################################

require '../inc/start.php';
require '../inc/regvars.php';
require '../inc/db.php';
require '../inc/config.php';
require '../inc/funct.php';
require '../inc/antidos.php';
require '../inc/gzip.php';
require '../inc/header.php';


only_reg('/aut.php?',true);

if($user_prof['admin']<3){location('menu/index.php');}

$title = 'Статистика системы';
require '../inc/head.php';


 echo '<div class="sec">
Статистика системы
</div><div class="vstavka">
';

$c_sites = get_cache('colsites',"SELECT COUNT(*) FROM `$db[prefix]sites`",$config['cache_limit_colsites']);
if($c_sites>0)$tmp_c = $c_sites-1;else{$tmp_c = $c_sites;}

# $db[prefix]

$all_c = mysql_fetch_array(query("SELECT SUM(credits),SUM(in_bank) FROM `$db[prefix]users`"));
$all_m = mysql_fetch_array(query("SELECT SUM(money) FROM `$db[prefix]users`"));

#$lastuser = mysql_fetch_array (query("SELECT id,date_reg FROM `$db[prefix]users` LIMIT ".(get_cache('colusers','SELECT COUNT(*) FROM `users`',$config['cache_limit_colusers'])-1).',1 '));
$lastuser = mysql_fetch_array (query("SELECT id,date_reg FROM `$db[prefix]users` ORDER BY `id` DESC LIMIT 0,1 "));
$lastsite = mysql_fetch_array (query("SELECT id,link_name,user FROM `$db[prefix]sites` ORDER BY `id` DESC LIMIT 0,1 "));

$forum = mysql_fetch_array(query("SELECT SUM(ct),SUM(cp) FROM `$db[prefix]forum_f`"));

if(!isset($day_all))$day_all = strtotime(date('j F Y'));

#var_dump($day_all-86400);

echo '<a href="user.php"><b>Пользователи</b></a><br />
<div class="ad">Всего : <a href="user.php?mode=all"><b>'.get_cache('colusers',"SELECT COUNT(*) FROM `$db[prefix]users`",$config['cache_limit_colusers']).'</b></a> (<a href="user.php?mode=updt">U</a>)</div>
<div class="ad">Забаненых : <a href="user.php?mode=ban"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]ban` "),0).'</b></a></div>
<div class="ad">Сегодня новых : <a href="user.php?mode=all&sort=date_reg&poryadok=DESC"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]users` WHERE `date_reg` > '$day_all' "),0).'</b></a></div>
<div class="ad">Последний : '.userlogin($lastuser['id'],1,1,'admin',1,$user_prof['set_econom_traf']).'(Зарегистрирован '.formatdate($lastuser['date_reg']).')</div>
<hr/>
<a href="site.php"><b>Площадки</b></a> (<a href="/menu/sites.php">me</a>)<br />
<div class="ad">Всего : <a href="site.php?mode=all"><b>'.$c_sites.'</b></a></div>
<div class="ad">Активных : <a href="site.php?mode=all&where='.base64_encode('`status`=\'3\'').'"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]sites` WHERE `status`='3' "),0).'</b></a>, отключенных : <a href="site.php?mode=all&where='.base64_encode('`status`=\'2\'').'"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]sites` WHERE `status`='2' "),0).'</b></a>, на модерации : <a href="site.php?mode=all&where='.base64_encode('`status`=\'1\'').'"><b>'.($moder_sites = mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]sites` WHERE `status`='1' "),0)).'</b></a>'.($moder_sites > 0 ? ' (<a href="site.php?mode=moder">модерация</a>)' : null).', недопущенных : <a href="site.php?mode=all&where='.base64_encode('`status`=\'0\'').'"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]sites` WHERE `status`='0' "),0).'</b></a></div>';
# <div class="ad"> : <b></b></div>
if($c_sites>0)echo '<div class="ad">Последняя : <a href="site.php?mode=site&id='.$lastsite['id'].'">'.$lastsite['link_name'].'</a>('.userlogin($lastsite['user'],1,1,'admin',1,$user_prof['set_econom_traf']).')</div>';

$back_day = mysql_fetch_array(query("SELECT id,clicks FROM `$db[prefix]clicks_counter` WHERE `date` = ".($day_all - 86400).""));

$today = mysql_fetch_array(query("SELECT id,clicks FROM `$db[prefix]clicks_counter` ORDER BY `id` DESC LIMIT 0,1"));

echo '<hr/>
<a href="/menu/go.php"><b>Клики</b></a><br />
<div class="ad">Сегодня : <a href="logs.php?mode=clicks&act=view&date='.$today['id'].'"><b>'.$today['clicks'].'</b></a></div>
<div class="ad">По сравнению со <a href="logs.php?mode=clicks&act=view&date='.$back_day['id'].'"><b>вчерашним</b></a> днем('.$back_day['clicks'].') : '.($today['clicks'] > $back_day['clicks'] ? '<font color="#00f000">+'.($today['clicks'] - $back_day['clicks']).'</font>' : '<font color="#f00000">-'.($back_day['clicks'] - $today['clicks']).'</font>' ).' </div>
<div class="ad">Всего : <a href="logs.php?mode=clicks"><b>'.get_cache('colclicks_all',"SELECT SUM(clicks) FROM `$db[prefix]clicks_counter`  ",$config['cache_limit_colclicks_all']).'</b></a>(<a href="logs.php?mode=clicks&act=updt">U</a>)</div>
<div class="ad">Капитал системы (кредитов) : <b>'.($all_c[0]+$all_c[1]).postfix($all_c[0]+$all_c[1]).'</b>(на руках <b>'.$all_c[0].postfix($all_c[0]).'</b>, в банке <b>'.$all_c[1].postfix($all_c[1]).'</b>)</div>
<div class="ad">Капитал системы (денег) : <b>'.($all_m[0]).postfix($all_m[0],'рублей','рубля','рубль').'</b></div>
<hr/>
<a href="/menu/birzha.php"><b>Биржа</b></a><br />
<div class="ad">На бирже ставок : <a href="/menu/birzha.php?mode=all"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]birzha_rates`"),0).'</b></a> / <a href="/menu/birzha.php?mode=all&type=act"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]birzha_rates` WHERE `enabled`='1'"),0).'</b></a> / <a href="/menu/birzha.php?mode=all&type=buy"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]birzha_rates` WHERE `enabled`='0'"),0).'</b></a></div>
<div class="ad">Запросов на ввод : <a href="/menu/birzha.php?mode=ined"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]birzha_in`"),0).'</b></a> / <a href="/menu/birzha.php?mode=ined&type=obr"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]birzha_in` WHERE `ined`='0'"),0).'</b></a> / <a href="/menu/birzha.php?mode=ined&type=in"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]birzha_in` WHERE `ined`='1'"),0).'</b></a></div>
<div class="ad">Запросов на вывод : <a href="/menu/birzha.php?mode=outed"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]birzha_out`"),0).'</b></a> / <a href="/menu/birzha.php?mode=outed&type=act"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]birzha_out` WHERE `outed`='0'"),0).'</b></a> / <a href="/menu/birzha.php?mode=outed&type=out"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]birzha_out` WHERE `outed`='1'"),0).'</b></a></div>
<hr/>
<a href="attendance.php"><b>Посещаемость</b></a><br />';
if($config['logs_hosts']==1)
{
$hostshits = mysql_fetch_array(query("SELECT SUM(hosts),SUM(hits) FROM `$db[prefix]counter_data`"));
echo '<div class="ad"><a href="attendance.php?mode=view&date='.($today_id = mysql_result(query("SELECT id FROM `$db[prefix]counter_data` ORDER BY `id` DESC LIMIT 0,1 "),0)).'">Сегодня</a> хостов : <b>'.$counter['hosts'].'</b>, хитов : <b>'.$counter['hits'].'</b>(<a href="attendance.php?mode=view&date='.$today_id.'&referer=yes">R</a>)</div>
<div class="ad"><a href="attendance.php">Всего</a> хостов : <b>'.$hostshits[0].'</b>, хитов : <b>'.$hostshits[1].'</b></div>';
}else
{
echo '<div class="ad"><u>Счетчик отключен!</u></div>';
}
echo '<hr/>
<b>Другое</b><br />
<div class="ad"><a href="/menu/tasks.php">Заданий</a> : <a href="/menu/tasks.php?mode=all"><b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]tasks`"),0).'</b></a>, из них <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]tasks` WHERE `status` = '3'"),0).'</b>, отключенных <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]tasks` WHERE `status` = '2'"),0).'</b>, на модерации <b>'.($moder_tasks = mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]tasks` WHERE `status` = '1'"),0)).'</b>'.($moder_tasks > 0 ? '(<a href="/menu/tasks.php?mode=moder">модерация</a>)' : null).', недопущенных <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]tasks` WHERE `status` = '0'"),0).'</b>; задействовано пользователей : <b>'.mysql_num_rows(query("SELECT user FROM `$db[prefix]tasks` GROUP BY `user`")).'</b>, сообщений <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]tasks_mess`"),0).'</b></div>
<div class="ad"><a href="/news.php">Новостей</a> : <b>'.get_cache('colnews',"SELECT COUNT(*) FROM `$db[prefix]news`",$config['cache_limit_colnews']).'</b> (комментариев - '.mysql_result(query("SELECT SUM(comms) FROM `$db[prefix]news`"),0).')</div>
<div class="ad"><a href="/actions.php">Акций</a> : <b>'.get_cache('colactions',"SELECT COUNT(*) FROM `$db[prefix]actions`",$config['cache_limit_colactions']).'</b></div>
<div class="ad"><a href="/menu/votes.php">Голосований</a> : <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]votes`"),0).'</b>, проголосовали : <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]votes_voices`"),0).'раз(а)</b></div>
<div class="ad">Рекламных ссылок от пользователей : <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]users_reklama`"),0).'</b></div>
<div class="ad">Записей в <a href="/menu/mini_chat.php">мини-чате</a> : <b>'.get_cache('colmini_chat',"SELECT COUNT(*) FROM `$db[prefix]mini_chat`",$config['cache_limit_colmini_chat']).'</b>, за сегодня <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]mini_chat` WHERE `date` > '$day_all'"),0).'</b></div>
<div class="ad">Записей в <a href="/gb.php">гостевой</a> : <b>'.get_cache('colgb',"SELECT COUNT(*) FROM `$db[prefix]gb`",$config['cache_limit_colgb']).'</b>, за сегодня <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]gb` WHERE `date` > '$day_all'"),0).'</b></div>
<div class="ad">Записей в <a href="chat.php">админ чате</a> : <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]admin_chat` "),0).'</b></div>
<div class="ad">Операторов в <a href="ips.php">базе</a> : <b>'.mysql_num_rows(query("SELECT id FROM `$db[prefix]ips` GROUP BY `id_op` ")).'</b>, диапазонов : <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]ips` "),0).'</b> (<a href="ips.php?mode=updt">U</a>,<a href="ips.php?mode=view">V</a>)</div>
<div class="ad"><a href="/menu/forum.php">Форум</a> : <b>'.$forum[0].'</b> тем, <b>'.$forum[1].'</b> постов, за сегодня <b>'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]forum_t` WHERE `date` > '$day_all'"),0).'/'.mysql_result(query("SELECT COUNT(*) FROM `$db[prefix]forum_p` WHERE `date` > '$day_all'"),0).'</b> (<a href="/menu/forum.php?mode=last">L</a>,<a href="/menu/forum.php?mode=updt">U</a>,<a href="/menu/forum.php?mode=struct">S</a>)</div>
<br />
';
//<div class="ad"> : <b></b> </div>
//<div class="ad"> : <b></b> </div>
// <a href=".php?">  </a>


echo '<hr/>';
echo '..<a href="/admin/index.php?">Админ панель</a><br />';
echo '.<a href="/menu/index.php?">Кабинет</a><br />';


require '../inc/foot.php';

################################################
# 0KHQutGA0LjQv9GCINC90LUg0L/QsNCx0LvQuNC6IQ== #
#   0KHRgtCw0LLRgNC+0L/QvtC70YwsIDIwMDkg0LMu   #
################################################

?>