www/getfermenter.php

Fri, 30 Nov 2018 17:40:39 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 30 Nov 2018 17:40:39 +0100
changeset 116
ac993ef43b13
parent 43
dcb9ff8846fa
child 180
a5aa3502310c
permissions
-rw-r--r--

Removed all calculations from the equipemnts database script and added missing fields. Added missing fields to the inventory equipemnts edit screen. Added conditional batch size calculation to the equipments editor. Added specific heat settings to the equipments editor.

<?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