diff --git a/html/includes/graphs/device/cipsec_flow_bits.inc.php b/html/includes/graphs/device/cipsec_flow_bits.inc.php index 217b705c54..af1fb91bdf 100644 --- a/html/includes/graphs/device/cipsec_flow_bits.inc.php +++ b/html/includes/graphs/device/cipsec_flow_bits.inc.php @@ -7,5 +7,4 @@ $rra_out = "OutOctets"; include("includes/graphs/generic_bits.inc.php"); - ?> diff --git a/html/includes/graphs/device/cipsec_flow_pkts.inc.php b/html/includes/graphs/device/cipsec_flow_pkts.inc.php index 29092050f0..624a9653c8 100644 --- a/html/includes/graphs/device/cipsec_flow_pkts.inc.php +++ b/html/includes/graphs/device/cipsec_flow_pkts.inc.php @@ -14,7 +14,7 @@ $colour_area_in_max = "CC88CC"; $colour_area_out_max = "FFEFAA"; $graph_max = 1; -$unit_text = "Pkts\ \ \ "; +$unit_text = "Pkts "; include("includes/graphs/generic_duplex.inc.php"); diff --git a/html/includes/graphs/device/cipsec_flow_tunnels.inc.php b/html/includes/graphs/device/cipsec_flow_tunnels.inc.php index b06d8fcda4..0b51d5e0d3 100644 --- a/html/includes/graphs/device/cipsec_flow_tunnels.inc.php +++ b/html/includes/graphs/device/cipsec_flow_tunnels.inc.php @@ -1,16 +1,23 @@ diff --git a/html/includes/graphs/graph.inc.php b/html/includes/graphs/graph.inc.php index a3775ae4cb..5565c9c9f1 100644 --- a/html/includes/graphs/graph.inc.php +++ b/html/includes/graphs/graph.inc.php @@ -72,13 +72,15 @@ if(is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.ph if($auth) { include($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php"); } +} else { + graph_error("Graph Template Missing"); } function graph_error ($string) { global $width, $height; header('Content-type: image/png'); - $im = imagecreate($width+75, $height); - $orange = imagecolorallocate($im, 255, 255, 255); + $im = imagecreate($width+79, $height); + $orange = imagecolorallocate($im, 255, 225, 225); $px = (imagesx($im) - 7.5 * strlen($string)) / 2; imagestring($im, 3, $px, $height / 2 - 8, $string, imagecolorallocate($im, 128, 0, 0)); imagepng($im); @@ -86,8 +88,10 @@ function graph_error ($string) { } -if($auth) +if(!$auth) { + graph_error("Unauthorized"); +} else { if($no_file) { graph_error("Missing RRD"); @@ -112,8 +116,6 @@ if($auth) graph_error("Definition Error"); } } -} else { - graph_error("Unauthorized"); }