Web-UI: Added buttons for ON/OFF & LCDON/LCDOFF

This commit is contained in:
Malte Bublitz 2023-10-26 20:44:34 +02:00
parent 8a7d7a4980
commit 5edb208e01
Signed by: malte70
GPG key ID: 605DA5C729F9C184
3 changed files with 37 additions and 0 deletions

View file

@ -16,6 +16,18 @@ switch ($_POST["cmd"]) {
case "cls": case "cls":
fwrite($f, "CLS"); fwrite($f, "CLS");
break; break;
case "on":
fwrite($f, "ON");
break;
case "off":
fwrite($f, "OFF");
break;
case "lcdon":
fwrite($f, "LCDON");
break;
case "lcdoff":
fwrite($f, "LCDOFF");
break;
case "line": case "line":
fwrite($f, "LINE "); fwrite($f, "LINE ");
fwrite($f, $_POST["line"]); fwrite($f, $_POST["line"]);

View file

@ -26,6 +26,26 @@ $Title = "MAPID-FIFO Web-UI";
<button type="submit">Clear</button> <button type="submit">Clear</button>
</form> </form>
</section> </section>
<section>
<form action="command.php" method="POST">
<input type="hidden" name="cmd" value="on">
<button type="submit">LED On</button>
</form>
<form action="command.php" method="POST">
<input type="hidden" name="cmd" value="off">
<button type="submit">LED Off</button>
</form>
</section>
<section>
<form action="command.php" method="POST">
<input type="hidden" name="cmd" value="lcdon">
<button type="submit">Display On</button>
</form>
<form action="command.php" method="POST">
<input type="hidden" name="cmd" value="lcdoff">
<button type="submit">Display Off</button>
</form>
</section>
<section> <section>
<form action="command.php" method="POST"> <form action="command.php" method="POST">
<input type="hidden" name="cmd" value="line"> <input type="hidden" name="cmd" value="line">

View file

@ -20,6 +20,11 @@ section {
margin: 0 0 2em; margin: 0 0 2em;
} }
form {
display: inline-block;
margin-right: .5em;
}
input, select { input, select {
border-radius: 6px; border-radius: 6px;
padding: 6px 14px; padding: 6px 14px;