Файл: user/my_aut.php
Строк: 41
<?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';
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'];
echo "<div class = 'blok'>История авторизаций</div>";
if ($k_post == 0) {
echo "<table class = 'blok'><tr><td class = 'null'>";
echo "<img src = '/style/icons/bullet_error.png' /> Нет результатов";
echo "</td></tr></table>";
}
$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 "<table class = 'blok'><tr><td class = 'null'>";
echo "<div class = 'right' id = 'hides'>" . vremja($post['time']) . "</div>";
echo "<img src = '/style/icons/user.png' /> ";
if ($post['method'] == 1) {
echo "Ввод логина и пароля";
} elseif ($post['method'] == 2) {
echo "Авторизация по кукам";
} else {
echo "Автозакладка";
}
echo "<br />";
echo "<img src = '/style/icons/ip.png' /> IP: " . long2ip($post['ip']) . " (" . output_text($post['ua']) . ")";
echo "</td></tr></table>";
}
if ($k_page > 1) {
str('?', $k_page, $page);
}
if (isset($_SESSION['refer']) && $_SESSION['refer'] != NULL && otkuda($_SESSION['refer'])) {
echo "<a href = '$_SESSION[refer]'><div class = 'razd'><img src = '/style/icons/left.png' /> " . otkuda($_SESSION['refer']) . "</div></a>";
}
echo "<a href = '/umenu.php'><div class = 'razd'><img src = '/style/icons/left.png' /> Кабинет</div></a>";
require_once '../sys/inc/tfoot.php';