<?
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='rekltitle'>";
//rekl(2);
//echo "</div>\n";
echo "<div class='logo'>";
echo "<img src='/style/themes/$set[set_them]/logo.png' alt='' /><br/>";
echo "Тотальная Система Общения ;)\n";
echo "</div>\n";

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

include_once 'sys/inc/rekl_main.php';
//include_once 'vcentre.php';
/*
if(isset($user))
{
}else{
echo "<div class='tmn'>\n";
echo "<center>Добро пожаловать гость! ".vremja($guest['date_last'])." (MSK)</center>\n";
echo "</div>\n";
}
*/

aut();

if (!$set['web'])
if(isset($user))
{
}else{
echo "<img src='/style/icons/vopr16.gif' alt='' class='icon'/>\n";
echo "<a href='/info/maxmob.php'>Первый раз на LaFeS.Ru?</a>\n";
echo '</a><br />';
}

echo "<img src='/style/icons/news16.gif' alt='' class='icon'/>\n";
echo "<a href='/news/'>Новости</a>\n";
echo ' ';
@include H.'news/gcount.php';
echo '</a><br />';
if(isset($user)){
echo "<img src='/style/icons/86.gif' alt='' class='icon'/>\n";
echo '<a href="/foto_konkurs/">Фотоконкурс</a>';
$fot=mysql_fetch_array(mysql_query("SELECT * FROM `foto_conf`"));
if ($fot['closed']==0)
{
echo ' <font color="#afb0a3">(';
@include H.'foto_konkurs/count.php';
echo ')</font></a>';
echo "</div>\n";
}
$fot=mysql_fetch_array(mysql_query("SELECT * FROM `foto_conf`"));
if ($fot['closed']==1)
{
echo "";
echo '</font></a>';
}}

include_once 'sys/inc/news_main.php'; // новости 

echo "<div class='obmen'>\n";
echo "<img src='/style/icons/arhiv16.gif' 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/group.png' alt='' class='icon'/>\n";
echo '<a href="/frendon.php?id='.$user['id'].'">Друзья на сайте</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/icons/lafes.png' 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/icons/dnev.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/icons/forum16.png' alt='' class='icon'/>\n";
echo "<a href='/forum/'>Форум</a>\n";
echo ' ';
@include H.'forum/count.php';
echo '</a><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/irc16.png' alt='' class='icon'/>\n";
echo "<a href='/chat/'>Чат</a>\n";
echo ' <font color="#afb0a3">(';
@include H.'chat/count.php';
echo ')</font></a><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/games16.png' alt='' class='icon'/>\n";
echo "<a href='/gorod/'>Город</a>\n";
echo ' <font color="#afb0a3">(';
@include H.'gorod/count.php';
echo ')</font></a><br />';
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><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/loves16.png' alt='' class='icon'/>\n";
echo "<a href='/love/'>Знакомства</a>\n";
//echo ' <font color="#afb0a3">(';
//@include H.'users_count.php';
echo '<br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/foto16.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";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/friends16.gif' alt='' class='icon'/>\n";
echo "<a href='/comm/'>Сообщества</a>\n";
//echo ' <font color="#afb0a3">(';
//@include H.'comm/count.php';
//echo ')</font></a><br />';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/rating16.gif' alt='' class='icon'/>\n";
echo "<a href='/votes/'>Голосования</a>\n";
@include H.'votes/count.php';
echo '</a><br />';
echo "</div>\n";

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

echo "<div class='gmenu'>\n";
echo "<img src='/style/obmen/018.png' alt='' class='icon'/>\n";
echo "<a href='/loads/'>Центр файлов</a> \n";
@include H.'loads/count.php';
echo "</div>\n";

echo "<div class='gmenu'>\n";
echo "<img src='/style/icons/uk.png' alt='' class='icon'/>\n";
echo "<a href='/servis/'>Сервисы</a> | <a href='/info/'>Информация</a>\n";
echo "</div>\n";
echo "<div class='aut'>";
$on1 = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` >".(time()-1500).""), 0);
$on2= mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > ".(time()-1500)." AND `pereh` > '0'"), 0);
$on3 = $on1 + $on2;
echo "<center><a href='/online.php'>На сайте <font color='red'>$on3</font></a></center>\n";
echo "</div>\n";
//include_once 'dnev/incdnev.php';

include_once 'sys/inc/gfoot.php';


?>