www/getfermenter.php

Wed, 13 Feb 2019 20:28:54 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 13 Feb 2019 20:28:54 +0100
changeset 273
19606adfea42
parent 180
a5aa3502310c
child 296
69fadd1aded2
permissions
-rw-r--r--

Set recipe edit values readonly when the brewday is over. Add the inventory reduce script and update the checkbox. Active after packaging.

<?php

require_once('config.php');

if (isset($_GET["uuid"]))
	    $uuid = $_GET["uuid"];
else
	    $uuid = "'ef166f25-1bb4-4bef-b112-a867af77f766'";


$mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME);
$query = "SELECT * FROM mon_fermenters WHERE uuid=".$uuid."";
$result = $mysqli->query($query);
$resultArray = $result->fetch_array(MYSQLI_ASSOC);
if ($resultArray['online'] == 'Y') {
  $resultArray['online'] = 1;
} else {
  $resultArray['online'] = 0;
}
echo json_encode($resultArray);

mercurial