Файл: pages/rewrite_online.php
Строк: 62
<?php # Created by Up
include_once '../sistem/start.php';
include_once $config['OTS'].'sistem/config.php';
include_once $config['OTS'].'sistem/function.php';
include_once $config['OTS'].'sistem/db.php';
//include_once $config['OTS'].'sistem/users.php';
if(isset($_GET['id']))
{
$id=((int)abs($_GET['id']));
if(mysql_num_rows($sql=mysql_query('SELECT * FROM `site` where `id`=''.$id.'' LIMIT 1;'))>=1)
{
$arr=mysql_fetch_assoc($sql);
$config['TITLE']='Онлайн на '.$arr['name'];
$config['description']=$arr['opisanie'];
include_once $config['OTS'].'sistem/head.php';
// include_once $config['OTS'].'sistem/ip_isset.class.php';
// $class=NEW ISSET_IP;
$time=time()-60*10;
$count=mysql_result(mysql_query('SELECT COUNT(*) FROM `statistic` WHERE `for`=''.$id.'' and `time`>=''.$time.'';'),0);
if($page=page($count,isset($_GET['page'])?$_GET['page']:1))
{
$sql=mysql_query('SELECT * FROM `statistic` WHERE `for`=''.$id.'' and `time`>=''.$time.'' ORDER BY `time` DESC LIMIT '.$page['ot'].','.$_SESSION['kol_sites'].';');
while($arr1=mysql_fetch_assoc($sql))
{
$arr1['brauser']=trim($arr1['brauser']);
print '<span class="link">'.(empty($arr1['brauser'])?'Not User-Agent':$arr1['brauser']).'</span> ('.date('H:i',$arr1['time']).')<br />';
print '<div class="func">IP: '.long2ip($arr1['ip']).'<br />';
// print $arr1['ip']!=$arr1['via']?'IP: '.long2ip($arr1['via']).'<br />':'';
// print $class->operator($arr1['operator']).' / '.$class->country($arr1['country']).'<br />';
print ((isset($_SESSION['id']) and isset($_SESSION['pass']) and $_SESSION['id']==$arr['admin'])?'На странице: <a href="http://'.$arr['url'].'/'.$arr1['referer'].'">http://'.$arr['url'].'/'.$arr1['referer'].'</a><br />':'').'</div>';
}
pages($page['page'],$page['str'],'online.php?page=');
}
else
print 'Такой страници не существует, или на сайте нету онлайн посетителей!<br />';
print '<a href="index.php">Страница сайта</a><br />';
include_once $config['OTS'].'sistem/foot.php';
}
}
#else
{
header('location: '.$config['home'].'/?act=error&error=404');
exit;
}
?>