Файл: index.php
Строк: 88
<?
include_once 'inc/conn.php';
include_once 'function.php';
$set['title']='Главная ';
include_once'inc/head.php';
echo (!empty($_SESSION['id_user']) && $user['status'] == 3 || $user['status'] == 3)
? $div_center . '<div class="kmenu"><a href="/admin"><b style="color:#00AA00;">Админка</b></a></div>' . $div_end:'';
echo (!empty($_SESSION['id_user']) && $user['status'] >= 1 && $user['status'] <= 2)?
$div_center . '<div class="kmenu"><a href="moder.php?"><b style="color:#00AA00;">Модерка</b></a></div>' . $div_end:'';
if(isset($user))
{
include_once 'inc/bonus.php';
}
if (isset($user)){
echo "<div class='menu'>";
if($user['sila']>=0 && $user['sila']<=1000)echo " <img src='img/status_1.png' alt='*' /> ";
if($user['sila']>=1001 && $user['sila']<=2000)echo " <img src='img/status_2.png' alt='*' /> ";
if($user['sila']>=2001 && $user['sila']<=5000)echo " <img src='img/status_3.png' alt='*' /> ";
if($user['sila']>=5001)echo " <img src='img/status_4.png' alt='*' /> ";
echo "</div>";echo "<div class='umenu'>";
if($user['sila']>=0 && $user['sila']<=1000)echo " <img src='img/stadia_1.png' alt='*' /> ";
if($user['sila']>=1001 && $user['sila']<=2000)echo " <img src='img/stadia_2.png' alt='*' /> ";
if($user['sila']>=2001 && $user['sila']<=5000)echo " <img src='img/stadia_3.png' alt='*' /> ";
if($user['sila']>=5001)echo " <img src='img/stadia_4.png' alt='*' /> ";
echo "</div><div class='menu'>";
echo ''.($user['kach_time'] < time() ?'<a href="/kach"><img src="img/kach.png"></a>':'<img src="img/kachoff.png">');
echo ''.($user['beg_time'] < time() ?'<a href="/beg"><img src="img/beg.png"></a>':'<img src="img/begoff.png">');
echo ''.($user['spat_time'] < time() ?'<a href="/spat"><img src="img/spat.png"></a>':'<img src="img/spatoff.png">');
echo ''.($user['pit_time'] < time() ?'<a href="/pit"><img src="img/koktal.png"></a>':'<img src="img/koktaloff.png">
');
echo " </div>";
$count = mysql_result(mysql_query("SELECT COUNT('id') FROM `news`"), 0);
if($count != 0)
{
$result = mysql_query("SELECT `id`, `title`, `msg`, `id` FROM `news` ORDER BY `id` DESC LIMIT 1");
while($news = mysql_fetch_assoc($result))
{
echo '
<div class="umenu"><b><img src="/img/rss.png"alt="*"/> Последняя новость</b>:<br />'.nl2br(smiles($news['msg'])).'
<br /></div>';
}
}
echo '<div class="kmenu"><img src="img/bank.png"> <a href="/city_bank">Банк</a></div>';
echo '<div class="kmenu"><img src="img/cafe.png"> <a href="/city_cafee">Кафе</a></div>';
echo '<div class="kmenu"><img src="img/gantel.png"> <a href="/kachalka">Качалка</a></div>';
echo '<div class="kmenu"><img src="img/shop.png"> <a href="/city_shop">Магазин</a></div>';
echo '<div class="kmenu"><img src="img/user.png"> <a href="/online">Онлайн</a> ('.mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date` > '".(time()-600)."'"), 0).')</div>';
echo '<div class="kmenu"><img src="img/1.gif"> <a href="pages/777.php">Онлайн игра ( Однорукий бандит )</a></div>';
echo '<div class="kmenu"><img src="img/help.png"> <a href="/help">Помощь по игре</a></div>';
echo '<div class="kmenu"><img src="img/work.png"> <a href="/city_work">Работа</a></div>';
echo '<div class="kmenu"><img src="img/user.png"> <a href="pages/contacts.php">Связаться с создателем</a></div>';
echo '<div class="kmenu"><img src="img/sila.png"> <a href="/top">ТОП 10 спортсменов</a></div>';
echo '<div class="kmenu"><img src="img/chat.png"> <a href="/chat"> Live Чат</a></div>';
if(isset($user))
echo'<div class="kmenu"><img src="/img/quit.png" height="16" width="16" alt="*" /><a href="/exit"> Выход</a>';
echo "</div>";}else{
include_once'inc/login.php';}
include_once 'inc/foot.php';
?>