Файл: KOSMOS/inc/stat.php
Строк: 84
<?
echo "<div class='white'><b><ul class='block'> <center>Статистика сайта</center></b></h1></div>";
echo "<div class='block'>";
$man = mysql_result(mysql_query("SELECT COUNT(*) FROM kolhoz_user WHERE pol='1'"), 0);
$girl = mysql_result(mysql_query("SELECT COUNT(*) FROM kolhoz_user WHERE pol='0'"), 0);
echo"<img width='16' height='16' src='images/toch.png' alt='' /><b><font color=white>Парней: $man</font><br/>";
echo"<img width='16' height='16' src='images/toch.png' alt='' />Девушек: $girl<br/>";
echo "<img src='/images/toch.png' alt='o'/><b>Онлайн: <span class='white'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `date_last` > '".(time()-600)."'"), 0)."</span>";
echo "<br><img src='/images/toch.png' alt='o'/><b>Посетили сайт за 2 дня: <span class='white'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `date_last` > '".(time()-172800)."'"), 0)."</span>";
echo "<br><img src='/images/toch.png' alt='o'/>Регистраций: </b> <span class='white'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user`"), 0)."</span>";
echo '<br><img width="16" height="16" src="images/toch.png" alt="o">Форум:Темы/Разделы/Посты: ('.mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_forum` WHERE `id` >= '1' AND `type` = 'tema'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_forum` WHERE `id` >= '1' AND `type` = 'razdel'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_forum` WHERE `id` >= '1' AND `type` = 'komm'"),0).')</li>';
echo '<br><img alt="" width="16" height="16" src="/images/toch.png">Новостей</a> ('.mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_forum` WHERE `id` >= '1' AND `mother` = '1'"),0).')';
echo '<br><img width="16" height="16" src="images/toch.png" alt="o">Чат: Посты/Комнаты</a>('.mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_chat` WHERE `id` >= '1' AND `type` = 'komm'"),0).'/'.mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_chat` WHERE `id` >= '1' AND `type` = 'room'"),0).')</span><br></div>';
$vip_5 = mysql_result(mysql_query("SELECT COUNT(*) FROM kolhoz_user WHERE vip"), 0);
$diplom = mysql_result(mysql_query("SELECT COUNT(*) FROM kolhoz_user WHERE diplom_1"), 0);
echo "<div class='block'>";
echo "<center><div class='white'><b> <left>Моя статистика</left></b></center></h1></div><br>";
//echo "<b><img width='16' height='16' src='images/toch.png' alt='o'>Активных Грядок: </a> ".(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' AND (`id_plant` = '0' OR `time_water` = '$time' OR `time` = '$time' OR `time_water` < '$time' OR `time` < '$time' OR (`time_soil` = '$time' AND `soil` = '0') OR (`time_soil` < '$time' AND `soil` = '0'))"),0)!=0?"(".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_ground` WHERE `id_user` = '$ku[id]' AND (`id_plant` = '0' OR `time_water` = '$time' OR `time` = '$time' OR `time_water` < '$time' OR `time` < '$time' OR (`time_soil` = '$time' AND `soil` = '0') OR (`time_soil` < '$time' AND `soil` = '0'))"),0).")</span>":null)."";
//echo "<br><img width='16' height='16' src='images/toch.png' alt='o'>Активных Прудов: </a>".($count_prud?"<span class='title'>($count_prud)":null)."</li>";
//echo "<br><img width='16' height='16' src='images/toch.png' alt='o'>Активных Загонов: </a>".($count_zag?"<span class='title'>($count_zag)</span>":null)."</li>";
//echo "<br><img width='16' height='16' src='images/toch.png' alt='o'>Активных Плошадок в Погребе</a>".(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_polka` WHERE `id_user` = '$ku[id]' AND (`id_plant2` = '0' OR `time_water2` = '$time' OR `time` = '$time' OR `time_water2` < '$time' OR `time` < '$time' OR (`time_soil2` = '$time' AND `soil2` = '0') OR (`time_soil2` < '$time' AND `soil2` = '0'))"),0)!=0?"<span class='title'>(".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_polka` WHERE `id_user` = '$ku[id]' AND (`id_plant2` = '0' OR `time_water2` = '$time' OR `time` = '$time' OR `time_water2` < '$time' OR `time` < '$time' OR (`time_soil2` = '$time' AND `soil2` = '0') OR (`time_soil2` < '$time' AND `soil2` = '0'))"),0).")</span>":null)."</li>";
//echo "<br><img width='16' height='16' src='images/toch.png' alt='o'>Активных Плошадок в Саду</a>".(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_sad` WHERE `id_user` = '$ku[id]' AND (`id_tree` = '0' OR `time_sbor` = '$time' OR `time` = '$time' OR `time_sbor` < '$time' OR `time` < '$time' OR (`time_soil` = '$time' AND `soil` = '0') OR (`time_soil` < '$time' AND `soil` = '0'))"),0)!=0?"<span class='title'>(".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_sad` WHERE `id_user` = '$ku[id]' AND (`id_tree` = '0' OR `time_sbor` = '$time' OR `time` = '$time' OR `time_sbor` < '$time' OR `time` < '$time' OR (`time_soil` = '$time' AND `soil` = '0') OR (`time_soil` < '$time' AND `soil` = '0'))"),0).")</span>":null)."</li>";
echo "<br><img width='16' height='16' src='images/toch.png' alt='o'>Смс в Почте</a> (".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_mail` WHERE `id_user` = '$ku[id]'"),0)."".(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_mail` WHERE `id_user` = '$ku[id]' AND `read` = '0'"),0)!=0?"/<font color='red'>+".mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_mail` WHERE `id_user` = '$ku[id]' AND `read` = '0'"),0)."":null)."</font>)</span></li>";
echo "<br><img width='16' height='16' src='images/toch.png' alt='o'>Монет: </b> <span><b><font color=orange>$ku[money]</font></b></span>";
echo "<br><img width='16' height='16' src='images/toch.png' alt='o'>Рубинов: </b> <span><b><font color=orangered>$ku[rubies]</font></b></span>";
echo "<br><img width='16' height='16'
src='images/toch.png' alt='o'>Опыт: <img width='16' height='16' src='images/icons/".(isset($dexp)?"doubleexp":"experience").".png' alt='o'> <span> ".($ku['level']<$bigl?"".rating($kr)."/".rating($level['rating'])."":"".rating($ku['rating'])."")." </span> опыта<br>";
include_once 'inc/foot.php';
?>