Файл: accmarket.net/game/stat.php
Строк: 79
<?php
define('_ON_CMS', 1);
require_once '../includes/start.php';
require_once '../includes/function.php';
require_once '../includes/header.php';
if($level==0 OR $ban!=0){
header('Location: ../index.php');
}
switch ($act) {
default:
div('Статистика игры','top');
$t = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `game`!=0 and `rasa`=1;"), 0);
$p = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `game`!=0 and `rasa`=2;"), 0);
$z = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `game`!=0 and `rasa`=3;"), 0);
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `game`=1;"), 0);
$count1 = mysql_result(mysql_query("SELECT COUNT(*) FROM `planet`;"), 0);
$count2 = mysql_result(mysql_query("SELECT COUNT(*) FROM `army`;"), 0);
$count3 = mysql_result(mysql_query("SELECT COUNT(*) FROM `war`;"), 0);
$count4 = mysql_result(mysql_query("SELECT COUNT(*) FROM `sector_loc` WHERE `loc`=4;"), 0);
$count5 = mysql_result(mysql_query("SELECT COUNT(*) FROM `sector_loc` WHERE `loc`=5;"), 0);
$count6 = mysql_result(mysql_query("SELECT COUNT(*) FROM `sector_loc` WHERE `loc`=3;"), 0);
$count7 = mysql_result(mysql_query("SELECT COUNT(*) FROM `rabota`;"), 0);
$count8 = mysql_result(mysql_query("SELECT COUNT(*) FROM `log_battle`;"), 0);
$count9 = mysql_result(mysql_query("SELECT COUNT(*) FROM `art`;"), 0);
$count10 = mysql_result(mysql_query("SELECT COUNT(*) FROM `sector_loc` WHERE `loc`=6;"), 0);
$count11 = mysql_result(mysql_query("SELECT COUNT(*) FROM `sun`;"), 0);
$count12 = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`;"), 0);
echo '<div class="cont">Регистраций: '.$count12.'</div>';
echo '<div class="conts">';
echo '<img src="../images/terran.png" alt="image" /> Терранов: '.$t.'<br/>';
echo '<img src="../images/protoss.png" alt="image" /> Протоссов: '.$p.'<br/>';
echo '<img src="../images/zerg.png" alt="image" /> Зергов: '.$z.'</div>';
echo '<div class="conts">';
echo '<img src="../images/menu.png" alt="" /> Активные игроки: '.$count.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Звезды: '.$count11.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Планеты: '.$count1.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Отряды: '.$count2.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Войны: '.$count3.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Сражения: '.intval($count8/2).'<br/>';
echo '<img src="../images/menu.png" alt="" /> Луны: '.$count4.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Порталы: '.$count5.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Артефакты: '.$count9.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Метеориты и кометы: '.$count6.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Корабли Зелл-Нага: '.$count10.'<br/>';
echo '<img src="../images/menu.png" alt="" /> Текущие работы: '.$count7.'<br/>';
echo '</div>';
break;
}
div('<a href="../">В игру</a>','conts');
require_once '../includes/footer.php';
?>