########################################################## # Create the new graph with the specified size. If smallsize is set use it # to create small graphs that show up on the main utilization page ########################################################## if (isset($_GET['smallsize'])) { $size = explode(",", $smallgraph); $image = new CDiagram($size[0], $size[1], "PNG"); } else { $size = explode(",", $largegraph); $image = new CDiagram($size[0], $size[1], "PNG"); } $image->setDiagramType("Line"); # Balken"); $image->setBackground(255, 255, 255); $image->setTextcolor(0, 0, 0); $image->setLinecolor(0, 0, 0); $image->setGraphcolor(0, 255, 0); $image->setValuecolor(255, 0, 0); $image->paintHeader(htmlspecialchars($_GET['feature']), 4); ################################################################ # Connect to the database # Use persistent connections ################################################################ $db = DB::connect($dsn, true); if (DB::isError($db)) { die($db->getMessage()); } ################################################################ # When drawing utilization it is useful to know what was the usage in comparison # to available licenses. Graphing package will try to auto-scale the Y-axis depending # on the largest available Y value. Unfortunately that is not too useful since we will