# Make sure cdiagram library is included ##########################################################3 require_once "./cdiagram/class/diagram.php"; require_once "DB.php"; ########################################################## # 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()); }
# Make sure cdiagram library is included ##########################################################3 require_once "cdiagram/class/diagram.php"; require_once "DB.php"; ########################################################## # 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']) && $_GET['smallsize'] == 1) { $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("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()); } ################################################################