mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 18:38:25 +00:00
New file.
git-svn-id: http://www.observium.org/svn/observer/trunk@100 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
parent
b8e3ba656a
commit
4d9a43d3be
21
includes/print-functions.php
Normal file
21
includes/print-functions.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
function print_temperature($temp_current, $temp_limit) {
|
||||
|
||||
$temp_cur = $temp_current - 15;
|
||||
$temp_lim = $temp_limit - 15;
|
||||
|
||||
if(($temp_lim - $temp_cur) > 25) { $style = "color: LimeGreen;"; }
|
||||
if(($temp_lim - $temp_cur) <= 25) { $style = "color: Green;"; }
|
||||
if(($temp_lim - $temp_cur) < 20) { $style = "color: Blue;"; }
|
||||
if(($temp_lim - $temp_cur) < 15) { $style = "color: MediumPurple;"; }
|
||||
if(($temp_lim - $temp_cur) < 10) { $style = "font-weight: bold; color: Tomato;"; }
|
||||
if(($temp_lim - $temp_cur) < 5) { $style = "font-weight: bold; color: OrangeRed;"; }
|
||||
if(($temp_lim - $temp_cur) <= 0) { $style = "font-weight: bold; color: Crimson;"; }
|
||||
|
||||
|
||||
return("<span style='$style'>$temp_current</span>");
|
||||
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user