added pink and yellow colours
This commit is contained in:
parent
04ff1c5958
commit
311c73c60b
10
index.php
10
index.php
@ -87,7 +87,11 @@ $file = file_get_contents('/home/pi/hugh/rgb', FILE_USE_INCLUDE_PATH);
|
||||
$rgb = "Green";
|
||||
} elseif ($file == "0, 0, 255") {
|
||||
$rgb = "Blue";
|
||||
}
|
||||
} elseif ($file == "255, 255, 0") {
|
||||
$rgb = "Yellow";
|
||||
} elseif ($file == "255, 102, 255") {
|
||||
$rgb = "Pink";
|
||||
}
|
||||
|
||||
// Rendering Page.
|
||||
?><!DOCTYPE html>
|
||||
@ -201,11 +205,11 @@ $file = file_get_contents('/home/pi/hugh/rgb', FILE_USE_INCLUDE_PATH);
|
||||
<td id="kernel"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="mdl-data-table__cell--non-numeric"></td>
|
||||
<td class="mdl-data-table__cell--non-numeric" onclick="location.href='/yellow.php'">Yellow</td>
|
||||
<td id="processor"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="mdl-data-table__cell--non-numeric"></td>
|
||||
<td class="mdl-data-table__cell--non-numeric" onclick="location.href='/pink.php'">Pink</td>
|
||||
<td id="frequency"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
7
pink.php
Normal file
7
pink.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$fp = fopen('/home/pi/hugh/rgb', 'w');
|
||||
fwrite($fp, '255, 102, 255');
|
||||
fclose($fp);
|
||||
|
||||
echo "<meta http-equiv = 'Refresh' content = '2; url =./index.php'/>"; // change redirectpage.php to where you want to redirect.
|
||||
?>
|
7
yellow.php
Normal file
7
yellow.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$fp = fopen('/home/pi/hugh/rgb', 'w');
|
||||
fwrite($fp, '255, 255, 0');
|
||||
fclose($fp);
|
||||
|
||||
echo "<meta http-equiv = 'Refresh' content = '2; url =./index.php'/>"; // change redirectpage.php to where you want to redirect.
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user