Файл: KOSMOS/inc/comphistory.php
Строк: 21
<div class="event"><h1>Завершенные Госконкурсы</h1></div>
<div class="content">
<div class="block">
<ul>
<?
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective_comp`"),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)*$k_page;
$q=mysql_query("SELECT * FROM `kolhoz_collective_comp` ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while($post=mysql_fetch_array($q))
{
$num++;
$gos=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective_gos` WHERE `id` = '$post[id_gos]'"));
$plant=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_plant` WHERE `id` = '$gos[id_plant]'"));
echo "<li><a href='?comp=$post[id]'>По госзаказу на <span class='epic'>".hsc($plant['name'])."</span></a>. <span class='minor'><span>".vremja($post['time'])."</span></span></li>";
}
echo "</ul>";
if ($k_page>1)str("?comphistory&",$k_page,$page); // Вывод страниц
echo "</div>";
include_once 'inc/foot.php';
?>