View file shcms/jurnal_aut.php

File size: 1.62Kb
<?php
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Журнал авторизаций
=============================================
Official website: http://shcms.ru
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/system_core.php';
$shcmsengine['title'] = Lang::get('Журнал авторизаций');
include_once'../template/head.php';

  $allfield = mysql_result(mysql_query("SELECT COUNT(*) FROM `logs_aut` WHERE `user_id` = '$user_id' "),0);
  $newlist = new Navigation($allfield, 10, true);   
	
	
  $log = mysql_query("SELECT * FROM `logs_aut` WHERE `user_id` = '$user_id'  ORDER BY `time` DESC ". $newlist->limit()."");

    if(mysql_num_rows($log) == 0)
    {
    echo '<div class="posts">'.Lang::get('Журнал авторизаций пуст').'</div>';
	}
	else
	{
        while($logs = mysql_fetch_array($log))
        {
          echo '<div class="posts"><img src="../template/icon/stock.png">&nbsp;'.Lang::get('Последняя авторизация:').'  <span class="maintime mainrazd">'.$timedate->times($logs['time']) .'</span><br/>';
          echo Lang::get('Метод:').$logs['method'].'<br/>';
          //echo Lang::get('Порт:').$logs['port'].'<br/>';
          echo Lang::get('ip адрес:').long2ip($logs['ip']).'<br/>';   
          echo '</div>';
        }
          echo '<div class="pages">';
          echo $newlist->pagination();
          echo '</div>';
    }
	
    include_once'../template/foot.php';
?>