Wed, 20 May 2020 21:49:09 +0200
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
4 | 1 | <?php |
2 | ||
3 | require_once('config.php'); | |
4 | ||
5 | if (isset($_GET["uuid"])) | |
6 | $uuid = $_GET["uuid"]; | |
7 | else | |
8 | $uuid = "'ef166f25-1bb4-4bef-b112-a867af77f766'"; | |
9 | ||
10 | ||
11 | $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); | |
43
dcb9ff8846fa
Renamed monitor database tables
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
12 | $query = "SELECT * FROM mon_fermenters WHERE uuid=".$uuid.""; |
4 | 13 | $result = $mysqli->query($query); |
14 | $resultArray = $result->fetch_array(MYSQLI_ASSOC); | |
296
69fadd1aded2
Updated design document. Add content header application/json to all scripts that produce json output. Chart prints show the beer code and name in the header. Charts don't display the menu anymore.
Michiel Broek <mbroek@mbse.eu>
parents:
180
diff
changeset
|
15 | header("Content-type: application/json"); |
4 | 16 | echo json_encode($resultArray); |