diff --git a/phpBB/admin/index.php b/phpBB/admin/index.php index 115b1199e4..3de4f0edeb 100644 --- a/phpBB/admin/index.php +++ b/phpBB/admin/index.php @@ -24,7 +24,7 @@ define('IN_PHPBB', 1); // // Define some vars // -$pane = ( isset($HTTP_GET_VARS['pane']) ) ? $HTTP_GET_VARS['pane'] : ''; +$pane = ( isset($_GET['pane']) ) ? $_GET['pane'] : ''; $update = ( $pane == 'right' ) ? true : false; // @@ -42,10 +42,8 @@ if ( !$auth->get_acl_admin() ) message_die(MESSAGE, 'No_admin', '', true); } -// // Generate relevant output -// -if ( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'top' ) +if ( isset($_GET['pane']) && $_GET['pane'] == 'top' ) { page_header('', '', false); @@ -63,16 +61,12 @@ if ( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'top' ) page_footer(false); } -else if ( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'left' ) +else if ( isset($_GET['pane']) && $_GET['pane'] == 'left' ) { - // // Cheat and use the meta tag to change some stylesheet info - // page_header('', '', false); - // // Grab module information using Bart's "neat-o-module" system (tm) - // $dir = @opendir('.'); $setmodules = 1; @@ -142,59 +136,55 @@ else if ( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'left' ) sql_query($sql); - if ( isset($HTTP_POST_VARS['delete']) ) + if ( isset($_POST['delete']) ) { $sql = "UPDATE " . CONFIG_TABLE . " - SET config_value = config_value - " . sizeof($HTTP_POST_VARS['mark']) . " + SET config_value = config_value - " . sizeof($_POST['mark']) . " WHERE config_name = 'num_users'"; $db->sql_query($sql); } - $log_action = ( isset($HTTP_POST_VARS['activate']) ) ? 'log_index_activate' : 'log_index_delete'; - add_admin_log($log_action, sizeof($HTTP_POST_VARS['mark'])); + $log_action = ( isset($_POST['activate']) ) ? 'log_index_activate' : 'log_index_delete'; + add_admin_log($log_action, sizeof($_POST['mark'])); } } } - else if ( isset($HTTP_POST_VARS['remind']) ) + else if ( isset($_POST['remind']) ) { } - else if ( isset($HTTP_POST_VARS['resetonline']) ) + else if ( isset($_POST['resetonline']) ) { } - // // Get forum statistics - // $total_posts = get_db_stat('postcount'); $total_topics = get_db_stat('topiccount'); $total_users = $board_config['num_users']; - $start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']); + $start_date = $user->format_date($board_config['board_startdate']); $boarddays = ( time() - $board_config['board_startdate'] ) / 86400; @@ -215,11 +205,9 @@ elseif ( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' ) } @closedir($avatar_dir); - // // This bit of code translates the avatar directory size into human readable format // Borrowed the code from the PHP.net annoted manual, origanally written by: // Jesse (jesse@jess.on.ca) - // if ( $avatar_dir_size >= 1048576 ) { $avatar_dir_size = round($avatar_dir_size / 1048576 * 100) / 100 . ' MB'; @@ -255,12 +243,9 @@ elseif ( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' ) $users_per_day = $total_users; } - // // DB size ... MySQL only - // // This code is heavily influenced by a similar routine // in phpMyAdmin 2.2.0 - // if ( preg_match('/^mysql/', SQL_LAYER) ) { $result = $db->sql_query('SELECT VERSION() AS mysql_version'); @@ -319,7 +304,7 @@ elseif ( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' ) $dbsize = $lang['Not_available']; } - if ( is_integer($dbsize) ) + if ( is_int($dbsize) ) { $dbsize = ( $dbsize >= 1048576 ) ? sprintf('%.2f MB', ( $dbsize / 1048576 )) : ( ( $dbsize >= 1024 ) ? sprintf('%.2f KB', ( $dbsize / 1024 )) : sprintf('%.2f Bytes', $dbsize) ); } @@ -384,7 +369,7 @@ elseif ( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' ) @@ -411,7 +396,7 @@ elseif ( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' ) - + format_date($log_data[$i]['time']); ?> - + format_date($row['user_regdate']); ?>    start($update); $auth->acl($userdata); +$user = new user($userdata); // // End session management // @@ -39,7 +40,7 @@ $auth->acl($userdata); // // Configure style, language, etc. // -$session->configure($userdata); +//$session->configure($userdata); // ----------------------------- // Functions