<?php

if (!isset($user)) {
    // Для неавторизированых
    if ($_SERVER['PHP_SELF'] != '/index.php') {
        echo '<div class="navbar"><div class="block_c">';

        echo "<a href='/'>" . ico('icons', 'home.png') . " На главную</a>";
    }
} else {


    echo "</font></b></div>";

    // Для авторизированых

    if ($_SERVER['PHP_SELF'] == '/chat.php' or $_SERVER['PHP_SELF'] ==

        '/forum.php' or $_SERVER['PHP_SELF'] == '/mail.php'
    ) {
    }
  echo div('header');  
echo "<center><img src='/img/rsdfg.png'> </a></center></div>";

//echo '<div class="header center"><img src="/img/rsdfg.png">  </div>';

    echo '<div class="header center"><img src="/images/icons/pattern-left.png"> <span class="almaz"> <img 
src="/images/icons/almaz.png">  ' . n_f($user['almaz']) . '   
    </span>  <span class="gold"> <img 

src="/images/icons/gold.png" width="5%">   ' . n_f($user['gold']) . ' <img 
src="/images/icons/skull.png">  ' . n_f($fights['skull']) . ' <img src="/images/icons/pattern-right.png"></span> </div>';
 echo div('header');  
echo "<center><img src='/img/rsdfg.png'> </a></center></div>";

    echo "<div class='header'><table style='width:100%;'>";
//echo div('header');


    if ($_SERVER['PHP_SELF'] != '/main.php') {
        echo "<td class='center'><li> <div class='heade'><a href='/main'><img src='/images/other/home.png' width ='102px'></a></li></td>";
    }


    echo "<td 

class='center'><li> <div class='heade'><a href='/profile/?refreshlink-->on-->true=LinkKey=$LinkKey'><img src='/images/other/profile.png' width ='102px'></font></a></li></td>";


    if ($user['id_clan'] == true) {


        echo "<td class='center'> <div class='heade'><li><a href='/clan/" . $user['id_clan'] . "'><img src='/images/other/clan.png' width ='102px'></a></li></td>";
    }


    echo "</table></div>";
echo "<center><img src='/images/pims1.png' ></center>";


}
echo div('heade center');
//echo " <a href='/smitch/?key=

//$key'> " . color('orange') . "  Скидка на заточку вещей 30%  </span></a><br>";
//echo "<a href='/clans'>" . color('orange') . "Акция: создание клана всего 200 алмазов.</font></a><br>";
$getSale = mysql_fetch_assoc(mysql_query("SELECT * FROM `avenax_admin` WHERE `id` = '1'"));
    if (!empty($getSale) && $getSale['sale_diamond_time'] > time()) {
        //echo div('wrapper');
        echo '<a href="/j/?key=$key">Скидка на камни: ' .  intval($getSale['sale_diamond']) . '%, осталось ' . tl($getSale['sale_diamond_time'] - time()) .'</di>' ;
   //echo "</div>";
    }
$getSale = mysql_fetch_assoc(mysql_query("SELECT * FROM `avenax_admin` WHERE `id` = '1'"));    
if (!empty($getSale) && $getSale['sale_item_time'] > time()) {
    //echo div('wrapper');
        echo '<a href="/shop">Скидка на снаряжение: ' .  intval($getSale['sale_item']) . '%, осталось ' . tl($getSale['sale_item_time'] - time()) . '</di>';
   //echo "</div>";
    }
echo "</br>";


echo " <a href='/forum/'>  Форум  </a> |<a 

href='/chat1986.php'> Чат   </a>";
//if($user['chat_read'] >= 1){
//echo "<font color='lime'>+</font>";
//}

//Вывод акции
$auction = mysql_fetch_assoc(mysql_query("SELECT * FROM `auction` WHERE 

`id` = '1'"));
if ($auction['name'] >= 1) {
    $text = "<br>" . color('orange') . " $auction[text] $auction[discount]%<span 

class='almaz'></font><br> " . span('almaz') . " При покупке через qiwi и webmoney алмазы + $auction[discount]% </span><br> " .

        color('lime') . " До конца:</span> " . tl($auction['last'] - time()) . "</font>";

    echo $text;
    echo $text2;
}

{
    echo

        "<br><a href='/rules/'>  " . span('white') . "Соглашение</span>  </a> |<a href='/support.php'>  " . span('white') .

        "Поддержка </span></a>";

}

if ($user['access'] == 3 || $user['id'] == 2) {
    echo '<div><a href="/banned_list">Список забаненных</a></div>';
}

$time = "  " . ico('icons', 'time.png') . " </a>    " . vremja() . "";

echo span('white') . "<br>@ 

ProFF <a href='/online'><span class='grey'>              Онлайн:" . n_f(mysql_num_rows(mysql_query("SELECT * FROM `users` 

WHERE `online` > '" . (time() - 18000) . "'")), 1) . "<br><span id='server_time'>"   .vremja()."</span><br>








<a href='https://play.google.com/store/apps/details?id=com.lagepoh.ru&hl=ru'><img src='/images/android.png'><span style='color: #7B68EE'>Приложение android</span>" ;

echo "</br>";
echo "</html></body>";



?>
<script>
function moscowTime() {
	var d = new Date();
	d.setHours( d.getHours() + 3, d.getMinutes() + d.getTimezoneOffset()  );
	return d.toTimeString().substring(0,8);
}
 
onload = function () {
 
  setInterval(function () {
    document.getElementById("server_time").innerHTML = moscowTime();
  }, 100);}
</script>
<?








echo '<br><a href="http://statok.net/go/16151"><img src="http://statok.net/imageOther/16151" alt="Statok.net" /></a>';















echo "</html></body>";
$mc = null;
exit();