<?
include_once 'sys/inc/start.php';
include_once 'sys/inc/compress.php';
include_once 'sys/inc/sess.php';
include_once 'sys/inc/home.php';
include_once 'sys/inc/settings.php';
include_once 'sys/inc/db_connect.php';
include_once 'sys/inc/ipua.php';
include_once 'sys/inc/fnc.php';
$show_all=true;//гости видят главную при закрытом сайте
include_once 'sys/inc/user.php';


include_once 'sys/inc/thead.php';

echo "<div class='gmenu'>";
echo "<center><img src='/style/themes/$set[set_them]/logo.png' alt='' />";
echo "</div>\n";

echo "<div class='rekltitle'>";
rekl(2);
echo "</div>\n";

echo "<div class='title'>";
echo "<a href='/online.php'>Сейчас на сайте: ".mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > ".(time()-1500).""), 0)."</a> \n";

echo "(+ <a href='/online_g.php'>".mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > ".(time()-1500)." AND `pereh` > '0'"), 0)." гостей</a>)\n";
echo "</div>\n";

//echo "Тотальная Система Общения ;)\n";
echo "</div>\n";
//echo "<div class='titla'>";
//rekl(2);
//echo "</div>\n";
err();

include_once 'sys/inc/rekl_main.php';


aut();
include_once 'bestank.php'; // вывод на главной лидеров
echo "<div class='gmenu'>\n";
echo "<center><img src='/nagrady/gold.png' alt=''/> <a href='/nagrady/'>Доска почета</a> (".mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `nagrad` = '1'"),0).")</center>\n";
echo "</div>\n";
if (!$set['web'])
if(isset($user))
{

echo "<div class='gmenu'>\n";
echo "<img src='/style/about.gif' alt='' class='icon'/>\n";
echo "<a href='/info/aclove.php'>Впервые на fibik.tk ?</a>\n";
echo '</a><br />';
echo "</div>\n";
}

echo "<div class='gmenu'>\n";
echo "<img src='/style/mess0.gif' alt='' class='icon'/>\n";
echo "<a href='/news/'>Новости fibik.tk </a>\n";
echo ' ';
@include H.'news/gcount.php';
echo '</a><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/gazeta.gif' alt='' class='icon'/>\n";
echo "<a href='/newspaper/'>Газета fibik.tk </a>\n";
@include H.'newspaper/count.php';
echo '</a><br />';
echo "</div>\n";

if (user_access('adm_panel_show'))echo "<div class='gmenu'><img src='style/admin_sign.png' alt='' class='icon'/> <a href='/adm_chat/'>Админ-чат</font></a></div>\n";

if (user_access('adm_panel_show'))echo "<div class='gmenu'><img src='style/admin_sign.png' alt='' class='icon'/> <a href='/adm_panel/'>Админка</font></a></div>\n";


echo"<div class='gmenu'>";
echo "<img src='/style/icons/86.gif' alt='' class='icon'/>\n";
echo '<a href="/FotoKonkurs/">Фотоконкурс</a>';
echo ' <font color="#afb0a3">(';
@include H.'FotoKonkurs/count.php';
echo ')</font>';
echo "</div>\n";

echo "</div>\n";
echo "<div class='obmen'>\n";
echo "<img src='/style/SharedZone.png' alt='' class='icon'/>\n";
echo "<a href='/obmen/'>Зона Обмена</a>\n";
echo ' ';
@include H.'obmen/count.php';
echo '</a><br />фото,игры,видео,софт..<br />';
echo "</div>\n";

if ($user['show_frends']==1)
{
################# личный уголок на главной
if(isset($user)){
echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/lafes.png' alt='' class='icon'/>\n";
echo '<a href="/frendon.php?id='.$user['id'].'">Друзья в fibik.tk</a>';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` INNER JOIN `user` ON `frends`.`frend`=`user`.`id` WHERE `frends`.`user` = '$user[id]' AND `frends`.`i` = '1' AND `user`.`date_last`>'".(time()-1500)."'"), 0);
echo ' '.( ($k_post==0) ? '(0)':'<font color="red">'.$k_post ).'</font><br/>';
echo "</div>\n";
}
}
################# конец уголка на главной
echo "<div class='gmenu'>\n";
echo "<img src='/style/dating.gif' alt='' class='icon'/>\n";
echo "<a href='/love/'>Знакомства</a> | <img src='search.gif' alt='' class='icon'/> <a href='/love/search.php'>Поиск</a>\n";
echo "</div>\n";

echo "<div class='gmenu'>\n";
$currD=date("d", time());
$currm=date("m", time());
$k_birsday=mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `ank_d_r` = '$currD' and `ank_m_r` = '$currm'",$db), 0);
echo "<img src='/style/icons/7.gif' alt='' class='icon'/>\n";
echo "<a href='/list_bday.php'>Именниники</a> ($k_birsday)\n";
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/People.gif' alt='' class='icon'/>\n";
echo "<a href='/users.php'>Обитатели</a>\n";
echo ' <font color="#afb0a3">(';
@include H.'users_count.php';
echo ')</font>';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/duels.gif' alt='' class='icon'/>\n";
echo "<a href='/duel/'> Дуели</a>\n";
@include H.'duel/count.php';
echo"</div>";

echo "<div class='gmenu'>\n";
echo "<img src='/style/garem.png' alt='' class='icon'/>\n";
echo "<a href='/garem.php'> Гаремы</a>\n";
echo"</div>";

echo "<div class='gmenu'>\n";
echo "<img src='/style/klan.png' alt='' class='icon'/>\n";
echo "<a href='/klan/'> Кланы</a>\n";
@include H.'klan/count.php';
echo"</div>";

echo "<div class='gmenu'>\n";
echo "<img src='/style/diary.gif' alt='' class='icon'/>\n";
echo "<a href='/dnev/'>Дневники</a>\n";
echo ' ';
@include H.'dnev/count.php';
echo '</a><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/Forum.gif' alt='' class='icon'/>\n";
echo "<a href='/forumm/'>Форум</a>\n";
echo ' ';
@include H.'forumm/count.php';
echo '</a><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/chat.gif' alt='' class='icon'/>\n";
echo "<a href='/chat/'>Чат</a>\n";
@include H.'chat/count.php';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/blogs16.gif' alt='' class='icon'/>\n";
echo "<a href='/besedka/room/6/5555/'>Беседка</a>\n";
echo ' ';
@include H.'besedka/count.php';
echo '</a>';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/rings.gif' alt='' class='icon'/>\n";
echo "<a href='/zags/'>Загс</a>\n";
echo ' ';
@include H.'zags/count.php';
echo '</a><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/PhotoIcon.gif' alt='' class='icon'/>\n";
echo "<a href='/albums.php'>Фотоальбомы</a>\n";
echo ' <font color="#afb0a3">(';
@include H.'foto/count.php';
echo ')</font></a><br />';
echo "</div>\n";

$community_comm = mysql_result(mysql_query("SELECT COUNT(*) FROM `community_comm`"), 0);
echo "<div class='gmenu'>\n";
echo "<img src='/style/soo.gif' alt='' class='icon'/>\n";
echo "<a href='/comm/'>Сообщества</a> ($community_comm)\n";
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/ads_icon.gif' alt='' class='icon'/>\n";
echo "<a href='/pagg/'>Объявления</a>\n";
@include H.'pagg/count.php';
echo '</a><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/top10.gif' alt='' class='icon'/>\n";
echo "<a href='/top/'>Топы Oбитателей</a>\n";
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/games16.png' alt='' class='icon'/>\n";
echo "<a href='/on-line/'>Развлечения (12)</a>\n";
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/ic_g1.png' alt='' class='icon'/>\n";
echo "<a href='/modules/pic/'>Центр загрузок</a>\n";
echo ' ';
@include H.'/modules/pic/count.php';
echo '</a><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/info12.png' alt='' class='icon'/>\n";
echo "<a href='/servis/'>Сервисы</a> | <img src='info.gif' alt='' class='icon'/> <a href='/info'>Информация</a>\n";
echo "</div>\n";
?>

<?
include_once 'sys/inc/gfoot.php';