<?
// Dcms-Fiera
// http://dcms-fiera.ru
// ShaMan
include_once 'sys/inc/home.php'; // корневая директория сайта
include_once H.'sys/inc/start.php';
include_once H.'sys/inc/compress.php';
include_once H.'sys/inc/sess.php';
include_once H.'sys/inc/settings.php';
include_once H.'sys/inc/db_connect.php';
include_once H.'sys/inc/ipua.php';
include_once H.'sys/inc/fnc.php';
include_once H.'sys/inc/user.php';
only_reg();
$set['title']='История входов';
include_once H.'sys/inc/thead.php';
title();
aut();
if ((!isset($_SESSION['refer']) || $_SESSION['refer']==NULL) &&
isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']!=NULL &&
!preg_match('#my_aut.php#',$_SERVER['HTTP_REFERER']))
$_SESSION['refer']=str_replace('&','&',preg_replace
('#^http://[^/]*/#','/', $_SERVER['HTTP_REFERER']));
$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 "<table class='post'>\n";
if (empty($k_post))
{
echo "<tr><td class='p_t'>\n";
echo "Нет записаных авторизаций\n";
echo "</td></tr>\n";
}
$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"));
if ($set['set_show_icon']==2){
echo "<td class='icon48' rowspan='2'>\n";
echo "<img src='/style/my_menu/logout_48.png' alt='' />";
echo "</td>\n";
}
elseif ($set['set_show_icon']==1)
{
echo "<td class='icon14'>\n";
echo "<img src='/style/my_menu/logout_16.png' alt='' />";
echo "</td>\n";
}
echo "<td class='p_t'>\n";
if ($post['method']!=1)
echo "Автовход<br />\n";
else
echo "Ввод логина и пароля
(".vremja($post['time']).")\n";
echo "</td></tr>\n";
echo "<tr>\n";
if ($set['set_show_icon']==1)echo " <td class='p_m' colspan='2'>\n"; else echo " <td class='p_m'>\n";
echo "IP: ".long2ip($post['ip'])."<br />";
echo "Браузер: ". output_text($post['ua']);
echo "</td></tr>\n";
}
echo "</table>\n";
if ($k_page>1)str("?",$k_page,$page); // Вывод страниц
echo "<div class='foot'>\n";
echo "»<a href='/info.php'>Моя анкета</a><br />\n";
echo "»<a href='/umenu.php'>Мое меню</a><br />\n";
echo "</div>\n";
include_once H.'sys/inc/tfoot.php';
?>