current file value display

This commit is contained in:
Karl Hudgell 2016-12-01 14:45:32 +00:00
parent 0e89697cd7
commit 0c77463d19

View File

@ -76,6 +76,25 @@ 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") {
$rgb = "Off";
}
if ($file > "255, 0, 0") {
$rgb = "Red";
}
if ($file > "0, 255, 0") {
$rgb = "Green";
}
if ($file > "0, 0, 255") {
$rgb = "Blue";
}
// Rendering Page. // Rendering Page.
?><!DOCTYPE html> ?><!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -167,7 +186,7 @@ for ($count = 1; $count < sizeof($diskfree); $count ++) {
</table> </table>
</div> </div>
<div class="mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--6-col mdl-grid"> <div class="mdl-color--white mdl-shadow--2dp mdl-cell mdl-cell--6-col mdl-grid">
<h3>Desk Colour</h3> <h3>Desk Colour - <?php echo $rgb;?></h3>
<table class="mdl-data-table mdl-js-data-table" style="width:100%;"> <table class="mdl-data-table mdl-js-data-table" style="width:100%;">
<tbody> <tbody>
@ -188,12 +207,7 @@ for ($count = 1; $count < sizeof($diskfree); $count ++) {
<td id="kernel"></td> <td id="kernel"></td>
</tr> </tr>
<tr> <tr>
<td class="mdl-data-table__cell--non-numeric"><?php <td class="mdl-data-table__cell--non-numeric"></td>
$file = file_get_contents('/home/pi/hugh/rgb', FILE_USE_INCLUDE_PATH);
echo $file;
?></td>
<td id="processor"></td> <td id="processor"></td>
</tr> </tr>
<tr> <tr>