* * Last Modified: 22nd February 2003 * */ error_reporting(0); if (!(include("./modules/header.lib.php"))) { die("

There was an error loading the header module

"); } // Get the usage statistics $used = dirsize($params["root"]); $total = $params["space"]; $free = $total - $used; // A small fix so that the chart is shown as full if the user has used more space than their limit if ($free < 0) { $free = 0; } // Convert to human readable format $space["used"] = size($used); $space["total"] = size($total); $space["free"] = size($free); $used_rgb = $used_colour[0] . "," . $used_colour[1] . "," . $used_colour[2]; // Build the CSS RGB colours for "used" space $free_rgb = $free_colour[0] . "," . $free_colour[1] . "," . $free_colour[2]; // Build the CSS RGB colours for "free" space // Produce the image if (gdinstalled() == TRUE) { // GD is installed $graph = "\""
" . $space["text_free"] . "

" . $space["text_used"]; } else { // GD is missing $graph = "\""
" . $space["no_gd"]; } // Display the graph $data = template($space, $script_dir . "/settings/templates/space.tpl"); $page = array("javascript" => "", "content" => $data, "title" => $space["title"], "this" => $PHP_SELF, "copyright" => $copyright, "areas" => area_buttons(), "img" => $graph); // Finish up by outputting the completed page template($page, $script_dir . "/settings/templates/global.tpl"); ?>