Файл: public_html/modules/locations/index.php
Строк: 21
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
include_once ($root.'/core/base.php');
falseauth();
$header = "Окрестности";
include_once ($root.'/core/head.php');
issetLocationBattles();
$count = $db -> query("SELECT * FROM `locations` WHERE `level` <= '".$u['level']."'") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $db -> query("SELECT * FROM `locations` WHERE `level` <= '".$u['level']."' ORDER BY `level` ASC LIMIT $start, 10");
echo'<div class = "index-bg-okr">';
while($q = $sql->fetch_object())
{
echo '<div class = "ram-one"><a class="location-'.$q->id.'" href="/locations/'.$q->id.'">'.$q->name.' ['.$q->level.' ур.]</a>
</div>';
}
echo"</div>";
if($count >= 10) echo str('/locations/?', $k_page, $page);
if($count == 0) echo '<div class="b">Нет окрестностей!</div>';
include_once ($root.'/core/foot.php');