<?
    
    include './system/common.php';
    
 include './system/functions.php';
        
      include './system/user.php';
    
if(!$user) {

  header('location: /');
    
exit;

}

switch($_GET['action']) {
  default:
  
  $title = 'Усиления';    
  
  include './system/h.php';

function makestime($time){
global $ACTIVETIME;
$uge = ($time+(60*60*24*$ACTIVETIME))-time();
$d=floor($uge/86400); 
$h=floor(($uge/3600)-$d*24); 
$m=floor(($uge-$h*3600-$d*86400)/60); 
$s=floor($uge-($m*60+$h*3600+$d*86400));
if ($s>0){
$s="".$s.' сек.'."";
$makestime="".$s."";
}
if ($m>0){
$m="".$m.' мин.'." ";
$makestime="".$m."".$s."";
}
if ($h>0){
$h="".$h. ' час.'." ";
$makestime="".$h."".$m."".$s."";
}
if ($d>0){
$d="".$d.' дн.'." ";
$makestime="".$d."".$h."".$m."".$s."";
}
return $makestime;
}

echo '
<div class=\'title\'>'.$title.'</div>
<div class=\'line\'></div>

<div class=\'list\'>

  <li class=\'no_b\'><a href=\'/lab/alchemy/\'><img src=\'/images/icon/alchemy.png\' alt=\'*\'/> Алхимия <span class=\'green\'> (+)</span></a><hr/>

'.($user['ests']!=NULL?'<img src=\'/images/icon/potion.png\' alt=\'*\'/> <b>Эликсир силы</b><br/>
+100 к силе<br/>
<font color=\'#95B9C7\' >Осталось:</font> '.makestime($user['ests']).'':'<font color=\'#999999\' >Алхимия не активна</font>').'  
</li>


</div>
';


include './system/f.php';

  break;
}

?>