<?

include_once "SYSTEM/include/functions.php";

include_once "SYSTEM/include/mysql.php";

include_once "SYSTEM/include/param.php";

include_once "SYSTEM/include/ban.php";

include_once "SYSTEM/include/sess.php";

include_once "SYSTEM/include/ban_2.php";

include_once "SYSTEM/include/theme.php";

$mesto='Кто-где';

$title='Кто-где';

head();

echo "<div class=\"h\">Кто - где?</div><hr />\n";

if ($mail_in_new>0)echo "<div class=\"privat\"><img src=\"SYSTEM/themes/$them/img/mail0.gif\" alt=\"\" /> <a href=\"mail.php?act=in\">Приват</a> [$mail_in_new]</div><hr />\n";



if (isset($user))

$k_p_str=$user['k_page'];

else

$k_p_str=$set['k_p_s'];

$k_page=k_page($onl['on_users'],$k_p_str);

$page=page();

$i=$k_p_str*$page-$k_p_str;



$q = mysql_query("SELECT * FROM `$mysql[pref]users` ORDER BY time DESC LIMIT $i, $k_p_str;");

while ($post_user = mysql_fetch_array($q)){


$q3 = mysql_query("SELECT * FROM `$mysql[pref]online` WHERE `sess` = '$post_user[sess]' LIMIT 1;");

$data_user_online = mysql_fetch_array($q3);


if ($post_user['level']==1)$stat=" <span style=\"color:$color[level]\"></span>";

elseif ($post_user['level']==2)$stat=" <span style=\"color:$color[level]\"></span>";

elseif ($post_user['level']==3)$stat=" <span style=\"color:$color[level]\"></span>";

elseif ($post_user['level']==4)$stat=" <span style=\"color:$color[level]\"></span>";

else $stat='';


if ($post_user['time']>time()-$set['time_sess'] && $post_user['sess']!=''){

$on="<span style=\"color:$color[on]\">on</span>";}

else{$on="<span style=\"color:$color[off]\">off</span>";}


echo "<div class=\"mess\">\n";


if (isset($user) && ($web_browser==0 && $user['show_avatar']==1 || $web_browser==1 && $user['show_avatar2']==1) && $post_user['avatar']!='' && is_file("SYSTEM/images/avat/$post_user[avatar]"))

echo "<img src=\"SYSTEM/images/avat/$post_user[avatar]\" height=\"32\" width=\"32\" alt=\"Аватар\" />\n";

else

echo "<img src=\"SYSTEM/themes/$them/img/user/pol_$post_user[pol].gif\" alt=\"\" />";

echo " <a href=\"info.php?id=$post_user[id]\"><span style=\"color:$color[mess_nick]\"><b>".$post_user['nickname']."</b></span></a>$stat $on";

if ($post_user['time']<$time-$set['time_sess'] || $post_user['sess']=='')

{

echo "<br/>\n<span style=\"color:$color[post_time]\">".vremja($post_user['time']+$timesdvig)."</span>";

}

echo "<br />\n";

if ($post_user['url']!='' && $post_user['mesto']!='')

{

echo "Где: <a href=\"$post_user[url]\">".$post_user['mesto']."</a>";

}

if ($post_user['time']>time()-$set['time_sess'] && $post_user['sess']!=''){echo "<br/>\nПереходов: $data_user_online[pereh]";}

if ($post_user['ip']!=''){echo "<br/>\nIP: ".$post_user['ip'];}


echo "</div>\n";

//echo "<br />\n";

}


if ($onl['on_users']==0)echo "<div class=\"mess\">\nНикого нет</div>\n";



echo "<hr />\n<div class=\"str\">";

str("who.php?",$k_page,$page);

echo "</div>\n";





echo "<hr />\n";

echo "<a href=\"who_all.php?page=$page\">Показать гостей</a><br/>\n";

echo "<a href=\"index.php\">На главную</a><br/>\n";

foot();

?>

