Файл: public_html/modules/battles.php
Строк: 53
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include_once ($root.'/core/base.php');
falseauth();
$header = "Сражения";
include_once ($root.'/core/head.php');
$myLocations = $db->query("SELECT * FROM `locations` WHERE `level` <= '".$u['level']."'");
$mobsInCD = 0;
while($mL = $myLocations->fetch_object())
{
$mobsCD = $db->query("SELECT * FROM `locations_mobs` WHERE `location_id` = '".$mL->id."' AND `cooldown_time` < '".time()."'")->num_rows;
$mobsInCD += $mobsCD;
}
if($mobsInCD > 0) $locDiv = 'menu-link-2';
else $locDiv = 'menu-link';
echo '<div class="index-main">
<div class="block center">
<div class="menu">
<table>
<tr>
<td class="'.$locDiv.'">
<a href="/locations"><img src="/images/icons/13.png" width="45" height="35"><br> Окрестности</a>
</td>
<td class="menu-link">
<a href="/battleground"><img src="/images/icons/5.png" width="40" height="35"><br> Поле боя</a>
</td>
</tr>
</table>
<table>
<tr>
<td class="menu-link">
<a href="/dungeon"><img src="/images/ic-dung.png" width="35" height="35"><br> Подземелья</a>
</td>
<td class="menu-link">
<a href="/towers"><img src="/images/podz.png" width="40" height="35"><br> Башни</a>
</td>
</tr>
<tr>
<td class="menu-link"><a class="menu-link" href="/camp"><img src="/images/monst.png" width="35" height="35"><br> Логово монстров</a></td>
<td class="menu-link"><a class="menu-link" href="/trip"><img src="/images/pohod.png" width="35" height="35"><br> Поход
</a></td>
</tr>
</table>
</div>
</div>
</div>';
include_once ($root.'/core/foot.php');