Mon, 12 Nov 2018 16:34:43 +0100
Missing Water agent costs from Brouwhulp import are now added from the imported miscs database. The printed recipe report now calculates the beer color from the ingredients. Also set during recipes import. This will later allow to set the color method for each recipe individually.
4 | 1 | <?php |
2 | ||
3 | require_once('config.php'); | |
4 | ||
5 | if (isset($_GET["uuid"])) | |
6 | $uuid = $_GET["uuid"]; | |
7 | else | |
8 | $uuid = "'c0c17800-fabb-4f22-a02a-4f83a7b1b21b'"; | |
9 | ||
10 | ||
44 | 11 | $query = "SELECT * FROM mon_nodes WHERE uuid=".$uuid.""; |
4 | 12 | $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
13 | $result = $mysqli->query($query); | |
14 | //Copy result into a associative array | |
15 | $resultArray = $result->fetch_array(MYSQLI_ASSOC); | |
7
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
16 | if ($resultArray['online'] == 'Y') { |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
17 | $resultArray['online'] = true; |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
18 | } else { |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
19 | $resultArray['online'] = false; |
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
20 | } |
4 | 21 | echo json_encode($resultArray); |