Пример #1
0
<?php

include 'common.inc';
include 'domains.inc';
include 'contentColors.inc';
include "graph/jpgraph.php";
include "graph/jpgraph_pie.php";
JpGraphError::SetErrLocale('prod');
// Get the various settings
$width = htmlspecialchars($_GET["width"]);
if (!$width) {
    $width = 500;
}
$height = htmlspecialchars($_GET["height"]);
if (!$height) {
    $height = 400;
}
$chartType = htmlspecialchars($_GET["type"]);
if (!strlen($chartType)) {
    $chartType = 'Requests';
}
// walk through the requests and group them by mime type
$breakdown = getDomainBreakdown($id, $testPath, $run, $cached);
if (count($breakdown)) {
    // build up the data set
    $values = array();
    $index = 0;
    ksort($breakdown);
    $labels = array();
    $colors = array();
    $lastTLD = "";