www/getfermenter.php

Sun, 12 May 2019 15:16:35 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 12 May 2019 15:16:35 +0200
changeset 359
98354ef399cd
parent 296
69fadd1aded2
child 572
7a03181d29a3
permissions
-rw-r--r--

Lot's of improvements for recipes and products database load and save. Insert missing yeast tolerance field for old products and recipes. Recipe locked and calc_acid fields coverted to integer. In recipe edit screen removed the Print button. It is now included in the export screen. Added recipe export to forum screen.

<?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;
}
header("Content-type: application/json");
echo json_encode($resultArray);

mercurial