diff --git a/html/includes/device-edit.inc.php b/html/includes/device-edit.inc.php
index d27d81f8d..997717fd7 100644
--- a/html/includes/device-edit.inc.php
+++ b/html/includes/device-edit.inc.php
@@ -1,33 +1,34 @@
0) {
- $update_message = mysql_affected_rows() . " Device record updated.";
- $updated = 1;
- } elseif ($rows_updated = '-1') {
- $update_message = "Device record unchanged. No update necessary.";
- $updated = -1;
- } else {
- $update_message = "Device record update error.";
- $updated = 0;
- }
+if ($rows_updated > 0)
+{
+ $update_message = mysql_affected_rows() . " Device record updated.";
+ $updated = 1;
+} elseif ($rows_updated = '-1') {
+ $update_message = "Device record unchanged. No update necessary.";
+ $updated = -1;
+} else {
+ $update_message = "Device record update error.";
+ $updated = 0;
+}
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/sensor/auth.inc.php b/html/includes/graphs/sensor/auth.inc.php
index 5d4de6631..cdd274ca0 100644
--- a/html/includes/graphs/sensor/auth.inc.php
+++ b/html/includes/graphs/sensor/auth.inc.php
@@ -1,10 +1,10 @@
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/sensor/current.inc.php b/html/includes/graphs/sensor/current.inc.php
index c24d96d90..c0d12ede4 100644
--- a/html/includes/graphs/sensor/current.inc.php
+++ b/html/includes/graphs/sensor/current.inc.php
@@ -4,20 +4,19 @@ $scale_min = "0";
include("includes/graphs/common.inc.php");
- $rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("current-" . $sensor['sensor_descr'] . ".rrd");
+$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("current-" . $sensor['sensor_descr'] . ".rrd");
- $rrd_options .= " COMMENT:' Min Last Max\\n'";
+$rrd_options .= " COMMENT:' Min Last Max\\n'";
- $sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 18),0,18);
+$sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 18),0,18);
- $rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
- $rrd_options .= " LINE1.5:sensor#cc0000:'" . $sensor['sensor_descr_fixed']."'";
- $rrd_options .= " GPRINT:sensor$current_id:MIN:%5.2lfA";
- $rrd_options .= " GPRINT:sensor:LAST:%5.2lfA";
- $rrd_options .= " GPRINT:sensor:MAX:%5.2lfA\\\\l";
+$rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
+$rrd_options .= " LINE1.5:sensor#cc0000:'" . $sensor['sensor_descr_fixed']."'";
+$rrd_options .= " GPRINT:sensor$current_id:MIN:%5.2lfA";
+$rrd_options .= " GPRINT:sensor:LAST:%5.2lfA";
+$rrd_options .= " GPRINT:sensor:MAX:%5.2lfA\\\\l";
- if(is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
- if(is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
-
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/sensor/fanspeed.inc.php b/html/includes/graphs/sensor/fanspeed.inc.php
index d29cf68f6..e1cb53605 100644
--- a/html/includes/graphs/sensor/fanspeed.inc.php
+++ b/html/includes/graphs/sensor/fanspeed.inc.php
@@ -4,18 +4,18 @@ $scale_min = "0";
include("includes/graphs/common.inc.php");
- $rrd_options .= " COMMENT:' Last Max\\n'";
+$rrd_options .= " COMMENT:' Last Max\\n'";
- $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("fanspeed-" . $sensor['sensor_type'] .'-'. $sensor['sensor_index'] . ".rrd");
+$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("fanspeed-" . $sensor['sensor_type'] .'-'. $sensor['sensor_index'] . ".rrd");
- $sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 20),0,20);
+$sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 20),0,20);
- $rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
- $rrd_options .= " LINE1.5:sensor#cc0000:'" . str_replace(':','\:',str_replace('\*','*',quotemeta($sensor['sensor_descr_fixed'])))."'"; # Ugly hack :(
- $rrd_options .= " GPRINT:sensor:LAST:%3.0lfrpm";
- $rrd_options .= " GPRINT:sensor:MAX:%3.0lfrpm\\\\l";
+$rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
+$rrd_options .= " LINE1.5:sensor#cc0000:'" . str_replace(':','\:',str_replace('\*','*',quotemeta($sensor['sensor_descr_fixed'])))."'"; # Ugly hack :(
+$rrd_options .= " GPRINT:sensor:LAST:%3.0lfrpm";
+$rrd_options .= " GPRINT:sensor:MAX:%3.0lfrpm\\\\l";
- if(is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
- if(is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/sensor/frequency.inc.php b/html/includes/graphs/sensor/frequency.inc.php
index 351b5446d..ba3bf3f79 100644
--- a/html/includes/graphs/sensor/frequency.inc.php
+++ b/html/includes/graphs/sensor/frequency.inc.php
@@ -4,18 +4,18 @@ $scale_min = "0";
include("includes/graphs/common.inc.php");
- $rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("frequency-" . $sensor['sensor_descr'] . ".rrd");
+$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("frequency-" . $sensor['sensor_descr'] . ".rrd");
- $rrd_options .= " COMMENT:' Last Max\\n'";
+$rrd_options .= " COMMENT:' Last Max\\n'";
- $sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 28),0,28);
+$sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 28),0,28);
- $rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
- $rrd_options .= " LINE1.5:sensor#cc0000:'" . $sensor['sensor_descr_fixed']."'";
- $rrd_options .= " GPRINT:sensor:LAST:%3.0lfHz";
- $rrd_options .= " GPRINT:sensor:MAX:%3.0lfHz\\\\l";
+$rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
+$rrd_options .= " LINE1.5:sensor#cc0000:'" . $sensor['sensor_descr_fixed']."'";
+$rrd_options .= " GPRINT:sensor:LAST:%3.0lfHz";
+$rrd_options .= " GPRINT:sensor:MAX:%3.0lfHz\\\\l";
- if(is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
- if(is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/sensor/humidity.inc.php b/html/includes/graphs/sensor/humidity.inc.php
index 8d029122b..74a97007c 100644
--- a/html/includes/graphs/sensor/humidity.inc.php
+++ b/html/includes/graphs/sensor/humidity.inc.php
@@ -5,30 +5,30 @@ $scale_max = "40";
include("includes/graphs/common.inc.php");
- $rrd_options .= " COMMENT:' Last Max\\n'";
+$rrd_options .= " COMMENT:' Last Max\\n'";
- $rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("humidity-" . $sensor['sensor_descr'] . ".rrd");
+$rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("humidity-" . $sensor['sensor_descr'] . ".rrd");
- $sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 28),0,28);
+$sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 28),0,28);
- $rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
- $rrd_options .= " DEF:sensor_max=$rrd_filename:sensor:MAX";
- $rrd_options .= " DEF:sensor_min=$rrd_filename:sensor:MIN";
- $rrd_options .= " CDEF:sensorwarm=sensor_max,".$sensor['sensor_limit'].",GT,sensor,UNKN,IF";
- $rrd_options .= " CDEF:sensorcold=sensor_min,20,LT,sensor,UNKN,IF";
- $rrd_options .= " AREA:sensor_max#c5c5c5";
- $rrd_options .= " AREA:sensor_min#ffffffff";
+$rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
+$rrd_options .= " DEF:sensor_max=$rrd_filename:sensor:MAX";
+$rrd_options .= " DEF:sensor_min=$rrd_filename:sensor:MIN";
+$rrd_options .= " CDEF:sensorwarm=sensor_max,".$sensor['sensor_limit'].",GT,sensor,UNKN,IF";
+$rrd_options .= " CDEF:sensorcold=sensor_min,20,LT,sensor,UNKN,IF";
+$rrd_options .= " AREA:sensor_max#c5c5c5";
+$rrd_options .= " AREA:sensor_min#ffffffff";
# $rrd_options .= " AREA:sensor#bbd392";
# $rrd_options .= " AREA:sensorwarm#FFCCCC";
# $rrd_options .= " AREA:sensorcold#CCCCFF";
- $rrd_options .= " LINE1:sensor#cc0000:'" . str_replace(':','\:',str_replace('\*','*',quotemeta($sensor['sensor_descr_fixed'])))."'"; # Ugly hack :(
- $rrd_options .= " LINE1:sensorwarm#660000";
- $rrd_options .= " GPRINT:sensor:LAST:%3.0lf%%";
- $rrd_options .= " GPRINT:sensor:MAX:%3.0lf%%\\\\l";
+$rrd_options .= " LINE1:sensor#cc0000:'" . str_replace(':','\:',str_replace('\*','*',quotemeta($sensor['sensor_descr_fixed'])))."'"; # Ugly hack :(
+$rrd_options .= " LINE1:sensorwarm#660000";
+$rrd_options .= " GPRINT:sensor:LAST:%3.0lf%%";
+$rrd_options .= " GPRINT:sensor:MAX:%3.0lf%%\\\\l";
- if(is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
- if(is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/sensor/temperature.inc.php b/html/includes/graphs/sensor/temperature.inc.php
index 26ecc52dd..3f81bdd63 100644
--- a/html/includes/graphs/sensor/temperature.inc.php
+++ b/html/includes/graphs/sensor/temperature.inc.php
@@ -5,35 +5,34 @@ $scale_max = "60";
include("includes/graphs/common.inc.php");
- $rrd_options .= " COMMENT:' Cur Min Max\\n'";
+$rrd_options .= " COMMENT:' Cur Min Max\\n'";
- ### FIXME: Overwrite default because it won't work here yet
- $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/temperature-" . safename($sensor['sensor_type']."-".$sensor['sensor_index']) . ".rrd";
+### FIXME: Overwrite default because it won't work here yet
+$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/temperature-" . safename($sensor['sensor_type']."-".$sensor['sensor_index']) . ".rrd";
+$sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 21),0,21);
+$sensor['sensor_descr_fixed'] = str_replace(':','\:',str_replace('\*','*',$sensor['sensor_descr_fixed']));
- $sensor['sensor_descr_fixed'] = substr(str_pad($sensor['sensor_descr'], 21),0,21);
- $sensor['sensor_descr_fixed'] = str_replace(':','\:',str_replace('\*','*',$sensor['sensor_descr_fixed']));
-
- $rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
- $rrd_options .= " DEF:sensor_max=$rrd_filename:sensor:MAX";
- $rrd_options .= " DEF:sensor_min=$rrd_filename:sensor:MIN";
- $rrd_options .= " CDEF:sensorwarm=sensor_max,".$sensor['sensor_limit'].",GT,sensor,UNKN,IF";
- $rrd_options .= " CDEF:sensorcold=sensor_min,20,LT,sensor,UNKN,IF";
- $rrd_options .= " AREA:sensor_max#c5c5c5";
- $rrd_options .= " AREA:sensor_min#ffffffff";
+$rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
+$rrd_options .= " DEF:sensor_max=$rrd_filename:sensor:MAX";
+$rrd_options .= " DEF:sensor_min=$rrd_filename:sensor:MIN";
+$rrd_options .= " CDEF:sensorwarm=sensor_max,".$sensor['sensor_limit'].",GT,sensor,UNKN,IF";
+$rrd_options .= " CDEF:sensorcold=sensor_min,20,LT,sensor,UNKN,IF";
+$rrd_options .= " AREA:sensor_max#c5c5c5";
+$rrd_options .= " AREA:sensor_min#ffffffff";
# $rrd_options .= " AREA:sensor#bbd392";
# $rrd_options .= " AREA:sensorwarm#FFCCCC";
# $rrd_options .= " AREA:sensorcold#CCCCFF";
# $rrd_options .= " LINE1:sensor#cc0000:'" . str_replace(':','\:',str_replace('\*','*',quotemeta($sensor['sensor_descr_fixed'])))."'"; # Ugly hack :(
- $rrd_options .= " LINE1.5:sensor#cc0000:'" . $sensor['sensor_descr_fixed']."'";
+$rrd_options .= " LINE1.5:sensor#cc0000:'" . $sensor['sensor_descr_fixed']."'";
# $rrd_options .= " LINE1.5:sensorwarm#660000";
- $rrd_options .= " GPRINT:sensor:LAST:%4.1lfC";
- $rrd_options .= " GPRINT:sensor_min:MIN:%4.1lfC";
- $rrd_options .= " GPRINT:sensor_max:MAX:%4.1lfC\\\\l";
+$rrd_options .= " GPRINT:sensor:LAST:%4.1lfC";
+$rrd_options .= " GPRINT:sensor_min:MIN:%4.1lfC";
+$rrd_options .= " GPRINT:sensor_max:MAX:%4.1lfC\\\\l";
- if(is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
- if(is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/graphs/sensor/voltage.inc.php b/html/includes/graphs/sensor/voltage.inc.php
index 2fcf304f0..dfd37e9de 100644
--- a/html/includes/graphs/sensor/voltage.inc.php
+++ b/html/includes/graphs/sensor/voltage.inc.php
@@ -24,7 +24,7 @@ $rrd_options .= " LINE1.5:sensor#cc0000:'" . $sensor['sensor_descr_fixed']."'";
$rrd_options .= " GPRINT:sensor:LAST:%6.2lfV";
$rrd_options .= " GPRINT:sensor:MAX:%6.2lfV\\\\l";
-if(is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
-if(is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit'])) $rrd_options .= " HRULE:".$sensor['sensor_limit']."#999999::dashes";
+if (is_numeric($sensor['sensor_limit_low'])) $rrd_options .= " HRULE:".$sensor['sensor_limit_low']."#999999::dashes";
-?>
+?>
\ No newline at end of file
diff --git a/html/includes/print-event-short.inc b/html/includes/print-event-short.inc
index 78250a2cd..08c2011ef 100644
--- a/html/includes/print-event-short.inc
+++ b/html/includes/print-event-short.inc
@@ -1,31 +1,26 @@
-
"; }
+$icon = geteventicon($entry['message']);
+if ($icon) { $icon = ""; }
+echo("