</div>
<div class="footer">
<?
	
list ( $ms , $s ) = explode ( chr ( 32 ) , microtime ( ) );
$onLine = $db->rows("SELECT `id`,`online` FROM `users` 
					WHERE `online`>?",array(($config['time']-3600*12)));

$allnews = $db->fetchAll("SELECT * FROM `auction` ORDER BY `id` DESC",null);

if (is_array($allnews))
{
	foreach ($allnews as $data)
	{
if ($data['last']!=0) {

$tt = $data['last'] - time();
	$h = $tt/3600%60;
	$m = $tt/60%60;
	$s = $tt%60;

		?>
		<div class ='menu'/>
			<center>
<?=htmlspecialchars($data['name']);?></center>
			
				<center><font color="orange"><?=htmlspecialchars($data['text']);?></font></center> При покупки скидка <?=htmlspecialchars($data['discount']);?>%</br> <center> Время проведение акции:
<?=$h;?>ч <?=$m;?>м <?=$s;?>с </center>
			</span>
		</div>
		<?
	}
}
}

if (isset($user))
{


?>



        
        <div class="nav">
            <a class="home" href="/">Главная</a><a class="char" href="/user.php">Персонаж</a><a class="clan" href="/clans/">Клан</a>
        </div>
<div class="menu">

	<center>
		<img src ='http://mdrag.ru/style/images/icons/icon_gem.png'/> <?=$user['gold'];?> |
		<img src ='http://mdrag.ru/style/images/icons/icon_gold.png'/> <?=$user['silver'];?> |
		<img src ='http://mdrag.ru/style/images/icons/icon_dust.png'/> <?=$user['crystal'];?> 
	</div></center>

<div class="menu">
	
				<a  href="/settings/index">Настройки</a> | 
				<a  href="/chat">Чат</a> 
				<?=($user['save'] == 0 ?'| <a class="grey1" href="/save_user"><b>Сохраниться</b></a>':null);?>
				<?=($user['access'] == 3 ? ' | <a href ="/admin/index"/><span class ="win"/> Админка </span></a>':null);?> 
				<br/>
				
			<? 

			?>
			<?=date("H:i:s",time());?> | <?=round ( ( ( $s + $ms ) - $g ) , 5);?>c.</br><a href="/online">Онлайн <?=$onLine;?> </a>
			<br>
			FanGame © 2018, 16+<br>
			<br><br>

</div>

<?

}
else
{




	?>

<div class="ftr small">
	<div class="ftr_l cntr">
		<div class="ftr_r cntr">
			<div class="grey1 mb5">
				<a class="grey1" href="/online">Бета тест</a> 
				| <a class="grey1" href="/about">Об игре</a>
			</div><div class="grey2">
			<?=date("H:i:s");?> |<span class =\'grey2\'/><?=round ( ( ( $s + $ms ) - $g ) , 3);?></span> Онлайн <?=$onLine;?>
			<br>
			FanGame © 2018, 16+<br>
			
			<br><br>
			<div class="f-block">
</div>
</div>
</div>
</div>
</div>
</div>

	<?
}

