get_acl_admin('general') ) { return; } $filename = basename(__FILE__); $module['General']['Admin_logs'] = $filename . "$SID&mode=admin"; return; } define('IN_PHPBB', 1); // // Include files // $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); // // Do we have styles admin permissions? // if ( !$acl->get_acl_admin('general') ) { message_die(MESSAGE, $lang['No_admin']); } $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0; if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) ) { $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; } else { $mode = 'admin'; } if ( ( isset($HTTP_POST_VARS['delmarked']) || isset($HTTP_POST_VARS['delall']) ) && $acl->get_acl_admin('clearlogs')) { $where_sql = ''; if ( isset($HTTP_POST_VARS['delmarked']) && isset($HTTP_POST_VARS['mark']) ) { foreach ( $HTTP_POST_VARS['mark'] as $marked ) { $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . intval($marked); } $where_sql = "WHERE log_id IN ($where_sql)"; } $sql = "DELETE FROM " . LOG_ADMIN_TABLE . " $where_sql"; $db->sql_query($sql); add_admin_log('log_admin_clear'); } // // // if ( isset($HTTP_POST_VARS['sort']) ) { if ( !empty($HTTP_POST_VARS['sort_days']) ) { $sort_days = ( !empty($HTTP_POST_VARS['sort_days']) ) ? intval($HTTP_POST_VARS['sort_days']) : intval($HTTP_GET_VARS['sort_days']); $where_sql = time() - ( $sort_days * 86400 ); } else { $where_sql = 0; } $start = 0; $sort_key = ( isset($HTTP_POST_VARS['sort_key']) ) ? $HTTP_POST_VARS['sort_key'] : $HTTP_GET_VARS['sort_key']; $sort_dir = ( isset($HTTP_POST_VARS['sort_dir']) ) ? $HTTP_POST_VARS['sort_dir'] : $HTTP_GET_VARS['sort_dir']; } else { $where_sql = 0; $sort_days = 0; $sort_key = 't'; $sort_dir = 'd'; } // // Sorting // $previous_days = array(0 => $lang['All_Entries'], 1 => $lang['1_Day'], 7 => $lang['7_Days'], 14 => $lang['2_Weeks'], 30 => $lang['1_Month'], 90 => $lang['3_Months'], 180 => $lang['6_Months'], 364 => $lang['1_Year']); $sort_by_text = array('u' => $lang['Sort_Username'], 't' => $lang['Sort_date'], 'i' => $lang['Sort_ip'], 'o' => $lang['Sort_action']); $sort_by = array('u' => 'l.user_id', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $sort_day_options = ''; foreach ( $previous_days as $day => $text ) { $selected = ( $sort_days == $day ) ? ' selected="selected"' : ''; $sort_day_options .= ''; } $sort_key_options = ''; foreach ( $sort_by_text as $key => $text ) { $selected = ( $sort_key == $key ) ? ' selected="selected"' : ''; $sort_key_options .= ''; } $sort_order_options = ( $sort_dir == 'a' ) ? '' : ''; $sort_sql = $sort_by[$sort_key] . ' ' . ( ( $sort_dir == 'd' ) ? 'DESC' : 'ASC' ); // // Grab data // $sql = "SELECT COUNT(*) AS total_entries FROM " . LOG_ADMIN_TABLE . " WHERE log_time >= $where_sql"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $total_entries = $row['total_entries']; $pagination = generate_pagination("admin_viewlogs.$phpEx$SID&mode=$mode&order=$sort_order", $total_entries, $board_config['topics_per_page'], $start). ' '; page_header($lang['General']); ?>

">get_acl_admin('clearlogs') ) { ?>
:     
   
  get_acl_admin('clearlogs') ) { ?> ::