<?
echo "<div class='event'><h1>Итоги Госзаказа ".vremja($goss['time'])."</h1></div>";
?>
<div class="content">
<div class="block">
<?
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective_gos_ct` WHERE `id_gos` = '$goss[id]'"),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'];
$num=($page-1)*$set['p_str'];
$q=mysql_query("SELECT * FROM `kolhoz_collective_gos_ct` WHERE `id_gos` = '$goss[id]' ORDER BY `count` DESC LIMIT $start, $set[p_str]");
echo "<ul>";
while($post=mysql_fetch_array($q))
{
$num++;
$ct=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective` WHERE `id` = '$post[id_collective]'"));

echo "<li><span class='minor'><span>$num</span>.</span><span>".hsc($ct['name'])."</span> - <span><img width='16' height='16' src='images/icons/ruby.png' alt='o'> <span class='title'>$post[count]</span></span></li>";
}
echo "</ul>";
if ($k_page>1)str("?gos=$goss[id]&",$k_page,$page); // Вывод страниц
?>
<div class="pt">
<img width="16" height="16" src="images/icons/trophy.png" alt="o"> <a href="?goshistory">Завершенные госзаказы</a>
</div>
</div>
<?
include_once 'inc/foot.php';
?>