www/getfermenter.php

Mon, 12 Nov 2018 16:34:43 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 12 Nov 2018 16:34:43 +0100
changeset 89
082c23b26055
parent 43
dcb9ff8846fa
child 180
a5aa3502310c
permissions
-rw-r--r--

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.

<?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'] = true;
} else {
  $resultArray['online'] = false;
}
echo json_encode($resultArray);

mercurial