plugins/admin/SecurityLog.php
changeset 1146 4a90e6e46937
parent 1081 745200a9cc2a
child 1175 1e2c9819ede3
equal deleted inserted replaced
1145:21ef2f8feb59 1146:4a90e6e46937
    30   
    30   
    31   echo '<h3>' . $lang->get('acpsl_heading_main') . '</h3>';
    31   echo '<h3>' . $lang->get('acpsl_heading_main') . '</h3>';
    32   
    32   
    33   // Not calling the real fetcher because we have to paginate the results
    33   // Not calling the real fetcher because we have to paginate the results
    34   $offset = ( isset($_GET['offset']) ) ? intval($_GET['offset']) : 0;
    34   $offset = ( isset($_GET['offset']) ) ? intval($_GET['offset']) : 0;
    35   $q = $db->sql_query('SELECT COUNT(time_id) as num FROM '.table_prefix.'logs WHERE log_type=\'security\' ORDER BY time_id DESC, action ASC;');
    35   $q = $db->sql_query('SELECT COUNT(time_id) as num FROM '.table_prefix.'logs WHERE log_type=\'security\' GROUP BY log_id, time_id, log_type, action ORDER BY time_id DESC, action ASC;');
    36   if ( !$q )
    36   if ( !$q )
    37     $db->_die();
    37     $db->_die();
    38   $row = $db->fetchrow();
    38   $row = $db->fetchrow();
    39   $db->free_result();
    39   $db->free_result();
    40   $count = intval($row['num']);
    40   $count = intval($row['num']);