Файл: online.php
Строк: 136
<?
include_once 'sys/includes/start.php';
include_once 'sys/includes/compress.php';
include_once 'sys/includes/sess.php';
include_once 'sys/includes/home.php';
include_once 'sys/includes/settings.php';
include_once 'sys/includes/db_connect.php';
include_once 'sys/includes/ipua.php';
include_once 'sys/includes/fnc.php';
include_once 'sys/includes/user.php';
$set['title']='Сейчас на сайте';
include_once 'sys/includes/header.php';
title();
auter();
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > '".(time()-600)."'"), 0);
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='forum_tema'>";
echo "<img src='/s-klub/img/razmer.png'> ";
echo "<b>Сейчас на сайте ".$k_post." чел.</b>";
echo "</td>";
echo "</tr></table>";
$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 `id` FROM `user` WHERE `date_last` > '".(time()-600)."' ORDER BY `date_last` DESC LIMIT $start, $set[p_str]");
if ($k_post==0)
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='err'>";
echo "Сейчас на сайте никого нет!";
echo "</td>";
echo "</tr></table>";
}
while ($ank=mysql_fetch_assoc($q))
{
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
$ank=get_user($ank['id']);
echo "<td class='icon14' ><center>";
avatar_mini($ank['id']);
echo "</center></td>";
echo "<td class='p_t'>";
echo "".status($ank['id'])." ";
echo "<a href='/info.php?id=$ank[id]'><b>";
echo GradientText("$ank[nick]", "$ank[ncolor]", "$ank[ncolor2]");
echo "</b></a>";
echo " ".online($ank['id'])." ";
if ($ank['group_access']>1)
{
echo "(<img src='/s-klub/img/adm.png'> ";
echo "<b>".$ank['group_name']."</b>)";
}
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td class='p_m' colspan='2'>";
echo "<img src='/s-klub/ank/time_go.png'> ";
echo "<b>Регистрация:</b> ".vremja($ank['date_reg'])."<br />";
echo "<img src='/s-klub/ank/time_go.png'> ";
echo "<b>Посл. посещение:</b> ".vremja($ank['date_last'])."<br />";
if ($user['level']>$ank['level'])
{
if ($ank['ip']!=NULL)
{
if (user_access('user_show_ip') && $ank['ip']!=0)
{
echo "<img src='/s-klub/ank/sajt.png'> ";
echo "<b>IP:</b> ".long2ip($ank['ip'])."";
if (user_access('adm_ban_ip'))
{
echo " <img src='/s-klub/img/ban.png'> ";
echo "<a href='/panel/ban_ip.php?min=$ank[ip]'><b>Бан</b></a>";
}
echo "<br />";
}
}
if ($ank['ip_cl']!=NULL)
{
if (user_access('user_show_ip') && $ank['ip_cl']!=0)
{
echo "<b>IP (CLIENT):</b> ".long2ip($ank['ip_cl'])."";
if (user_access('adm_ban_ip'))
{
echo " <img src='/s-klub/img/ban.png'> ";
echo "<a href='/panel/ban_ip.php?min=$ank[ip_cl]'><b>Бан</b></a>";
}
echo "<br />";
}
}
if ($ank['ip_xff']!=NULL)
{
if (user_access('user_show_ip') && $ank['ip_xff']!=0)
{
echo "<b>IP (XFF):</b> ".long2ip($ank['ip_xff'])."";
if (user_access('adm_ban_ip'))
{
echo " <img src='/s-klub/img/ban.png'> ";
echo "<a href='/panel/ban_ip.php?min=$ank[ip_xff]'><b>Бан</b></a>";
}
echo "<br />";
}
}
if (user_access('user_show_ua') && $ank['ua']!=NULL)
{
echo "<img src='/s-klub/ank/sajt.png'> ";
echo "<b>UA:</b> ".$ank['ua']."<br />";
}
if (user_access('user_show_ip') && opsos($ank['ip']))
{
echo "<img src='/s-klub/ank/sajt.png'> ";
echo "<b>Пров:</b> ".opsos($ank['ip'])."<br />";
}
if (user_access('user_show_ip') && opsos($ank['ip_cl']))
{
echo "<img src='/s-klub/ank/sajt.png'> ";
echo "<b>Пров (CL):</b> ".opsos($ank['ip_cl'])."<br />";
}
if (user_access('user_show_ip') && opsos($ank['ip_xff']))
{
echo "<img src='/s-klub/ank/sajt.png'> ";
echo "<b>Пров (XFF):</b> ".opsos($ank['ip_xff'])."<br />";
}
}
if ($ank['show_url']==1)
{
if (otkuda($ank['url']))
{
echo "<img src='/s-klub/ank/sajt.png'> ";
echo "<b>URL:</b> <a href='".$ank['url']."'>".otkuda($ank['url'])."</a></span><br />";
}
}
echo "</td>";
echo "</tr></table>";
}
if ($k_page>1)
{
str("?",$k_page,$page);
}
include_once 'sys/includes/footer.php';
?>