Файл: online/guest.php
Строк: 38
<?php
require_once '../sys/inc/start.php';
require_once '../sys/inc/compress.php';
require_once '../sys/inc/sess.php';
require_once '../sys/inc/settings.php';
require_once '../sys/inc/db_connect.php';
require_once '../sys/inc/ipua.php';
require_once '../sys/inc/fnc.php';
require_once '../sys/inc/user.php';
$set['title'] = 'Гости на сайте';
require_once '../sys/inc/thead.php';
aut();
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > '" . (time() - 600) . "' AND `pereh` > '0'"), 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 * FROM `guests` WHERE `date_last` > '" . (time() - 600) . "' AND `pereh` > '0' ORDER BY `date_aut` DESC LIMIT $start, $set[p_str]");
echo "<div class = 'menu_razd'>Гости на сайте</div>";
if ($k_post == 0) {
echo "<table class = 'foot'><tr><td class = 'null'>";
echo "<img src = '/style/icons/bullet_error.png' /> Нет результатов";
echo "</td></tr></table>";
}
while ($guest = mysql_fetch_assoc($q)) {
echo "<table class = 'foot'><tr><td class = 'null'>";
echo "<img src = '/style/icons/walk.png' /> Гость<br/>";
echo "Посл. посещение: " . vremja($guest['date_last']) . "<br />";
echo "Переходов: $guest[pereh]<br />";
if ($guest['ua'] != NULL) {
echo "UA: $guest[ua]<br />";
}
if (isset($user) && ($user['level'] > 0)) {
if (user_access('guest_show_ip') && $guest['ip'] != 0) {
echo "IP: " . long2ip($guest['ip']) . "<br />";
}
if (user_access('guest_show_ip') && opsos($guest['ip'])) {
echo "Пров: " . opsos($guest['ip']) . "<br />";
}
if (otkuda($guest['url'])) {
echo "URL: <a href = '$guest[url]'>" . otkuda($guest['url']) . "</a><br />";
}
}
echo "</td></tr></table>";
}
if ($k_page > 1) {
str("?", $k_page, $page);
}
echo "<div class = 'foot'>";
echo "<img src = '/style/icons/left.png' /> <a href = '/online/info.php'>Другая статистика</a>";
echo "</div>";
require_once '../sys/inc/tfoot.php';