<?
include_once '../core/system.php';
$header = 'Башни';
include_once '../core/head.php';
$k_post = mysql_result(mysql_query("SELECT COUNT(*)  FROM `bashni`"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$q = mysql_query("SELECT * FROM `bashni` ORDER BY `health` DESC LIMIT $start, $set[p_str]");
echo "<div class='player'>";
if($k_post == 0)echo "<span class='grey'>Нет башен</span>";
while($post = mysql_fetch_assoc($q)) {
echo "<img src='/images/icon/sumstat.png'> <a href='bashnya.php?id=$post[id]'>$post[name]</a>, $post[health]</a><br>";
}
echo "</div>";
echo "<div class='dot-line'></div>";
if ($k_page>1)str('index.php?',$k_page,$page); // Вывод страниц
echo "<div class='mini-line'></div>";
echo "<div class='player menuList'>";
echo "<li><a href='new.php'><img src='/images/icon/arrow.png'>Создать Башню</a></li>";
echo "</div>";
include_once '../core/foot.php';
?>