diff --git a/html/includes/graphs/bill/auth.inc.php b/html/includes/graphs/bill/auth.inc.php
index fd44cf32c..948594745 100644
--- a/html/includes/graphs/bill/auth.inc.php
+++ b/html/includes/graphs/bill/auth.inc.php
@@ -2,7 +2,7 @@
### Authorises bill viewing and sets $ports as reference to mysql query containing ports for this bill
-if(is_numeric($_GET['id']) && ($config['allow_unauth_graphs'] || bill_permitted($_GET['id'])))
+if (is_numeric($_GET['id']) && ($config['allow_unauth_graphs'] || bill_permitted($_GET['id'])))
{
$ports = mysql_query("SELECT * FROM `bill_ports` AS B, `ports` AS P, `devices` AS D
@@ -10,7 +10,6 @@ if(is_numeric($_GET['id']) && ($config['allow_unauth_graphs'] || bill_permitted(
AND D.device_id = P.device_id");
$auth = TRUE;
-
}
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/bill/bits.inc.php b/html/includes/graphs/bill/bits.inc.php
index 200adde33..add5a4313 100644
--- a/html/includes/graphs/bill/bits.inc.php
+++ b/html/includes/graphs/bill/bits.inc.php
@@ -2,25 +2,28 @@
## Generate a list of ports and then call the multi_bits grapher to generate from the list
-$i=0;
-while($port = mysql_fetch_array($ports)) {
- if(is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd"))) {
+$i = 0;
+
+while ($port = mysql_fetch_array($ports))
+{
+ if (is_file($config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd")))
+ {
$rrd_list[$i]['filename'] = $config['rrd_dir'] . "/" . $port['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd");
$rrd_list[$i]['descr'] = $port['ifDescr'];
$i++;
}
}
-$units='bps';
-$total_units='B';
-$colours_in='greens';
-$multiplier = "8";
+$units='bps';
+$total_units='B';
+$colours_in='greens';
+$multiplier = "8";
$colours_out = 'blues';
$nototal = 1;
$rra_in = "INOCTETS";
$rra_out = "OUTOCTETS";
-include ("includes/graphs/generic_multi_bits_separated.inc.php");
+include("includes/graphs/generic_multi_bits_separated.inc.php");
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/customer/auth.inc.php b/html/includes/graphs/customer/auth.inc.php
index 9485aab9c..ad7705237 100755
--- a/html/includes/graphs/customer/auth.inc.php
+++ b/html/includes/graphs/customer/auth.inc.php
@@ -1,10 +1,10 @@
= "5" || $config['allow_unauth_graphs'])
+if ($_SESSION['userlevel'] >= "5" || $config['allow_unauth_graphs'])
{
$id = mres($_GET['id']);
$title = generate_device_link($device);
$auth = TRUE;
}
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/customer/bits.inc.php b/html/includes/graphs/customer/bits.inc.php
index 51521d63a..ed3b3a51a 100644
--- a/html/includes/graphs/customer/bits.inc.php
+++ b/html/includes/graphs/customer/bits.inc.php
@@ -3,20 +3,22 @@
## Generate a list of ports and then call the multi_bits grapher to generate from the list
$query = mysql_query("SELECT * FROM `ports` AS I, `devices` AS D WHERE `port_descr_type` = 'cust' AND `port_descr_descr` = '".mres($_GET['id'])."' AND D.device_id = I.device_id");
-while($int = mysql_fetch_array($query)) {
- if(is_file($config['rrd_dir'] . "/" . $int['hostname'] . "/port-" . safename($int['ifIndex'] . ".rrd"))) {
+while ($int = mysql_fetch_array($query))
+{
+ if (is_file($config['rrd_dir'] . "/" . $int['hostname'] . "/port-" . safename($int['ifIndex'] . ".rrd")))
+ {
$rrd_filenames[] = $config['rrd_dir'] . "/" . $int['hostname'] . "/port-" . safename($int['ifIndex'] . ".rrd");
}
}
$rra_in = "INOCTETS";
-$rra_out = "OUTOCTETS";
+$rra_out = "OUTOCTETS";
$colour_line_in = "006600";
$colour_line_out = "000099";
$colour_area_in = "CDEB8B";
$colour_area_out = "C3D9FF";
-include ("includes/graphs/generic_multi_bits.inc.php");
+include("includes/graphs/generic_multi_bits.inc.php");
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/auth.inc.php b/html/includes/graphs/device/auth.inc.php
index f176c97bf..461a774f3 100644
--- a/html/includes/graphs/device/auth.inc.php
+++ b/html/includes/graphs/device/auth.inc.php
@@ -7,4 +7,4 @@ if (is_numeric($id) && ($config['allow_unauth_graphs'] || device_permitted($id))
$auth = TRUE;
}
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/bits.inc.php b/html/includes/graphs/device/bits.inc.php
index 0363233a9..2e62145bb 100644
--- a/html/includes/graphs/device/bits.inc.php
+++ b/html/includes/graphs/device/bits.inc.php
@@ -45,6 +45,6 @@ $colour_line_out = "000099";
$colour_area_in = "CDEB8B";
$colour_area_out = "C3D9FF";
-include ("includes/graphs/generic_multi_bits.inc.php");
+include("includes/graphs/generic_multi_bits.inc.php");
?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/cipsec_flow_bits.inc.php b/html/includes/graphs/device/cipsec_flow_bits.inc.php
index af1fb91bd..ee37c5f1c 100644
--- a/html/includes/graphs/device/cipsec_flow_bits.inc.php
+++ b/html/includes/graphs/device/cipsec_flow_bits.inc.php
@@ -7,4 +7,4 @@ $rra_out = "OutOctets";
include("includes/graphs/generic_bits.inc.php");
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/cipsec_flow_pkts.inc.php b/html/includes/graphs/device/cipsec_flow_pkts.inc.php
index 624a9653c..56bfc018f 100644
--- a/html/includes/graphs/device/cipsec_flow_pkts.inc.php
+++ b/html/includes/graphs/device/cipsec_flow_pkts.inc.php
@@ -18,4 +18,4 @@ $unit_text = "Pkts ";
include("includes/graphs/generic_duplex.inc.php");
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/cipsec_flow_stats.inc.php b/html/includes/graphs/device/cipsec_flow_stats.inc.php
index 0005c5d84..f064c850d 100755
--- a/html/includes/graphs/device/cipsec_flow_stats.inc.php
+++ b/html/includes/graphs/device/cipsec_flow_stats.inc.php
@@ -1,6 +1,5 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/cipsec_flow_tunnels.inc.php b/html/includes/graphs/device/cipsec_flow_tunnels.inc.php
index 0b51d5e0d..932993e12 100644
--- a/html/includes/graphs/device/cipsec_flow_tunnels.inc.php
+++ b/html/includes/graphs/device/cipsec_flow_tunnels.inc.php
@@ -1,6 +1,5 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/cras_sessions.inc.php b/html/includes/graphs/device/cras_sessions.inc.php
index a31fcacf7..b7332d5cd 100644
--- a/html/includes/graphs/device/cras_sessions.inc.php
+++ b/html/includes/graphs/device/cras_sessions.inc.php
@@ -2,49 +2,49 @@
$scale_min = "0";
- include("includes/graphs/common.inc.php");
- $device = device_by_id_cache($id);
+include("includes/graphs/common.inc.php");
+$device = device_by_id_cache($id);
- $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cras_sessions.rrd";
+$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cras_sessions.rrd";
- $rrd_options .= " DEF:email=$rrd_filename:email:AVERAGE";
- $rrd_options .= " DEF:ipsec=$rrd_filename:ipsec:AVERAGE";
- $rrd_options .= " DEF:l2l=$rrd_filename:l2l:AVERAGE";
- $rrd_options .= " DEF:lb=$rrd_filename:lb:AVERAGE";
- $rrd_options .= " DEF:svc=$rrd_filename:svc:AVERAGE";
- $rrd_options .= " DEF:webvpn=$rrd_filename:webvpn:AVERAGE";
- $rrd_options .= " CDEF:webvpn_only=webvpn,svc,-";
+$rrd_options .= " DEF:email=$rrd_filename:email:AVERAGE";
+$rrd_options .= " DEF:ipsec=$rrd_filename:ipsec:AVERAGE";
+$rrd_options .= " DEF:l2l=$rrd_filename:l2l:AVERAGE";
+$rrd_options .= " DEF:lb=$rrd_filename:lb:AVERAGE";
+$rrd_options .= " DEF:svc=$rrd_filename:svc:AVERAGE";
+$rrd_options .= " DEF:webvpn=$rrd_filename:webvpn:AVERAGE";
+$rrd_options .= " CDEF:webvpn_only=webvpn,svc,-";
- $rrd_options .= " COMMENT:'Sessions Current Average Maximum\\n'";
+$rrd_options .= " COMMENT:'Sessions Current Average Maximum\\n'";
- $rrd_options .= " AREA:svc#aa0000:'SSLVPN Tunnels':STACK";
- $rrd_options .= " GPRINT:svc:LAST:%6.2lf%s";
- $rrd_options .= " GPRINT:svc:AVERAGE:\ %6.2lf%s";
- $rrd_options .= " GPRINT:svc:MAX:\ %6.2lf%s\\\\n";
+$rrd_options .= " AREA:svc#aa0000:'SSLVPN Tunnels':STACK";
+$rrd_options .= " GPRINT:svc:LAST:%6.2lf%s";
+$rrd_options .= " GPRINT:svc:AVERAGE:\ %6.2lf%s";
+$rrd_options .= " GPRINT:svc:MAX:\ %6.2lf%s\\\\n";
- $rrd_options .= " AREA:webvpn_only#999999:'Clientless VPN':STACK";
- $rrd_options .= " GPRINT:webvpn_only:LAST:%6.2lf%s";
- $rrd_options .= " GPRINT:webvpn_only:AVERAGE:\ %6.2lf%s";
- $rrd_options .= " GPRINT:webvpn_only:MAX:\ %6.2lf%s\\\\n";
+$rrd_options .= " AREA:webvpn_only#999999:'Clientless VPN':STACK";
+$rrd_options .= " GPRINT:webvpn_only:LAST:%6.2lf%s";
+$rrd_options .= " GPRINT:webvpn_only:AVERAGE:\ %6.2lf%s";
+$rrd_options .= " GPRINT:webvpn_only:MAX:\ %6.2lf%s\\\\n";
- $rrd_options .= " AREA:ipsec#00aa00:'IPSEC ':STACK";
- $rrd_options .= " GPRINT:ipsec:LAST:%6.2lf%s";
- $rrd_options .= " GPRINT:ipsec:AVERAGE:\ %6.2lf%s";
- $rrd_options .= " GPRINT:ipsec:MAX:\ %6.2lf%s\\\\n";
+$rrd_options .= " AREA:ipsec#00aa00:'IPSEC ':STACK";
+$rrd_options .= " GPRINT:ipsec:LAST:%6.2lf%s";
+$rrd_options .= " GPRINT:ipsec:AVERAGE:\ %6.2lf%s";
+$rrd_options .= " GPRINT:ipsec:MAX:\ %6.2lf%s\\\\n";
- $rrd_options .= " AREA:l2l#aaaa00:'Lan-to-Lan ':STACK";
- $rrd_options .= " GPRINT:l2l:LAST:%6.2lf%s";
- $rrd_options .= " GPRINT:l2l:AVERAGE:\ %6.2lf%s";
- $rrd_options .= " GPRINT:l2l:MAX:\ %6.2lf%s\\\\n";
+$rrd_options .= " AREA:l2l#aaaa00:'Lan-to-Lan ':STACK";
+$rrd_options .= " GPRINT:l2l:LAST:%6.2lf%s";
+$rrd_options .= " GPRINT:l2l:AVERAGE:\ %6.2lf%s";
+$rrd_options .= " GPRINT:l2l:MAX:\ %6.2lf%s\\\\n";
- $rrd_options .= " AREA:email#0000aa:'Email ':STACK";
- $rrd_options .= " GPRINT:email:LAST:%6.2lf%s";
- $rrd_options .= " GPRINT:email:AVERAGE:\ %6.2lf%s";
- $rrd_options .= " GPRINT:email:MAX:\ %6.2lf%s\\\\n";
+$rrd_options .= " AREA:email#0000aa:'Email ':STACK";
+$rrd_options .= " GPRINT:email:LAST:%6.2lf%s";
+$rrd_options .= " GPRINT:email:AVERAGE:\ %6.2lf%s";
+$rrd_options .= " GPRINT:email:MAX:\ %6.2lf%s\\\\n";
- $rrd_options .= " AREA:lb#aa00aa:'Load Balancer ':STACK";
- $rrd_options .= " GPRINT:lb:LAST:%6.2lf%s";
- $rrd_options .= " GPRINT:lb:AVERAGE:\ %6.2lf%s";
- $rrd_options .= " GPRINT:lb:MAX:\ %6.2lf%s\\\\n";
+$rrd_options .= " AREA:lb#aa00aa:'Load Balancer ':STACK";
+$rrd_options .= " GPRINT:lb:LAST:%6.2lf%s";
+$rrd_options .= " GPRINT:lb:AVERAGE:\ %6.2lf%s";
+$rrd_options .= " GPRINT:lb:MAX:\ %6.2lf%s\\\\n";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/diskio.inc.php b/html/includes/graphs/device/diskio.inc.php
index 8c195c124..6fb4fa419 100644
--- a/html/includes/graphs/device/diskio.inc.php
+++ b/html/includes/graphs/device/diskio.inc.php
@@ -2,4 +2,4 @@
include("diskio_ops.inc.php");
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/fdb_count.inc.php b/html/includes/graphs/device/fdb_count.inc.php
index 2339d45bf..ce802b7e6 100755
--- a/html/includes/graphs/device/fdb_count.inc.php
+++ b/html/includes/graphs/device/fdb_count.inc.php
@@ -4,13 +4,13 @@ $scale_min = "0";
include("includes/graphs/common.inc.php");
- $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/fdb_count.rrd";
+$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/fdb_count.rrd";
- $rrd_options .= " DEF:value=$rrd_filename:value:AVERAGE";
- $rrd_options .= " COMMENT:'MACs Current Minimum Maximum Average\\n'";
- $rrd_options .= " AREA:value#EEEEEE:value";
- $rrd_options .= " LINE1.25:value#36393D:";
- $rrd_options .= " GPRINT:value:LAST:%6.2lf\ GPRINT:value:AVERAGE:%6.2lf\ ";
- $rrd_options .= " GPRINT:value:MAX:%6.2lf\ GPRINT:value:AVERAGE:%6.2lf\\\\n";
+$rrd_options .= " DEF:value=$rrd_filename:value:AVERAGE";
+$rrd_options .= " COMMENT:'MACs Current Minimum Maximum Average\\n'";
+$rrd_options .= " AREA:value#EEEEEE:value";
+$rrd_options .= " LINE1.25:value#36393D:";
+$rrd_options .= " GPRINT:value:LAST:%6.2lf\ GPRINT:value:AVERAGE:%6.2lf\ ";
+$rrd_options .= " GPRINT:value:MAX:%6.2lf\ GPRINT:value:AVERAGE:%6.2lf\\\\n";
?>
diff --git a/html/includes/graphs/device/hr_processes.inc.php b/html/includes/graphs/device/hr_processes.inc.php
index a6bef2ca5..c37b7e46f 100644
--- a/html/includes/graphs/device/hr_processes.inc.php
+++ b/html/includes/graphs/device/hr_processes.inc.php
@@ -17,4 +17,4 @@ $rrd_options .= " GPRINT:procs:AVERAGE:%6.2lf";
$rrd_options .= " GPRINT:procs:MIN:%6.2lf";
$rrd_options .= " GPRINT:procs:MAX:%6.2lf\\\\n";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/hr_users.inc.php b/html/includes/graphs/device/hr_users.inc.php
index 8f2752715..dabec19e2 100644
--- a/html/includes/graphs/device/hr_users.inc.php
+++ b/html/includes/graphs/device/hr_users.inc.php
@@ -19,4 +19,4 @@ $rrd_options .= " GPRINT:users:AVERAGE:%6.2lf";
$rrd_options .= " GPRINT:users:MIN:%6.2lf";
$rrd_options .= " GPRINT:users_max:MAX:%6.2lf\\\\n";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ipSystemStats.inc.php b/html/includes/graphs/device/ipSystemStats.inc.php
index 3eea55039..738da6bd1 100644
--- a/html/includes/graphs/device/ipSystemStats.inc.php
+++ b/html/includes/graphs/device/ipSystemStats.inc.php
@@ -1,89 +1,89 @@
diff --git a/html/includes/graphs/device/ipsystemstats_ipv4.inc.php b/html/includes/graphs/device/ipsystemstats_ipv4.inc.php
index 480fd3845..d947b5973 100644
--- a/html/includes/graphs/device/ipsystemstats_ipv4.inc.php
+++ b/html/includes/graphs/device/ipsystemstats_ipv4.inc.php
@@ -1,53 +1,52 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ipsystemstats_ipv6.inc.php b/html/includes/graphs/device/ipsystemstats_ipv6.inc.php
index 6e5d2714c..866f3d1da 100644
--- a/html/includes/graphs/device/ipsystemstats_ipv6.inc.php
+++ b/html/includes/graphs/device/ipsystemstats_ipv6.inc.php
@@ -1,53 +1,52 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ipsystemstats_ipv6_frag.inc.php b/html/includes/graphs/device/ipsystemstats_ipv6_frag.inc.php
index 700eceaa2..65c15dad9 100644
--- a/html/includes/graphs/device/ipsystemstats_ipv6_frag.inc.php
+++ b/html/includes/graphs/device/ipsystemstats_ipv6_frag.inc.php
@@ -61,4 +61,4 @@ $rrd_options .= " GPRINT:ReasmReqds:LAST:%6.2lf%s";
$rrd_options .= " GPRINT:ReasmReqds:AVERAGE:%6.2lf%s";
$rrd_options .= " GPRINT:MReasmReqds:MAX:%6.2lf%s\\\\n";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/netstat_icmp.inc.php b/html/includes/graphs/device/netstat_icmp.inc.php
index 0c45f8e75..d56c9ea2e 100644
--- a/html/includes/graphs/device/netstat_icmp.inc.php
+++ b/html/includes/graphs/device/netstat_icmp.inc.php
@@ -1,51 +1,51 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/netstat_icmp_info.inc.php b/html/includes/graphs/device/netstat_icmp_info.inc.php
index 0d5a0b6d3..2daa34a19 100644
--- a/html/includes/graphs/device/netstat_icmp_info.inc.php
+++ b/html/includes/graphs/device/netstat_icmp_info.inc.php
@@ -66,4 +66,4 @@ $rrd_options .= " GPRINT:OutAddrMaskReps:LAST:%6.2lf%s";
$rrd_options .= " GPRINT:OutAddrMaskReps:AVERAGE:%6.2lf%s";
$rrd_options .= " GPRINT:OutAddrMaskReps_m:MAX:%6.2lf%s\\\\n";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/netstat_ip.inc.php b/html/includes/graphs/device/netstat_ip.inc.php
index 98ea5fec6..ac45c088e 100644
--- a/html/includes/graphs/device/netstat_ip.inc.php
+++ b/html/includes/graphs/device/netstat_ip.inc.php
@@ -1,45 +1,45 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/netstat_ip_frag.inc.php b/html/includes/graphs/device/netstat_ip_frag.inc.php
index aded7e452..7a2e629f3 100644
--- a/html/includes/graphs/device/netstat_ip_frag.inc.php
+++ b/html/includes/graphs/device/netstat_ip_frag.inc.php
@@ -63,4 +63,4 @@ $rrd_options .= " GPRINT:ReasmReqds:LAST:%6.2lf%s";
$rrd_options .= " GPRINT:ReasmReqds:AVERAGE:%6.2lf%s";
$rrd_options .= " GPRINT:MReasmReqds:MAX:%6.2lf%s\\\\n";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/netstat_snmp.inc.php b/html/includes/graphs/device/netstat_snmp.inc.php
index 01bbf79d9..ea8d4005c 100644
--- a/html/includes/graphs/device/netstat_snmp.inc.php
+++ b/html/includes/graphs/device/netstat_snmp.inc.php
@@ -1,49 +1,49 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/netstat_snmp_pkt.inc.php b/html/includes/graphs/device/netstat_snmp_pkt.inc.php
index 808db2fec..8bd91dc9a 100644
--- a/html/includes/graphs/device/netstat_snmp_pkt.inc.php
+++ b/html/includes/graphs/device/netstat_snmp_pkt.inc.php
@@ -1,25 +1,25 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/netstat_tcp.inc.php b/html/includes/graphs/device/netstat_tcp.inc.php
index c6e07a7a1..0a617afaf 100644
--- a/html/includes/graphs/device/netstat_tcp.inc.php
+++ b/html/includes/graphs/device/netstat_tcp.inc.php
@@ -1,45 +1,45 @@
diff --git a/html/includes/graphs/device/netstat_udp.inc.php b/html/includes/graphs/device/netstat_udp.inc.php
index 7b955aa4c..47eacca45 100644
--- a/html/includes/graphs/device/netstat_udp.inc.php
+++ b/html/includes/graphs/device/netstat_udp.inc.php
@@ -1,31 +1,31 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/processors.inc.php b/html/includes/graphs/device/processors.inc.php
index 1f0947c2c..e05cdbb7c 100644
--- a/html/includes/graphs/device/processors.inc.php
+++ b/html/includes/graphs/device/processors.inc.php
@@ -22,8 +22,8 @@ while ($proc = mysql_fetch_array($query))
$unit_text = "Load %";
-$units ='%';
-$total_units ='%';
+$units = '%';
+$total_units = '%';
$colours ='mixed';
$scale_min = "0";
@@ -31,6 +31,6 @@ $scale_max = "100";
$nototal = 1;
-include ("includes/graphs/generic_multi_line.inc.php");
+include("includes/graphs/generic_multi_line.inc.php");
?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/screenos_sessions.inc.php b/html/includes/graphs/device/screenos_sessions.inc.php
index bd4d6a4f4..04fe44ac5 100644
--- a/html/includes/graphs/device/screenos_sessions.inc.php
+++ b/html/includes/graphs/device/screenos_sessions.inc.php
@@ -1,6 +1,5 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/storage.inc.php b/html/includes/graphs/device/storage.inc.php
index 95bdcaba1..da66037f0 100644
--- a/html/includes/graphs/device/storage.inc.php
+++ b/html/includes/graphs/device/storage.inc.php
@@ -10,12 +10,13 @@ $device = device_by_id_cache($id);
$iter = "1";
$sql = mysql_query("SELECT * FROM storage where device_id = '$id'");
$rrd_options .= " COMMENT:' Size Used %age\\l'";
+
while ($storage = mysql_fetch_array($sql))
{
if ($iter=="1") { $colour="CC0000"; } elseif ($iter=="2") { $colour="008C00"; } elseif ($iter=="3") { $colour="4096EE"; }
elseif ($iter=="4") { $colour="73880A"; } elseif ($iter=="5") { $colour="D01F3C"; } elseif ($iter=="6") { $colour="36393D"; }
elseif ($iter=="7") { $colour="FF0084"; $iter = "0"; }
-
+
$descr = substr(str_pad($storage[storage_descr], 12),0,12);
$descr = str_replace(":","\:",$descr);
$rrd = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("storage-".$storage['storage_mib']."-".$storage['storage_descr'].".rrd");
diff --git a/html/includes/graphs/device/temperatures.inc.php b/html/includes/graphs/device/temperatures.inc.php
index 008b8ae5e..53803541a 100644
--- a/html/includes/graphs/device/temperatures.inc.php
+++ b/html/includes/graphs/device/temperatures.inc.php
@@ -48,4 +48,4 @@ while ($temperature = mysql_fetch_array($sql))
$iter++;
}
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ucd_contexts.inc.php b/html/includes/graphs/device/ucd_contexts.inc.php
index 2930cbade..482a5e379 100755
--- a/html/includes/graphs/device/ucd_contexts.inc.php
+++ b/html/includes/graphs/device/ucd_contexts.inc.php
@@ -17,4 +17,4 @@ $unit_text = "Switches/s";
include("includes/graphs/generic_simplex.inc.php");
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ucd_cpu.inc.php b/html/includes/graphs/device/ucd_cpu.inc.php
index 6a61c3037..d894f090c 100644
--- a/html/includes/graphs/device/ucd_cpu.inc.php
+++ b/html/includes/graphs/device/ucd_cpu.inc.php
@@ -1,32 +1,32 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ucd_interrupts.inc.php b/html/includes/graphs/device/ucd_interrupts.inc.php
index a6b111a7b..8f2f278c4 100755
--- a/html/includes/graphs/device/ucd_interrupts.inc.php
+++ b/html/includes/graphs/device/ucd_interrupts.inc.php
@@ -18,4 +18,4 @@ $unit_text = "Interrupts/s";
include("includes/graphs/generic_simplex.inc.php");
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ucd_io.inc.php b/html/includes/graphs/device/ucd_io.inc.php
index 85aec685f..c657e1e0f 100644
--- a/html/includes/graphs/device/ucd_io.inc.php
+++ b/html/includes/graphs/device/ucd_io.inc.php
@@ -1,6 +1,5 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ucd_load.inc.php b/html/includes/graphs/device/ucd_load.inc.php
index 8106ad2bb..2238cf4e2 100644
--- a/html/includes/graphs/device/ucd_load.inc.php
+++ b/html/includes/graphs/device/ucd_load.inc.php
@@ -5,29 +5,28 @@ $scale_min = "0";
include("includes/graphs/common.inc.php");
$device = device_by_id_cache($id);
- $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_load.rrd";
+$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/ucd_load.rrd";
- $rrd_options .= " DEF:1min=$rrd_filename:1min:AVERAGE";
- $rrd_options .= " DEF:5min=$rrd_filename:5min:AVERAGE";
- $rrd_options .= " DEF:15min=$rrd_filename:15min:AVERAGE";
- $rrd_options .= " CDEF:a=1min,100,/";
- $rrd_options .= " CDEF:b=5min,100,/";
- $rrd_options .= " CDEF:c=15min,100,/";
- $rrd_options .= " CDEF:cdefd=a,b,c,+,+";
- $rrd_options .= " COMMENT:Load\ Average\ \ Current\ \ \ \ Average\ \ \ \ Maximum\\\\n";
- $rrd_options .= " AREA:a#ffeeaa:1\ Min:";
- $rrd_options .= " LINE1:a#c5aa00:";
- $rrd_options .= " GPRINT:a:LAST:\ \ \ \ %7.2lf";
- $rrd_options .= " GPRINT:a:AVERAGE:\ \ %7.2lf";
- $rrd_options .= " GPRINT:a:MAX:\ \ %7.2lf\\\\n";
- $rrd_options .= " LINE1.25:b#ea8f00:5\ Min:";
- $rrd_options .= " GPRINT:b:LAST:\ \ \ \ %7.2lf";
- $rrd_options .= " GPRINT:b:AVERAGE:\ \ %7.2lf";
- $rrd_options .= " GPRINT:b:MAX:\ \ %7.2lf\\\\n";
- $rrd_options .= " LINE1.25:c#cc0000:15\ Min";
- $rrd_options .= " GPRINT:c:LAST:\ \ \ %7.2lf";
- $rrd_options .= " GPRINT:c:AVERAGE:\ \ %7.2lf";
- $rrd_options .= " GPRINT:c:MAX:\ \ %7.2lf\\\\n";
+$rrd_options .= " DEF:1min=$rrd_filename:1min:AVERAGE";
+$rrd_options .= " DEF:5min=$rrd_filename:5min:AVERAGE";
+$rrd_options .= " DEF:15min=$rrd_filename:15min:AVERAGE";
+$rrd_options .= " CDEF:a=1min,100,/";
+$rrd_options .= " CDEF:b=5min,100,/";
+$rrd_options .= " CDEF:c=15min,100,/";
+$rrd_options .= " CDEF:cdefd=a,b,c,+,+";
+$rrd_options .= " COMMENT:Load\ Average\ \ Current\ \ \ \ Average\ \ \ \ Maximum\\\\n";
+$rrd_options .= " AREA:a#ffeeaa:1\ Min:";
+$rrd_options .= " LINE1:a#c5aa00:";
+$rrd_options .= " GPRINT:a:LAST:\ \ \ \ %7.2lf";
+$rrd_options .= " GPRINT:a:AVERAGE:\ \ %7.2lf";
+$rrd_options .= " GPRINT:a:MAX:\ \ %7.2lf\\\\n";
+$rrd_options .= " LINE1.25:b#ea8f00:5\ Min:";
+$rrd_options .= " GPRINT:b:LAST:\ \ \ \ %7.2lf";
+$rrd_options .= " GPRINT:b:AVERAGE:\ \ %7.2lf";
+$rrd_options .= " GPRINT:b:MAX:\ \ %7.2lf\\\\n";
+$rrd_options .= " LINE1.25:c#cc0000:15\ Min";
+$rrd_options .= " GPRINT:c:LAST:\ \ \ %7.2lf";
+$rrd_options .= " GPRINT:c:AVERAGE:\ \ %7.2lf";
+$rrd_options .= " GPRINT:c:MAX:\ \ %7.2lf\\\\n";
-
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ucd_memory.inc.php b/html/includes/graphs/device/ucd_memory.inc.php
index a85edc60e..7f5f624f2 100644
--- a/html/includes/graphs/device/ucd_memory.inc.php
+++ b/html/includes/graphs/device/ucd_memory.inc.php
@@ -62,4 +62,4 @@ $rrd_options .= " GPRINT:usedswap:MAX:%7.2lf%sB\\\\n";
$rrd_options .= " LINE1:totalreal#050505:total";
$rrd_options .= " GPRINT:totalreal:AVERAGE:\ \ %7.2lf%sB";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/ucd_swap_io.inc.php b/html/includes/graphs/device/ucd_swap_io.inc.php
index 114cc4360..e83d24212 100644
--- a/html/includes/graphs/device/ucd_swap_io.inc.php
+++ b/html/includes/graphs/device/ucd_swap_io.inc.php
@@ -1,6 +1,5 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/uptime.inc.php b/html/includes/graphs/device/uptime.inc.php
index d80b1350f..7d892a33b 100644
--- a/html/includes/graphs/device/uptime.inc.php
+++ b/html/includes/graphs/device/uptime.inc.php
@@ -5,14 +5,14 @@ $scale_min = "0";
include("includes/graphs/common.inc.php");
$device = device_by_id_cache($id);
- $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/uptime.rrd";
+$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/uptime.rrd";
- $rrd_options .= " DEF:uptime=$rrd_filename:uptime:AVERAGE";
- $rrd_options .= " CDEF:cuptime=uptime,86400,/";
- $rrd_options .= " COMMENT:Days\ \ \ \ \ \ Current\ \ Minimum\ \ Maximum\ \ Average\\\\n";
- $rrd_options .= " AREA:cuptime#EEEEEE:Uptime";
- $rrd_options .= " LINE1.25:cuptime#36393D:";
- $rrd_options .= " GPRINT:cuptime:LAST:%6.2lf\ GPRINT:cuptime:AVERAGE:%6.2lf\ ";
- $rrd_options .= " GPRINT:cuptime:MAX:%6.2lf\ GPRINT:cuptime:AVERAGE:%6.2lf\\\\n";
+$rrd_options .= " DEF:uptime=$rrd_filename:uptime:AVERAGE";
+$rrd_options .= " CDEF:cuptime=uptime,86400,/";
+$rrd_options .= " COMMENT:Days\ \ \ \ \ \ Current\ \ Minimum\ \ Maximum\ \ Average\\\\n";
+$rrd_options .= " AREA:cuptime#EEEEEE:Uptime";
+$rrd_options .= " LINE1.25:cuptime#36393D:";
+$rrd_options .= " GPRINT:cuptime:LAST:%6.2lf\ GPRINT:cuptime:AVERAGE:%6.2lf\ ";
+$rrd_options .= " GPRINT:cuptime:MAX:%6.2lf\ GPRINT:cuptime:AVERAGE:%6.2lf\\\\n";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/device/wifi_clients.inc.php b/html/includes/graphs/device/wifi_clients.inc.php
index d195475c5..08f357592 100644
--- a/html/includes/graphs/device/wifi_clients.inc.php
+++ b/html/includes/graphs/device/wifi_clients.inc.php
@@ -26,4 +26,4 @@ if (file_exists($radio1))
}
}
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/diskio/auth.inc.php b/html/includes/graphs/diskio/auth.inc.php
index e9ecca25c..3ac97aa43 100644
--- a/html/includes/graphs/diskio/auth.inc.php
+++ b/html/includes/graphs/diskio/auth.inc.php
@@ -1,12 +1,11 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/diskio/bits.inc.php b/html/includes/graphs/diskio/bits.inc.php
index 9ddb1f5b1..09db2740b 100644
--- a/html/includes/graphs/diskio/bits.inc.php
+++ b/html/includes/graphs/diskio/bits.inc.php
@@ -5,4 +5,4 @@ $rra_out = "written";
include("includes/graphs/generic_bytes.inc.php");
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/diskio/ops.inc.php b/html/includes/graphs/diskio/ops.inc.php
index 9c9662049..205da922a 100644
--- a/html/includes/graphs/diskio/ops.inc.php
+++ b/html/includes/graphs/diskio/ops.inc.php
@@ -1,11 +1,13 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/multiport/auth.inc.php b/html/includes/graphs/multiport/auth.inc.php
index 3291c2760..5eabbebb0 100644
--- a/html/includes/graphs/multiport/auth.inc.php
+++ b/html/includes/graphs/multiport/auth.inc.php
@@ -2,12 +2,13 @@
$auth = TRUE;
-foreach(explode(",", $id) as $ifid) {
- if(!$config['allow_unauth_graphs'] && !port_permitted($ifid))
+foreach (explode(",", $id) as $ifid)
+{
+ if (!$config['allow_unauth_graphs'] && !port_permitted($ifid))
$auth = FALSE;
}
-#if(is_numeric($id)) {
+#if (is_numeric($id)) {
# $port = get_port_by_id($id);
# $device = device_by_id_cache($port['device_id']);
#}
@@ -17,5 +18,4 @@ foreach(explode(",", $id) as $ifid) {
$title = "Multi Port :: ";
-
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/multiport/bits.inc.php b/html/includes/graphs/multiport/bits.inc.php
index 7eae122e6..c1c0eb06a 100644
--- a/html/includes/graphs/multiport/bits.inc.php
+++ b/html/includes/graphs/multiport/bits.inc.php
@@ -1,11 +1,13 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/multiport/bits_duo.inc.php b/html/includes/graphs/multiport/bits_duo.inc.php
index b46d2d700..0c6c7ee29 100644
--- a/html/includes/graphs/multiport/bits_duo.inc.php
+++ b/html/includes/graphs/multiport/bits_duo.inc.php
@@ -1,116 +1,124 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/multiport/bits_separate.inc.php b/html/includes/graphs/multiport/bits_separate.inc.php
index 40e4dd49c..96a07f9ee 100644
--- a/html/includes/graphs/multiport/bits_separate.inc.php
+++ b/html/includes/graphs/multiport/bits_separate.inc.php
@@ -1,10 +1,12 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/multiport/bits_trio.inc.php b/html/includes/graphs/multiport/bits_trio.inc.php
index 371001685..fbc30d505 100644
--- a/html/includes/graphs/multiport/bits_trio.inc.php
+++ b/html/includes/graphs/multiport/bits_trio.inc.php
@@ -1,162 +1,175 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/processor/auth.inc.php b/html/includes/graphs/processor/auth.inc.php
index a1fff9407..7e2d79686 100755
--- a/html/includes/graphs/processor/auth.inc.php
+++ b/html/includes/graphs/processor/auth.inc.php
@@ -3,7 +3,7 @@
$sql = mysql_query("SELECT * FROM `processors` where `processor_id` = '".mres($id)."'");
$proc = mysql_fetch_assoc($sql);
-if(is_numeric($proc['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($proc['device_id'])))
+if (is_numeric($proc['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($proc['device_id'])))
{
$device = device_by_id_cache($proc['device_id']);
$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("processor-" . $proc['processor_type'] . "-" . $proc['processor_index'] . ".rrd");
@@ -12,4 +12,4 @@ if(is_numeric($proc['device_id']) && ($config['allow_unauth_graphs'] || device_p
$auth = TRUE;
}
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/processor/usage.inc.php b/html/includes/graphs/processor/usage.inc.php
index 386f3bdd6..ba02668bf 100755
--- a/html/includes/graphs/processor/usage.inc.php
+++ b/html/includes/graphs/processor/usage.inc.php
@@ -4,26 +4,27 @@ $scale_max = "100";
include("includes/graphs/common.inc.php");
- $iter = "1";
+$iter = "1";
- $rrd_options .= " COMMENT:' Cur Max\\n'";
+$rrd_options .= " COMMENT:' Cur Max\\n'";
- if($iter=="1") {$colour="CC0000";} elseif($iter=="2") {$colour="008C00";} elseif($iter=="3") {$colour="4096EE";
- } elseif($iter=="4") {$colour="73880A";} elseif($iter=="5") {$colour="D01F3C";} elseif($iter=="6") {$colour="36393D";
- } elseif($iter=="7") {$colour="FF0084"; unset($iter); }
- $descr = substr(str_pad(short_hrDeviceDescr($proc['processor_descr']), 28),0,28);
- $descr = str_replace(":", "\:", $descr);
+if ($iter=="1") { $colour="CC0000"; } elseif ($iter=="2") { $colour="008C00"; } elseif ($iter=="3") { $colour="4096EE"; }
+elseif ($iter=="4") { $colour="73880A"; } elseif ($iter=="5") { $colour="D01F3C"; } elseif ($iter=="6") { $colour="36393D"; }
+elseif ($iter=="7") { $colour="FF0084"; unset($iter); }
- $rrd_options .= " DEF:proc" . $proc['hrDeviceIndex'] . "=".$rrd_filename.":usage:AVERAGE ";
- $rrd_options .= " DEF:proc_max=".$rrd_filename.":usage:MAX";
- $rrd_options .= " DEF:proc_min=".$rrd_filename.":usage:MIN";
+$descr = substr(str_pad(short_hrDeviceDescr($proc['processor_descr']), 28),0,28);
+$descr = str_replace(":", "\:", $descr);
- $rrd_options .= " AREA:proc_max#c5c5c5";
- $rrd_options .= " AREA:proc_min#ffffffff";
+$rrd_options .= " DEF:proc" . $proc['hrDeviceIndex'] . "=".$rrd_filename.":usage:AVERAGE ";
+$rrd_options .= " DEF:proc_max=".$rrd_filename.":usage:MAX";
+$rrd_options .= " DEF:proc_min=".$rrd_filename.":usage:MIN";
- $rrd_options .= " LINE1:proc" . $proc['hrDeviceIndex'] . "#" . $colour . ":'" . $descr . "' ";
- $rrd_options .= " GPRINT:proc" . $proc['hrDeviceIndex'] . ":LAST:%3.0lf%%";
- $rrd_options .= " GPRINT:proc" . $proc['hrDeviceIndex'] . ":MAX:%3.0lf%%\\\l ";
- $iter++;
+$rrd_options .= " AREA:proc_max#c5c5c5";
+$rrd_options .= " AREA:proc_min#ffffffff";
-?>
+$rrd_options .= " LINE1:proc" . $proc['hrDeviceIndex'] . "#" . $colour . ":'" . $descr . "' ";
+$rrd_options .= " GPRINT:proc" . $proc['hrDeviceIndex'] . ":LAST:%3.0lf%%";
+$rrd_options .= " GPRINT:proc" . $proc['hrDeviceIndex'] . ":MAX:%3.0lf%%\\\l ";
+$iter++;
+
+?>
\ No newline at end of file