File size: 3.5Kb
<?php
$title="Статистика\n";
include_once ('config/ini.php');
include_once ('config/function.php');
include_once ('config/header.php');
include_once ('config/connect.php');
include_once ('config/click-club.class.php');
include_once ('config/online.php');
include_once ('config/ban.php');
If (!isset($_GET['log'])) define("anybody","true");
include_once ('config/panel.php');
require_once('cacher/Lite/Output.php');
$options = array(
'caching' => true,
'cacheDir' => 'tmp/',
'lifeTime' => 1200
);
$cache = new Cache_Lite_Output($options); //// запускаем кеш
if (!($cache->start('stat')))
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$url = mysql_num_rows(mysql_query("SELECT `url` FROM `links`"));
$vsego = mysql_num_rows(mysql_query("SELECT `id` FROM `".prefix."users`"));
$act = mysql_num_rows(mysql_query("SELECT `id` FROM `".prefix."users` WHERE `cfrom`>`cto`"));
$ban = mysql_num_rows(mysql_query("SELECT * FROM `ban`"));
$cl = mysql_num_rows(mysql_query("SELECT `to` FROM `".prefix."clicks`"));
$sql_col_new_pl = mysql_num_rows(mysql_query("SELECT * FROM links WHERE act='0'"));
$sql_col_act_pl = mysql_num_rows(mysql_query("SELECT * FROM links WHERE act='2'"));
$sql_col_noact_pl = mysql_num_rows(mysql_query("SELECT * FROM links WHERE act='1'"));
$birzha = mysql_fetch_array(mysql_query("select * from `birja`"));
$money=mysql_fetch_row(mysql_query('SELECT SUM(`money`) FROM `users`'));
$moder = mysql_fetch_array(mysql_query("SELECT count(`login`) FROM `".prefix."users` WHERE `moder`<>'0'"));
$moder = $moder[0];
$luser = mysql_fetch_array(mysql_query("SELECT * FROM `".prefix."users` order by ts desc limit 1;"));
$admin = mysql_fetch_array(mysql_query("SELECT count(`login`) FROM `".prefix."users` WHERE `admin`<>'0'"));
$admin = $admin[0]; //это для вывода количества админов
$_res=mysql_query("SELECT u.login, l.id, l.name FROM `".prefix."users` as `u`, `links` as `l`
WHERE u.cfrom > u.cto and l.nick = u.login");
$bank = mysql_result(mysql_query("SELECT SUM(bank) FROM cclub_users"),0); //в банке у всех
$nak = mysql_result(mysql_query("SELECT SUM(cfrom) FROM cclub_users"),0); //всего накликали
$pro = mysql_result(mysql_query("SELECT SUM(cto) FROM cclub_users"),0); //всего прокликали
$kred = $nak - $pro;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
echo '<div class="header_rek">Статистика по клик клубу:</div>
»Всего участников: <b>['.$vsego.']</b><br/>
»Последний: <b>['.$luser['login'].']</b><br/>
»Ативных: <b>['.$act.']</b><br/>
»Забаненых: <b>['.$ban.']</b><br/>
»Админов: <b>['.$admin.']</b><br/>
»Модераторов: <b>['.$moder.']</b><br/>
»Всего площадок: <b>['.$url.']</b><br/>
»Активных площадок: <b>['.$sql_col_act_pl.']</b><br/>
»На модерации площадок: <b>['.$sql_col_new_pl.']</b><br/>
»Недопущенных площадкок: <b>['.$sql_col_noact_pl.']</b><br/>
»Доступно для кликов: <b>['.mysql_num_rows($_res).']</b><br/>
»Кликов сегодня: <b>['.$cl.']</b><br/>
»Кредитов в банке: <b>['.round($bank).']</b><br/>
»Кредитов в активе: <b>['.$kred.']</b><br/>
»Введено средств: <b>['.$birzha['in'].' руб.]</b><br/>
»Выведено средств: <b>['.$birzha['out'].' руб.]</b><br/>
»Денег в активе: <b>['.(int)$money[0].' руб.]</b>';
$cache->end();
}
include_once ('config/end.php');
//make for clikus.ru
//admin icq 915317
?>