<?
echo '<div class="event"><h1>Работы</h1></div>';
echo "<div class='content'>";
echo "<div class='block'>";
$k_post = mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_works`"),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_querll("SELECT * FROM `kolhoz_works` 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='img/works/$post[id].gif' alt='o' class='portrait'>";
echo "<div class='small'>";
echo "<span>".hsc($post['name'])."</span> <span class='minor'><span class='minor'>$post[work]<br> ".($ku['level']>=$post['level']?"<img width='16' height='16' src='img/icons/ruby.png' alt='o'> Затраты: </span><span><img width='16' height='16' src='img/icons/ruby.png' alt='o'><span class='title'>$post[cena]</span></span>":"доступно с $post[level] уровня</span>")."</div><div class='small minor'><img width='16' height='16' src='img/icons/money.png' alt='o'> Доход:</span> <img width='16' height='16' src='img/icons/money.png' alt='o'> <span class='title'>$post[money]</span></div><div class='small minor'> <img width='16' height='16' src='img/icons/time.png' alt='o'> Время работы: <span class='title'>".time_left($post['time'])."</span><br>
<img width='16' height='16' src='img/icons/experience.png' alt='o'> Опыт(аванс): <span class='title'> $post[rating]</span></span></div></li>";
}
echo "</ul>";
if ($k_page>1)str("?help=works&",$k_page,$page); // Вывод страниц
echo "</div>";
include_once 'inc/foot.php';
?>