From 0c77463d19f7a9299803a0be348343ec541a2eda Mon Sep 17 00:00:00 2001 From: Karl Hudgell Date: Thu, 1 Dec 2016 14:45:32 +0000 Subject: [PATCH] current file value display --- index.php | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index 34ed534..973e89b 100644 --- a/index.php +++ b/index.php @@ -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. ?> @@ -167,7 +186,7 @@ for ($count = 1; $count < sizeof($diskfree); $count ++) {
-

Desk Colour

+

Desk Colour -

@@ -188,12 +207,7 @@ for ($count = 1; $count < sizeof($diskfree); $count ++) { - +