<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$set['title']='Кто на форуме?';
include_once '../sys/inc/thead.php';
title();
aut();
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > '".(time()-600)."' AND `url` like '/forum2/%'"), 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 `user` WHERE `date_last` > '".(time()-600)."' AND `url` like '/forum2/%' ORDER BY `date_last` DESC LIMIT $start, $set[p_str]");
echo "<table class='post'>";
if ($k_post==0)
{
echo "<tr><td class='p_t'>Нет никого</td></tr>";
}
while ($forum = mysql_fetch_array($q))
{
echo "<tr>";
if ($set['set_show_icon']==2){
echo "<td class='icon48' rowspan='2'>";
avatar($forum['id']);
echo "</td>";
}
elseif ($set['set_show_icon']==1)
{
echo "<td class='icon14'>".status($forum['id'])."</td>";
}
echo "<td class='p_t'><a href='/info.php?id=$forum[id]'>$forum[nick]</a> ".medal($forum['id'])."  ".online($forum['id'])."</td></tr>";
}
echo "</table>";
if ($k_page>1)str("?",$k_page,$page);
include_once '../sys/inc/tfoot.php';
?>