<?php

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<meta name="viewport" content="width=device-width; minimum-scale=1; maximum-scale=1"/>

<meta name="viewport" content="width=device-width, initial-scale=1.0 ">


<?



?><link rel="stylesheet" type="text/css" href="styles/standart/style.css?20"><?















/*?> <script type="text/javascript" src="styles/snow.js"></script><?*/


$verh =1;

























$infsera = nifa($user['serebro']);
$infrub = nifa($user['rub']);


?><title><?=$title?></title><?
$stt='Сердце Тьмы';

list ( $ms , $s ) = explode ( chr ( 32 ) , microtime ( ) );
$g = $s + $ms;

// Верх страницы
if($user['id']>0){
			$hp = round(100/($expLevel[$user['level']]/($user['exp']+1)))+1; if ($hp>100){	$hp = 100;


}

$hp=ceil($hp);

if($user['mer']==1){ header('location:death.php');}
/*

*/




$miks  = 31 + TIME;
if($user['dobav']>=1 AND $user['am1_time']<=$miks){ $basil = ('UPDATE `users` SET `dobav`=0 WHERE `id` = "' . $user['id'] . '" LIMIT 1'); $dbc->query($basil); $basil = 1; 

}

$mikss  = 1 + TIME;
if($user['alt']>=1 AND $user['al_time']<=$mikss){


$dbc->query("INSERT INTO `journal` SET `user_id`='".$user['id']."', `text`='Время активации алтаря окончено. <br><a id=\"link_button\" href=\"altar.php\">Активировать</a>',




    `time`='".time()."'");
$dbc->query("UPDATE `users` SET `journal`=`journal`+1 WHERE `id`='".$user['id']."'");








 $basil7 = ('UPDATE `users` SET `alt`=0 WHERE `id` = "' . $user['id'] . '" LIMIT 1'); $dbc->query($basil7); $basil7 = 1; 




$basil77 = ('UPDATE `bonus` SET `alt`=0 WHERE `user` = "' . $user['id'] . '" LIMIT 1'); $dbc->query($basil77); $basil77 = 1; 














}


$mikssz  = 1 + TIME;


if($user['t_p']<=$mikssz){





$bon = $dbc->query("SELECT * FROM `bonus` WHERE `user` = '".$user['id']."' LIMIT 1")->fetch_assoc(); 






$mikssz  = 1 + TIME;


if($bon['les']==1 AND $bon['les_time']<=$mikssz){

$dbc->query("update `bonus` set `les` = 0 where user = '".$user['id']."'");}




if($bon['kris']==1 AND $bon['kris_time']<=$mikssz){

$dbc->query("update `bonus` set `kris` = 0 where user = '".$user['id']."'");}











  $until = 120 + TIME;
$dbc->query("update `users` set `t_p` = ".$until." where id = '".$user['id']."'");

} 







if($user['dobav']>0){ $lopo='<img src="img/stat/am_on.png">';}else{$lopo='';}




if($user['vip']>0){ $lopoo='<img src="img/stat/vip.png">';}else{$lopoo='';}



if($user['alt']>0){ $lopooo='<img src="img/new/alt.png">';}else{$lopooo='';}









if($user['id']>0){

?><?





?>
<body class="body">
<div class="b-panel-new dblue-panel bordered mt2">
<div class="panel-inner-2"><div class="font-small text-italic c-verygray">



<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>
<img src="img/stat/hp.png" width="12"><span class="info"><?=$user['health']?></span><?=$lopo?> <?=$lopoo?> <?=$lopooo?>






















</td>

<td align="right"> <img src="img/money/almaz.png" width="13"><?=$user['almaz']?>   
<img src="img/money/money.png" width="12"><?=$user['gold']?>





<img src="img/stat/sera.png" width="12"><span><?=$infsera?>



 <img src="img/money/rubin.png" width="12"><span><?=$infrub?>



</div>
</div>
</td>

</tr>
</tbody>
</table>


<div class="progress-bar exp"><div style="width: <?=$hp?>%;" class="progress _green"></div></div></div></div></div>


<div class="head"></div>

<div class="b-container"
id="bodyContainer">
<div>
</div>















</div></div><?


}


if(date("H:i")>'19:59' and date("H:i")<'20:02'){?><div class="mini-line"></div><div class="block_zero center"><a href="protect.php"><div class="head"><span style="color: green;">Сражение в Осквернении Надежд</span></div></a></div><? }



if(date("H:i")>'20:59' and date("H:i")<'21:02'){?><div class="mini-line"></div><div class="block_zero center"><a href="anow.php"><div class="head"><span style="color: green;">Защита Северных Земель</span></div></a></div><? }



if(date("H:i")>'16:59' and date("H:i")<'17:02' and $user['clan']>0){?><div class="mini-line"></div><div class="block_zero center"><a href="osada_bat.php"><div class="head"><span style="color: green;">Ваш Клан сражается в осаде</span></div></a></div><? }


if(date("H:i")>'19:29' and date("H:i")<'19:32'){?><div class="mini-line"></div><div class="block_zero center"><a href="sob_start.php"><div class="head"><span style="color: green;">Началась битва в Мистическом Рубеже</span></div></a></div><? }


if (isset($_SESSION['message'])){?><div style="clear:both;"></div><div class="b-notice trsmgr"><div class="notify-inner"><?=$_SESSION['message']?></div></div><?   $_SESSION['message']=NULL; }


if (isset($_SESSION['err'])){
echo "<div class='notify-inner'>$_SESSION[err]</div>";
$_SESSION['err']=NULL;
}






// Почта 
if($user['new_mess']>0){

echo '

<div class="b-notice no-p"><div class="b-panel-new dblue-panel bordered mt2"><table cellpadding="0" cellspacing="0" width="100%"border="0"><tbody>
<tr><td valign="bottom"><a class="no-a" href="mail.php"><div class="panel-inner-2"><img src="../img/new/mail.gif" alt="t" class="link-icon" height="18" width="18"><span class="font12 c-sil td-u"> Новая Почта + '.$user['new_mess'].'</span></div></a></td></tr></tbody></table></div></div> 








';
}


	// Показываем новые оповещения
if($user['journal']>0){

echo '
<div class="b-notice no-p"><div class="b-panel-new dblue-panel bordered mt2"><table cellpadding="0" cellspacing="0" width="100%"border="0"><tbody>
<tr><td valign="bottom"><a class="no-a" href="journal.php"><div class="panel-inner-2"><img src="../img/new/mes.png" alt="t" class="link-icon" height="12" width="12"><span class="font12 c-sil td-u"> Новых Оповещений '.$user['journal'].'</span></div></a></td></tr></tbody></table></div></div>



';
		}
}
			



if($user['anekdot']==1){ ?><center><span class="info"><a href="/news.php">Новая Весть!</span></a></center><? }







		

?>