diff options
Diffstat (limited to 'pages/server_analysis.php')
-rw-r--r-- | pages/server_analysis.php | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/pages/server_analysis.php b/pages/server_analysis.php index ccffc1632..db3aed5f6 100644 --- a/pages/server_analysis.php +++ b/pages/server_analysis.php @@ -8,48 +8,49 @@ * ********************************************************************/ - include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; +include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; - global $CONFIG; +global $CONFIG; - admin_gatekeeper(); +admin_gatekeeper(); - set_context('admin'); +set_context('admin'); - $title = 'TidyPics Server Analysis'; +$title = 'TidyPics Server Analysis'; - function tp_readable_size($bytes) - { - if (strpos($bytes, 'M')) - return $bytes . 'B'; - - $size = $bytes / 1024; +function tp_readable_size($bytes) { + if (strpos($bytes, 'M')) { + return $bytes . 'B'; + } + + $size = $bytes / 1024; + if ($size < 1024) { + $size = number_format($size, 2); + $size .= ' KB'; + } else { + $size = $size / 1024; if ($size < 1024) { $size = number_format($size, 2); - $size .= ' KB'; + $size .= ' MB'; } else { $size = $size / 1024; - if($size < 1024) { - $size = number_format($size, 2); - $size .= ' MB'; - } else { - $size = $size / 1024; - $size = number_format($size, 2); - $size .= ' GB'; - } + $size = number_format($size, 2); + $size .= ' GB'; } - return $size; } + return $size; +} - $disablefunc = explode(',', ini_get('disable_functions')); - $exec_avail = "Disabled"; - if (is_callable('exec') && !in_array('exec',$disablefunc)) - $exec_avail = "Enabled"; +$disablefunc = explode(',', ini_get('disable_functions')); +$exec_avail = "Disabled"; +if (is_callable('exec') && !in_array('exec',$disablefunc)) { + $exec_avail = "Enabled"; +} - ob_start(); +ob_start(); - echo elgg_view_title($title); +echo elgg_view_title($title); ?> <div class="contentWrapper"> <table width="100%"> @@ -130,9 +131,8 @@ </div> <?php - $content = ob_get_clean(); +$content = ob_get_clean(); - $body = elgg_view_layout('two_column_left_sidebar', '', $content); +$body = elgg_view_layout('two_column_left_sidebar', '', $content); - echo page_draw($title, $body); -?>
\ No newline at end of file +echo page_draw($title, $body);
\ No newline at end of file |