<?php

echo '</div>';

if(isset($u)){
	if($u['training_step'] == 0 OR $u['training_step'] > 9){
	$avatar='/images/skins/'.$u['skin'].'_big.png';
	//echo '<div class="foot_line"></div>';
	if($u['battle'] != 'no'){
		echo '<div class="b_foot"><table width="100%"><tr>';
		echo '<td valign="top" width="20%"><center><div class="foot_btn_off"><img src="/images/icons/menu.png"><br/>Меню</div></center></td>';
		echo '<td valign="top" width="20%"><center><div class="foot_btn_off"><img src="/images/icons/location.png"><br/>Локация</div></center></td>';
		echo '<td valign="top" width="20%"><center><div class="foot_btn_off"><img src="'.$avatar.'" width="32px"><br/>Персонаж</div></center></td>';
		echo '<td valign="top" width="20%"><center><div class="foot_btn_off"><img src="/images/icons/bag.png"><br/>Инвентарь</div></center></td>';
		echo '<td valign="top" width="20%"><center><a href="?"><div class="foot_btn"><img src="/images/icons/refresh.png"><br/>Обновить</center></td>';
		echo '</tr></table></div>';
		//echo '<a class="foot_link" href="/duel/battle/escape/"><img src="/images/icons/arrow_back.png"> Сбежать</a>';
	}else{
		if($u['character_points'] > 0 OR $u['skill_points'] > 0){
			$hrefcolor = '<font color = "lime">';
			$tagend = '</font>';
		}
		echo '<div class="b_foot"><div style="position: relative;">';
		//Указатель
		if($u['training_step'] > 9){
			if($u['training_step'] == 10 AND $_SERVER['PHP_SELF'] == '/location.php'){
				echo '<div style="position: absolute; bottom: 0%; right: 20%; z-index: 9999;"><img src="/images/cursor.gif"></div>';
			}
			if($u['training_step'] == 11 AND $_SERVER['PHP_SELF'] == '/location.php'){
				echo '<div style="position: absolute; bottom: 0%; right: 40%; z-index: 9999;"><img src="/images/cursor.gif"></div>';
			}
			if($u['training_step'] == 15 AND $_SERVER['PHP_SELF'] == '/location.php'){
				echo '<div style="position: absolute; bottom: 0%; right: 78%; z-index: 9999;"><img src="/images/cursor.gif"></div>';
			}
		}
		echo '<table width="100%">
			<tr>';
				if($u['save'] == 1) echo '<td valign="top" width="20%">
				<center><a href="/"><div class="foot_btn"><img src="/images/icons/menu.png"><br/>Меню</div></a></center></td>';
				elseif($u['save'] == 0) echo '<td valign="top" width="20%">
				<center><a href="/save/"><div class="foot_btn"><img src="/images/icons/yes.png" width="32px"><br/>Сохранить</div></a></center></td>';
				echo '<td valign="top" width="20%">
				<center><a href="/location/"><div class="foot_btn"><img src="/images/icons/location.png"><br/>Локация</div></a></center></td>';
				echo '<td valign="top" width="20%">
				<center><a href="/user/'.$u['id'].'/"><div class="foot_btn"><img src="'.$avatar.'" width="32px"><br/>'.$hrefcolor.''.$u['login'].''.$tagend.'</div></a></center></td>';
				echo '<td valign="top" width="20%">
				<center><a href="/inventory/"><div class="foot_btn"><img src="/images/icons/bag.png"><br/>Инвентарь</div></a></center></td>';
				echo '<td valign="top" width="20%">';
				echo '<center><a href="?"><div class="foot_btn"><img src="/images/icons/refresh.png"><br/>Обновить</center></td>';
		echo '</tr></table></div></div>';
	}
	}
}
/*echo '<div class="foot center">';
$on = $base->query("SELECT * FROM `users` WHERE `date_online` > '".(time()-600)."'")->num_rows;
echo '<a class="ft" href="/wapkassa/"><font color="gold">Акция <img src="/images/icons/gold.png" width="16px">+50% в подарок!</font></a><br/>';
echo '<a class="ft" href="/rules/">Правила</a> | <a class="ft" href="/help/">Помощь</a> |<a class="ft" href="/online">Онлайн: <font color="#E0E0E0"><b>'.$on.'</b></font></a><br/>';
echo '<div style="margin-top: 3px;">&copy; FOX Games 2019</div>';
echo '</div>';*/
echo '</div>';

//Метрика
echo '<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
   (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
   m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
   (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
   ym(70985905, "init", {
        clickmap:true,
        trackLinks:true,
        accurateTrackBounce:true,
        webvisor:true
   });
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/70985905" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->';

//Чето от ВК
echo '<script type="text/javascript">!function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://vk.com/js/api/openapi.js?168",t.onload=function(){VK.Retargeting.Init("VK-RTRG-833647-1ELzV"),VK.Retargeting.Hit()},document.head.appendChild(t)}();</script><noscript><img src="https://vk.com/rtrg?p=VK-RTRG-833647-1ELzV" style="position:fixed; left:-999px;" alt=""/></noscript>';

echo '</body></html>';


//if($u['admin'] = 3) echo 'Время генерации: ' . ( microtime(true) - $start ) . ' сек.';

?>