=')) message($lang_admin_index['Running latest version message']); else message(sprintf($lang_admin_index['New version available message'], 'FluxBB.org')); } // Show phpinfo() output else if ($action == 'phpinfo' && $pun_user['g_id'] == PUN_ADMIN) { // Is phpinfo() a disabled function? if (strpos(strtolower((string) ini_get('disable_functions')), 'phpinfo') !== false) message($lang_admin_index['PHPinfo disabled message']); phpinfo(); exit; } // Get the server load averages (if possible) if (@file_exists('/proc/loadavg') && is_readable('/proc/loadavg')) { // We use @ just in case $fh = @fopen('/proc/loadavg', 'r'); $load_averages = @fread($fh, 64); @fclose($fh); if (($fh = @fopen('/proc/loadavg', 'r'))) { $load_averages = fread($fh, 64); fclose($fh); } else $load_averages = ''; $load_averages = @explode(' ', $load_averages); $server_load = isset($load_averages[2]) ? $load_averages[0].' '.$load_averages[1].' '.$load_averages[2] : $lang_admin_index['Not available']; } else if (!in_array(PHP_OS, array('WINNT', 'WIN32')) && preg_match('%averages?: ([0-9\.]+),?\s+([0-9\.]+),?\s+([0-9\.]+)%i', @exec('uptime'), $load_averages)) $server_load = $load_averages[1].' '.$load_averages[2].' '.$load_averages[3]; else $server_load = $lang_admin_index['Not available']; // Get number of current visitors $result = $db->query('SELECT COUNT(user_id) FROM '.$db->prefix.'online WHERE idle=0') or error('Unable to fetch online count', __FILE__, __LINE__, $db->error()); $num_online = $db->result($result); // Collect some additional info about MySQL if ($db_type == 'mysql' || $db_type == 'mysqli' || $db_type == 'mysql_innodb' || $db_type == 'mysqli_innodb') { // Calculate total db size/row count $result = $db->query('SHOW TABLE STATUS LIKE \''.$db->prefix.'%\'') or error('Unable to fetch table status', __FILE__, __LINE__, $db->error()); $total_records = $total_size = 0; while ($status = $db->fetch_assoc($result)) { $total_records += $status['Rows']; $total_size += $status['Data_length'] + $status['Index_length']; } $total_size = file_size($total_size); } // Check for the existence of various PHP opcode caches/optimizers if (function_exists('mmcache')) $php_accelerator = ''.$lang_admin_index['Turck MMCache'].''; else if (isset($_PHPA)) $php_accelerator = ''.$lang_admin_index['ionCube PHP Accelerator'].''; else if (ini_get('apc.enabled')) $php_accelerator =''.$lang_admin_index['Alternative PHP Cache (APC)'].''; else if (ini_get('zend_optimizer.optimization_level')) $php_accelerator = ''.$lang_admin_index['Zend Optimizer'].''; else if (ini_get('eaccelerator.enable')) $php_accelerator = ''.$lang_admin_index['eAccelerator'].''; else if (ini_get('xcache.cacher')) $php_accelerator = ''.$lang_admin_index['XCache'].''; else $php_accelerator = $lang_admin_index['NA']; $page_title = array(pun_htmlspecialchars($pun_config['o_board_title']), $lang_admin_common['Admin'], $lang_admin_common['Index']); define('PUN_ACTIVE_PAGE', 'admin'); require PUN_ROOT.'header.php'; generate_admin_menu('index'); ?>