View file love/online.php

File size: 3.27Kb
<?
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)."'"), 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 `id` FROM `user` WHERE `date_last` > '".(time()-600)."' ORDER BY `date_last` DESC LIMIT $start, $set[p_str]");
$listing = new Smarty_conf();
$posts=array();
while ($ank = mysql_fetch_assoc($q))
{
$ank=get_user($ank['id']);
$title_post="<a href='/info.php?id=$ank[id]'>$ank[nick]</a>".online($ank['id']);

$post_post=$ank['level']?$ank['group_name']."<br />\n":null;
$post_post.='Регистрация: '.vremja($ank['date_reg'])."<br />\n";
$post_post.='Посл. посещение: '.vremja($ank['date_last'])."<br />\n";

if (isset($user) && $user['level']>$ank['level'])
{
if (user_access('user_show_ip'))
{
if ($ank['ip'])$post_post.='IP: '.long2ip($ank['ip']).(user_access('adm_ban_ip')?" [<a href='/adm_panel/ban_ip.php?min=$ank[ip]'>Бан</a>]":null)."<br />\n";
if (opsos($ank['ip']))$post_post.='Пров: '.opsos($ank['ip'])."<br />\n";
if ($ank['ip_cl'])$post_post.='IP (CL): '.long2ip($ank['ip_cl']).(user_access('adm_ban_ip')?" [<a href='/adm_panel/ban_ip.php?min=$ank[ip_cl]'>Бан</a>]":null)."<br />\n";
if (opsos($ank['ip_cl']))$post_post.='Пров (CL): '.opsos($ank['ip_cl'])."<br />\n";
if ($ank['ip_xff'])$post_post.='IP (XFF): '.long2ip($ank['ip_xff']).(user_access('adm_ban_ip')?" [<a href='/adm_panel/ban_ip.php?min=$ank[ip_xff]'>Бан</a>]":null)."<br />\n";
if (opsos($ank['ip_xff']))$post_post.='Пров (XFF): '.opsos($ank['ip_xff'])."<br />\n";
}
if (user_access('user_show_ua') && $ank['ua'])$post_post.='UA: '.$ank['ua']."<br />\n";
}





if ($ank['show_url'] && otkuda($ank['url']))$post_post.="URL: <a href='$ank[url]'>".otkuda($ank['url'])."</a><br />\n";



if (user_access('user_collisions') && $user['level']>$ank['level'])
{
$mass[0]=$ank['id'];
$collisions=user_collision($mass);
if (count($collisions)>1)
{
$post_post.='Возможные ники: ';
for ($i=1;$i<count($collisions);$i++)
{
$ank_coll=get_user($collisions[$i]);
$post_post.= "&quot;<a href='/info.php?id=$ank_coll[id]'>$ank_coll[nick]</a>&quot;";
}
$post_post.="<br />\n";
}
}

$posts[]=array('icon'=> array('size'=>'small','src'=> ICONS_USER.'pol_'.$ank['pol'].'.png'),
'title'=> $title_post,
'post' => $post_post,
'link_block' => "/info.php?id=$ank[id]");
}

if (!$posts)$posts[]=array('title' => 'Нет зарегистрированых пользователей на сайте');
$listing->assign('post',$posts);
$listing->display('body.conlentlist.tpl');


if ($k_page>1)str("?",$k_page,$page); // Вывод страниц



echo '<hr color="DeepSkyBlue1" hr noshade size="1"></font>';
echo "&laquo;<a href='/love/index.php'>В знакомства</a><br/>\n";
include_once '../sys/inc/tfoot.php';
?>