<?php

$title = 'Гости';

require_once ('system/function.php');

require_once ('system/header.php');

if(!$user['id']) {
header('Location: /');
exit();
}

echo '<div class="title"><center><b> Гости</b></center></div>';

$max ='10';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `time` > '".(time()-300)."'"),0);
$k_page = k_page($k_post,$max);
$page = page($k_page);
$start = $max*$page-$max;
$k_post = $start+1;

$users = mysql_query("SELECT * FROM `guests` where `time` > '".(time()-300)."' LIMIT $start, $max");

while($a = mysql_fetch_assoc($users))
{

echo '<div class="podmenu"> <b>'.$k_post++.'.</b></a> IP: '.$a['ip'].' </a></br>Browser: '.$a['ua'].' </a></br>Последнее посещение: '.vremja($a['time']).'</a></div>';

}


require_once ('system/footer.php');
?>