array_push($types, $item['type']); } else { show_error_message(_('Cannot display more than one item with type "Graph sum".')); break; } } } /* * Display */ if ($isDataValid) { navigation_bar_calc(); $graph = new CPieGraphDraw(getRequest('graphtype', GRAPH_TYPE_NORMAL)); $graph->setHeader(getRequest('name', '')); if (!empty($_REQUEST['graph3d'])) { $graph->switchPie3D(); } $graph->showLegend(getRequest('legend', 0)); unset($host); if (isset($_REQUEST['period'])) { $graph->setPeriod($_REQUEST['period']); } if (isset($_REQUEST['from'])) { $graph->setFrom($_REQUEST['from']); } if (isset($_REQUEST['stime'])) { $graph->setSTime($_REQUEST['stime']); } if (isset($_REQUEST['border'])) { $graph->setBorder(0); }