if else fix

This commit is contained in:
Karl Hudgell 2016-12-01 14:49:32 +00:00
parent 0c77463d19
commit 4ee49d9a43

View File

@ -79,21 +79,16 @@ for ($count = 1; $count < sizeof($diskfree); $count ++) {
//Read in RGB file
$file = file_get_contents('/home/pi/hugh/rgb', FILE_USE_INCLUDE_PATH);
if ($file > "0, 0, 0") {
if (($file > "0, 0, 0") {
$rgb = "Off";
}
if ($file > "255, 0, 0") {
} else if ($file > "255, 0, 0") {
$rgb = "Red";
}
if ($file > "0, 255, 0") {
} else if ($file > "0, 255, 0") {
$rgb = "Green";
}
if ($file > "0, 0, 255") {
else if ($file > "0, 0, 255") {
$rgb = "Blue";
}
}
// Rendering Page.
?><!DOCTYPE html>
@ -186,7 +181,7 @@ if ($file > "0, 0, 255") {
</table>
</div>
<div class="mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--6-col mdl-grid">
<h3>Desk Colour - <?php echo $rgb;?></h3>
<h3>Desk Colour - <?php echo $rgb;?> - (<?php echo $file;?>)</h3>
<table class="mdl-data-table mdl-js-data-table" style="width:100%;">
<tbody>