array_push($rrdfiles, "{$file}"); $archives[$file] = $name; } } } else { foreach ($_GET['RRA'] as $file => $datasource) { $file = "{$rrd_dir}/{$file}"; array_push($rrdfiles, "{$file}"); $archives[$file] = $datasource; } if (isset($_GET['color'])) { foreach ($_GET['color'] as $file => $color) { $file = "{$rrd_dir}/{$file}"; if (array_key_exists($file, $archives)) { $colors[$file] = $color; } } } } //$rrd = new RRD($rrdfiles,$rrdtool); $rrd = new RRD($nested_aggregrated_graph_traffic[$aggr_id], $rrdtool); $graph_params = array('type' => 'aggr_traf', 'colors' => $colors, 'archives' => $archives, 'title' => $title, 'legend' => $legend, 'width' => $width, 'height' => $height, 'total' => $total, 'start' => $from, 'end' => $to); $graphfile = $rrd->get_graph($graph_params); } elseif ($type == "check") { #print "in check file is $file<br>"; // Now determin if there are any datasources we want to be ignore $graph_params = array('type' => 'check', 'title' => $title, 'legend' => $legend, 'width' => $width, 'height' => $height, 'start' => $from, 'end' => $to, 'exclude_ds' => $exclude_ds, 'ds_colors' => $ds_colors); $graphfile = $rrd->get_graph($graph_params); } $rrd->print_graph();