<?php
echo '<div class="event"><h1>Справочник деревьев</h1></div>';
echo "<div class='content'>";
echo "<div class='block'>";
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `$db_base`.`kolhoz_tree`"),0);
if ($k_post==0)
{
echo "Список пуст...";
}
$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 `$db_base`.`kolhoz_tree` ORDER BY `level` ASC LIMIT $start, $set[p_str]");

echo "<ul>";
while($post=mysql_fetch_array($q))
{
echo "<li style='padding-bottom:8px'>";
echo "<img width='48' height='48' src='images/trees/$post[id].png' alt='o' class='portrait'>";
echo "<div class='small'>";
echo "<span>".hsc($post['name'])."</span><span class='minor'>, ".($ku['level']>=$post['level']?"цена:  </span><span><img width='16' height='16' src='images/icons/money.png' alt='o'> <span class='title'>$post[cena]</span></span>":"доступно с $post[level] уровня</span>")."</div><div class='minor small'><span>".hsc($post['work'])."</span>, доход: <span><img width='16' height='16' src='images/icons/money.png' alt='o'> <span
class='title'>$post[money]</span></span>, опыт за одно удобрение: <img width='16' height='16' src='images/icons/experience.png' alt='o'>
<span>$post[rating]</span></div></li>";
}
if ($k_page>1)str("?help=trees&",$k_page,$page); // Вывод страниц
echo "</ul>";
echo "</div>";
include_once 'inc/foot.php';
?>