View file shcms/jurnal_aut.php

File size: 1.46Kb
<?php
/*
=============================================
Движок: SHCMS Engine
=============================================
Название файла: Журнал авторизаций
=============================================
Official website: http://shcms.ru
=============================================
*/
define('SHCMS', true);
include_once'../system/inc/basic_settings.php';
$shcmsengine['title'] = 'Журнал авторизаций';
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">Журнал авторизаций пуст</div>';
	}
	else
	{
        while($logs = mysql_fetch_array($log))
        {
          echo '<div class="posts">Последния авторизация:  '.$timedate->times($logs['time']) . '<br/>';
          echo 'Метод: '.$logs['method'].'<br/>';
          echo 'Порт: '.$logs['port'].'<br/>';
          echo 'ip адрес: '.long2ip($logs['ip']).'<br/>';   
          echo '</div>';
        }
          echo '<div class="pages">';
          echo $newlist->pagination();
          echo '</div>';
    }
	
    include_once'../template/foot.php';
?>