Файл: user/my_aut.php
Строк: 36
<?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';
only_reg();
$set['title'] = 'История авторизаций';
require_once '../sys/inc/thead.php';
title();
aut();
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `user_log` WHERE `id_user` = '$user[id]'"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
if ($k_post == 0) {
echo "<div class = 'razd'>";
echo "<img src = '/style/img/error.png' /> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT * FROM `user_log` WHERE `id_user` = '" . $user['id'] . "' ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q)) {
$ank = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$user[id]' LIMIT 1"));
echo "<div class = 'razd'>";
echo "<div style = 'float:right;'>" . vremja($post['time']) . "</div>";
echo img('status_online.png');
if ($post['method'] == 1) {
echo " Ввод логина и пароля";
} elseif ($post['method'] == 2) {
echo " Авторизация по кукам";
} else {
echo " Автозакладка";
}
echo "<br />";
echo img('ip.png')." IP: " . long2ip($post['ip']) . " (" . text::toOutput($post['ua']) . ")";
echo "</div>";
}
if ($k_page > 1) {
str('?', $k_page, $page);
}
if (isset($_SESSION['refer']) && $_SESSION['refer'] != NULL && otkuda($_SESSION['refer'])) {
echo "<div class = 'razd'>" . img('left.png') . " <a href = '$_SESSION[refer]'>" . otkuda($_SESSION['refer']) . "</a></div>";
}
echo "<div class = 'razd'>" . img('left.png') . " <a href = '/umenu.php'>Кабинет</a></div>";
require_once '../sys/inc/tfoot.php';