Файл: vkollektive2014/play/index.php
Строк: 23
<?
//------------------------------------Подключаем скрипт------------------------//
include '../connect.php';
$location = '(В развлечениях)';
if(!$u['id']){
header ("Location: /registration.php?err=1");
exit;
}
require_once("../core/ip.php");
//------------------------------------Name страницы------------------------//
$title = $title . ' : Развлечения';
//------------------------------------Тема------------------------//
require_once("../head.php");
########Запросы
# топ фотографий
$cphotos_top = mysql_result(mysql_query("SELECT COUNT(*) FROM `photos_photo` WHERE `top` = '1'"), 0);
# дуели
$cduels = mysql_result(mysql_query("SELECT COUNT(*) FROM `duels_list` WHERE `time_end` > '".time()."'"), 0);
# гаремы
$cgarem = mysql_result(mysql_query("SELECT COUNT(*) FROM `garems_list` WHERE `users` > '0'"), 0);
# микроблоги
$cblog = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `microblog_messages`"), 0);
$cblog2 = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `microblog_messages` WHERE `time` > '".(time()-(60*60*24))."'"), 0);
if($cblog2 > 0) $blog_new = '<font color = "red">+'.$cblog2.'</font>';
######Конец
echo '<div class="div"> <a href = "/duels.php"><img src="/ico/duels.gif"> Дуэли <font color = "#777777">('.$cduels.')</font></div></a> ';
echo '<a href="/garems.php"><div class="div"><img src="/ico/garems.png"> Гарем</a> <font color = "#777777">('.$cgarem.')</font></div>';
echo '<div class="div"><img src="/ico/status.png" alt="lovs"/> <a href = "/microblog.php?act=all"> Статусы пользователей</a> <font color = "#777777">('.$cblog.')</font> '.$blog_new.'</div>';
include '../foot.php';