<?
echo "<div class='input_button'><center>Трудятся</div></div>";
echo "<div class='content'>";
echo "<div class='block'>";
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `date_last` > '".(time()-900)."'"),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 `kolhoz_user` WHERE `date_last` > '".(time()-900)."'".(isset($_GET['admin'])?" AND `kolhoz_user`.`status` > '0'":null)." LIMIT $start, $set[p_str]");

echo "<ul>";
while($post=mysql_fetch_array($q))
{
echo '<div class="div_hr2"></div>';
echo "<div class='content'>";
echo "<div style='padding:4px'>";
echo "".on_k($post['id'])."";
echo " <a class='' href='?user=$post[id]'><span>".nc($post['id'])."</span></a>"; if($post['coll']==0)echo "<img alt='o' width='16' height='16' src='images/nocollective.png'>";

if(isset($_GET['pol']))
{
mysql_query("UPDATE `kolhoz_user` SET `pol` = '".($post['pol']==1?"0":"1")."' WHERE `id` = '$post[id]'");
}
echo " [<a href='?mail&new_msg=$post[id]'><img width='16' height='16' src='images/icons/pencil.png' alt='o'></a>]";
echo "</span><img alt='o' width='16' height='16' src='images/say.png'>:<span class='small minor'>$post[status_text]</span></li>";
//echo "(/)";
echo "</div></div></div></div>";
}
echo "</ul>";
echo '<div class="div_hr2"></div>';
echo "<div class='content'>";
echo "<div style='padding:4px'>";
if ($k_page>1)str("?online".(isset($_GET['admin'])?"&admin":null)."&",$k_page,$page); // Вывод страниц
echo "</div></div></div></div>";
include_once 'inc/foot.php';
?>


