$avail_memory = $mem[3] . ' MB'; } $disabled_functions = @ini_get('disable_functions') ? str_replace(",", ", ", @ini_get('disable_functions')) : "<i>{$lang['system_noinf']}</i>"; if (strstr(strtolower(PHP_OS), 'win')) { $tasks = @shell_exec("tasklist"); $tasks = str_replace(" ", " ", $tasks); } else { $tasks = @shell_exec("top -b -n 1"); $tasks = str_replace(" ", " ", $tasks); } if (!$tasks) { $tasks = "<i>{$lang['system_unable']}</i>"; } else { $tasks = "<pre>" . $tasks . "</pre>"; } $load_limit = $load_limit . " ({$lang['system_fromcache']}" . ($using_cache == 1 ? "<span style='color:green;font-weight:bold;'>{$lang['system_true']})</span>" : "<span style='color:red;font-weight:bold;'>{$lang['system_false']})</span>"); $html[] = array($lang['system_mysql'], sql_get_version()); $html[] = array($lang['system_php'], $php_version); $html[] = array($lang['system_safe'], @ini_get('safe_mode') == 1 ? "<span style='color:red;font-weight:bold;'>{$lang['system_on']}</span>" : "<span style='color:green;font-weight:bold;'>{$lang['system_off']}</span>"); $html[] = array($lang['system_disabled'], $disabled_functions); $html[] = array($lang['system_server_soft'], $server_software); $html[] = array($lang['system_server_load'], $load_limit); $html[] = array($lang['system_server_memory'], $total_memory); $html[] = array($lang['system_server_avail'], $avail_memory); $html[] = array($lang['system_sys_proc'], $tasks); $htmlout .= '<table>'; foreach ($html as $key => $value) { $htmlout .= '<tr><td>' . $value[0] . '</td><td>' . $value[1] . '</td></tr>'; } $htmlout .= '</table>'; echo stdhead($lang['system_stdhead']) . $htmlout . stdfoot();
$avail_memory = $mem[3] . ' MB'; } $disabled_functions = @ini_get('disable_functions') ? str_replace(",", ", ", @ini_get('disable_functions')) : "<i>no information</i>"; if (strstr(strtolower(PHP_OS), 'win')) { $tasks = @shell_exec("tasklist"); $tasks = str_replace(" ", " ", $tasks); } else { $tasks = @shell_exec("top -b -n 1"); $tasks = str_replace(" ", " ", $tasks); } if (!$tasks) { $tasks = "<i>Unable to obtain process information</i>"; } else { $tasks = "<pre>" . $tasks . "</pre>"; } $load_limit = $load_limit . " (From Cache: " . ($using_cache == 1 ? "<span style='color:green;font-weight:bold;'>True)</span>" : "<span style='color:red;font-weight:bold;'>False)</span>"); $html[] = array('MySQL Version', sql_get_version()); $html[] = array("PHP Version", $php_version); $html[] = array("Safe Mode", @ini_get('safe_mode') == 1 ? "<span style='color:red;font-weight:bold;'>ON</span>" : "<span style='color:green;font-weight:bold;'>OFF</span>"); $html[] = array("Disabled PHP Functions", $disabled_functions); $html[] = array("Server Software", $server_software); $html[] = array("Current Server Load", $load_limit); $html[] = array("Total Server Memory", $total_memory); $html[] = array("Available Physical Memory", $avail_memory); $html[] = array("System Processes", $tasks); $htmlout .= '<table>'; foreach ($html as $key => $value) { $htmlout .= '<tr><td>' . $value[0] . '</td><td>' . $value[1] . '</td></tr>'; } $htmlout .= '</table>'; print stdhead('System Overview') . $htmlout . stdfoot();