From 4ee49d9a43a99c76a778163a966e5ad62678f9e7 Mon Sep 17 00:00:00 2001 From: Karl Hudgell Date: Thu, 1 Dec 2016 14:49:32 +0000 Subject: [PATCH] if else fix --- index.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/index.php b/index.php index 973e89b..631d18c 100644 --- a/index.php +++ b/index.php @@ -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. ?> @@ -186,7 +181,7 @@ if ($file > "0, 0, 255") {
-

Desk Colour -

+

Desk Colour - - ()