<?php
if(isset($_GET['ch'])){
echo "Сейчас в <b>Чате</b>:<br/>";
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `date_last` > '".(time()-100)."' AND `url` like '?chat=$chat[id]%'"), 0);
$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()-100)."' AND `url` like '?chat=$chat[id]%' ORDER BY `date_last` DESC LIMIT $start, $set[p_str]");
if ($k_post==0){echo "Нет никого";}
while ($post = mysql_fetch_array($q))
{echo "<a class='' href='?user=$post[id]'><span>".nc($post['id'])."</span></a></span>, ";}
}






?>