<?

list($msec, $sec) = explode( chr(32), microtime() );

$online = mysql_num_rows( mysql_query('SELECT * FROM `users` WHERE `online` > \''.( time() - (60 * 15) ).'\'') );

if($user)
{

?>

<script type="text/javascript">
document.ondragstart = test;
document.onselectstart = test;
document.oncontextmenu = test;
function test() {
return false;
}
document.oncontextmenu;
function catchControlKeys(event){
var code=event.keyCode ? event.keyCode : event.which ? event.which : null;
if (event.ctrlKey){
// Ctrl+U
if (code == 117) return false;
if (code == 85) return false;
// Ctrl+C
if (code == 99) return false;
if (code == 67) return false;
// Ctrl+A
if (code == 97) return false;
if (code == 65) return false;
}
}
</script>

<div class='line'></div><div class='player menuList'>

<li><a href='/user/'><img src='/images/icon/user.png' alt=''/>Мой герой</a></li>


<?php

  if($clan) echo '<li><a href="/clan/"><img src="/images/icon/user.png" alt=""/>Мой клан<span class="green"> (+)</span></a></li>';
  
?>


<li class='noBorder'><a href='/'><img src='/images/icon/arrow.png' alt=''/>На главную</a></li></div>

<div class='line'></div>
<div class='foot'><div>
<span class='float-right medium'><?=($user['save'] == 1 ? '<a href=\'/settings/\'>Настройки</a>':'<a href=\'/save/\'>Сохранить</a>')?></span><?=$user['login']?></span></div>
<div class='center'>
<img src='/images/icon/level.png' alt='lvl'/> <?=$user['level']?> | 
<img src='/images/icon/gold.png' alt='g'/> <?=n_f($user['g'])?> | 
<img src='/images/icon/silver.png' alt='s'/> <?=n_f($user['s'])?></div></div></div><br/>

<?php

  $chatmessages = 0;

    $countchatmessages     = mysql_num_rows(mysql_query('SELECT * FROM `chat` WHERE `clan` = \'0\' AND `to` = \''.$user['id'].'\' AND `read` = \'0\''));
  if($chat > 0)       $chatmessages += $chat;
  
  if($clan)
  {
  
    $countclanchatmessages = mysql_num_rows(mysql_query('SELECT * FROM `chat` WHERE `clan` = \''.$clan['id'].'\' AND `to` = \''.$user['id'].'\' AND `read` = \'0\''));
    if($clanchat > 0) $chatmessages += $clanchat;

  }

  
/*  <a class='quality-4' href='/stash/'>Тайник открыт!</a><br/>
<span class='dgreen'>Осталось: 32 мин. Торопись!</span>
<div class='mb10'></div>
  */  

?>



<div class='center'>



<span class='grey'>
<a href='/forum/'>Форум</a> |
<a href='/chat/'>Чат</a> | 
<a href='/rating/'>Зал славы</a>
<div class='mb10'></div></span>
<div class='mb10'></div>
<span class='medium grey'>
<a class='grey' href='/common/'>Общее</a> | 
<a class='grey' href='/'>Другие игры</a></span><br/>
 
  <span class='small grey'><?=round((($sec+$msec)-$gtime),3)?> сек, 
<span id="hours"></span>

<script type="text/javascript">
obj_hours=document.getElementById("hours");
function wr_hours()
{
time=new Date();
time_sec=time.getSeconds();
time_min=time.getMinutes();
time_hours=time.getHours();
time_wr=((time_hours<10)?"0":"")+time_hours;
time_wr+=":";
time_wr+=((time_min<10)?"0":"")+time_min;
time_wr+=":";
time_wr+=((time_sec<10)?"0":"")+time_sec;
time_wr=""+time_wr;
obj_hours.innerHTML=time_wr;
}
wr_hours();
setInterval("wr_hours();",1000);
</script>

 
 | 
 <a class='grey' href='/online/'>В игре: <?=n_f($online)?></a><br/>kninds.ru © 2015, 18+</span><br/>

 <?php

  if($user['access'] > 0) echo '<br/><a href=\'/adm/\'>Панель управления</a>';

?>
 
 </div><br/>

 <span style='text-shadow:none;'></span>
					
					















<?php

}
else
{

?>



<div class='center'>



<span class='small grey'><?=round((($sec+$msec)-$gtime),3)?> сек, 
<span id="hours"></span>

<script type="text/javascript">
obj_hours=document.getElementById("hours");
function wr_hours()
{
time=new Date();
time_sec=time.getSeconds();
time_min=time.getMinutes();
time_hours=time.getHours();
time_wr=((time_hours<10)?"0":"")+time_hours;
time_wr+=":";
time_wr+=((time_min<10)?"0":"")+time_min;
time_wr+=":";
time_wr+=((time_sec<10)?"0":"")+time_sec;
time_wr=""+time_wr;
obj_hours.innerHTML=time_wr;
}
wr_hours();
setInterval("wr_hours();",1000);
</script> | 
Онлайн: <?=n_f($online)?><br/>

kninds.ru © 2015, 18+</span><br/><br/>
<span style='text-shadow:none;'></span>


<div align='center'>
<script type="text/javascript" src="http://mobtop.ru/c/104352.js"></script><noscript><a href="http://mobtop.ru/in/104352"><img src="http://mobtop.ru/104352.gif" alt="MobTop.Ru - Рейтинг и статистика мобильных сайтов"/></a></noscript>
<a href="http://katstat.ru/in/10.php"><img src="http://katstat.ru/count/big/10.gif" alt="katstat.ru"/></a>
</div>

<span style='text-shadow:none;'></span>





<?php

}

/*<div align='center'>
  <a href='http://vk.com/club68530403'>Мы ВКонтакте</a><br/><br/>
  <a href="http://vigre.su/vote?game_id=1619" id="vigre.su.banner"><img style="border:0px" alt="vigre.su" src="http://vigre.su/banner.php?game_id=1619"/></a>
</div>
</body></html>*/
?>


<?php

ob_end_flush();

?>