Added Purple colour

This commit is contained in:
Karl 2016-12-17 18:01:18 +00:00
parent e9bf692021
commit 0a5e53897b
4 changed files with 15 additions and 2 deletions

View File

@ -64,6 +64,10 @@ DTVControl.prototype.intentHandlers = {
path = '/pink.php';
break;
case "purple":
path = '/purple.php';
break;
case "off":
path = '/off.php';
break;

Binary file not shown.

View File

@ -91,7 +91,9 @@ $file = file_get_contents('/home/pi/hugh/rgb', FILE_USE_INCLUDE_PATH);
$rgb = "Yellow";
} elseif ($file == "255, 102, 255") {
$rgb = "Pink";
}
} elseif ($file == "75, 0, 130") {
$rgb = "Purple";
}
// Rendering Page.
?><!DOCTYPE html>
@ -213,7 +215,7 @@ $file = file_get_contents('/home/pi/hugh/rgb', FILE_USE_INCLUDE_PATH);
<td id="frequency"></td>
</tr>
<tr>
<td class="mdl-data-table__cell--non-numeric"></td>
<td class="mdl-data-table__cell--non-numeric" onclick="location.href='/purple.php'">Purple</td>
<td id="cpu_temperature"></td>
</tr>
<tr>

7
purple.php Normal file
View File

@ -0,0 +1,7 @@
<?php
$fp = fopen('/home/pi/hugh/rgb', 'w');
fwrite($fp, '75, 0, 130');
fclose($fp);
echo "<meta http-equiv = 'Refresh' content = '2; url =./index.php'/>"; // change redirectpage.php to where you want to redirect.
?>