Basic screens for brew products.

Thu, 22 Nov 2018 22:27:42 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 22 Nov 2018 22:27:42 +0100
changeset 111
8c4ba91adf58
parent 110
0f128201a031
child 112
7ef48396f705

Basic screens for brew products.

www/Makefile file | annotate | diff | comparison | revisions
www/import/from_brouwhulp.php file | annotate | diff | comparison | revisions
www/includes/db_product.php file | annotate | diff | comparison | revisions
www/includes/global.inc.php file | annotate | diff | comparison | revisions
www/inv_equipments.php file | annotate | diff | comparison | revisions
www/js/prod_edit.js file | annotate | diff | comparison | revisions
www/js/prod_inprod.js file | annotate | diff | comparison | revisions
www/js/prod_new.js file | annotate | diff | comparison | revisions
www/prod_edit.php file | annotate | diff | comparison | revisions
www/prod_inprod.php file | annotate | diff | comparison | revisions
www/prod_new.php file | annotate | diff | comparison | revisions
--- a/www/Makefile	Wed Nov 21 21:17:18 2018 +0100
+++ b/www/Makefile	Thu Nov 22 22:27:42 2018 +0100
@@ -8,7 +8,8 @@
 		  getyeastsources.php index.php inv_equipments.php inv_fermentables.php \
 		  inv_hops.php inv_instock.php inv_miscs.php inv_suppliers.php \
 		  inv_waters.php inv_yeasts.php mon_brewer.php  mon_fermenter.php \
-		  mon_node.php profile_mash.php profile_setup.php profile_styles.php \
+		  mon_node.php prod_edit.php prod_inprod.php prod_new.php \
+		  profile_mash.php profile_setup.php profile_styles.php \
 		  profile_water.php rec_edit.php rec_main.php rec_new.php rec_print.php \
 	    	  version.php
 SUB		= version.php.in images/* css/* jqwidgets/* jqwidgets/styles/* \
--- a/www/import/from_brouwhulp.php	Wed Nov 21 21:17:18 2018 +0100
+++ b/www/import/from_brouwhulp.php	Thu Nov 22 22:27:42 2018 +0100
@@ -982,10 +982,13 @@
 		$psql .= "', name='" . mysqli_real_escape_string($db, $recipe->NAME);
 		$rsql .= "', name='" . mysqli_real_escape_string($db, $recipe->NAME);
 
-                if ($recipe->NOTES)
-                        $rsql .= "', notes='" . mysqli_real_escape_string($db, $recipe->NOTES);
-                else
-                        $rsql .= "', notes='";
+                if ($recipe->NOTES) {
+			$rsql .= "', notes='" . mysqli_real_escape_string($db, $recipe->NOTES);		// Duplicate the notes
+			$psql .= "', notes='" . mysqli_real_escape_string($db, $recipe->NOTES);
+		} else {
+			$rsql .= "', notes='";
+			$psql .= "', notes='";
+		}
                 if ($recipe->TYPE)
                         $rsql .= "', type='" . mysqli_real_escape_string($db, $recipe->TYPE);
                 else
@@ -1149,6 +1152,7 @@
 
 		if ($recipe->EQUIPMENT) {
 			$psql .= "', eq_name='" . mysqli_real_escape_string($db, $recipe->EQUIPMENT->NAME);
+			$psql .= "', eq_notes='" . mysqli_real_escape_string($db, $recipe->EQUIPMENT->NOTES);
 			$psql .= "', eq_boil_size='" . floatval($recipe->EQUIPMENT->BOIL_SIZE);
 			$psql .= "', eq_batch_size='" . floatval($recipe->EQUIPMENT->BATCH_SIZE);
 			$psql .= "', eq_tun_volume='" . floatval($recipe->EQUIPMENT->TUN_VOLUME);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/includes/db_product.php	Thu Nov 22 22:27:42 2018 +0100
@@ -0,0 +1,233 @@
+<?php
+
+require($_SERVER['DOCUMENT_ROOT']."/config.php");
+require($_SERVER['DOCUMENT_ROOT']."/version.php");
+
+#Connect to the database
+$connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME);
+if (! $connect) {
+	die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());
+}
+mysqli_set_charset($connect, "utf8" );
+
+syslog(LOG_NOTICE, "db_product: start");
+
+$escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c");
+$replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b");
+$rescapers = array("'");
+$rreplacements = array("\\'");
+$disallowed = array('visibleindex','uniqueid','boundindex','uid');
+
+
+if (isset($_POST['insert']) || isset($_POST['update'])) {
+	if (isset($_POST['insert'])) {
+		// INSERT COMMAND
+		$sql  = "INSERT INTO `prod_main` SET ";
+	}
+	if (isset($_POST['update'])) {
+		// UPDATE COMMAND
+		$sql  = "UPDATE `prod_main` SET ";
+	}
+	// Basic settings
+	$sql .=    "uuid='" . $_POST['uuid'];
+	$sql .= "', name='" . mysqli_real_escape_string($connect, $_POST['name']);
+	$sql .= "', birth='" . $_POST['birth'];
+	$sql .= "', stage='" . $_POST['stage'];
+	$sql .= "', notes='" . mysqli_real_escape_string($connect, $_POST['notes']);
+	($_POST['log_brew'] == 'true') ? $sql .= "', log_brew='1" : $sql .= "', log_brew='0";
+	($_POST['log_fermentation'] == 'true') ? $sql .= "', log_fermentation='1" : $sql .= "', log_fermentation='0";
+	($_POST['inventory_reduced'] == 'true') ? $sql .= "', inventory_reduced='1" : $sql .= "', inventory_reduced='0";
+	($_POST['locked'] == 'true') ? $sql .= "', locked='1" : $sql .= "', locked='0";
+	// Equipment
+	$sql .= "', eq_name='" . mysqli_real_escape_string($connect, $_POST['eq_name']);
+	$sql .= "', eq_boil_size='" . $_POST['eq_boil_size'];
+	$sql .= "', eq_batch_size='" . $_POST['eq_batch_size'];
+	$sql .= "', eq_tun_volume='" . $_POST['eq_tun_volume'];
+	$sql .= "', eq_tun_weight='" . $_POST['eq_tun_weight'];
+	$sql .= "', eq_tun_specific_heat='" . $_POST['eq_tun_specific_heat'];
+	$sql .= "', eq_tun_material='" . $_POST['eq_tun_material'];
+	$sql .= "', eq_tun_height='" . $_POST['eq_tun_height'];
+	$sql .= "', eq_top_up_water='" . $_POST['eq_top_up_water'];
+	$sql .= "', eq_trub_chiller_loss='" . $_POST['eq_trub_chiller_loss'];
+	$sql .= "', eq_evap_rate='" . $_POST['eq_evap_rate'];
+	$sql .= "', eq_boil_time='" . $_POST['eq_boil_time'];
+	$sql .= "', eq_calc_boil_volume='" . $_POST['eq_calc_boil_volume'];
+	$sql .= "', eq_top_up_kettle='" . $_POST['eq_top_up_kettle'];
+	$sql .= "', eq_hop_utilization='" . $_POST['eq_hop_utilization'];
+	$sql .= "', eq_lauter_volume='" . $_POST['eq_lauter_volume'];
+	$sql .= "', eq_lauter_height='" . $_POST['eq_lauter_height'];
+	$sql .= "', eq_lauter_deadspace='" . $_POST['eq_lauter_deadspace'];
+	$sql .= "', eq_kettle_volume='" . $_POST['eq_kettle_volume'];
+	$sql .= "', eq_kettle_height='" . $_POST['eq_kettle_height'];
+	$sql .= "', eq_mash_volume='" . $_POST['eq_mash_volume'];
+	$sql .= "', eq_efficiency='" . $_POST['eq_efficiency'];
+
+
+	syslog(LOG_NOTICE, $sql);
+	if (isset($_POST['insert'])) {
+		$sql .= "';";
+	}
+	if (isset($_POST['update'])) {
+		$sql .= "' WHERE record='" . $_POST['record'] . "';";
+	}
+
+	$result = mysqli_query($connect, $sql);
+	if (! $result) {
+		syslog(LOG_NOTICE, "db_product: result: ".mysqli_error($connect));
+	} else {
+		if (isset($_POST['update'])) {
+			syslog(LOG_NOTICE, "db_product: updated record ".$_POST['record']);
+		} else {
+			$lastid = mysqli_insert_id($connect);
+			syslog(LOG_NOTICE, "db_product: inserted record ".$lastid);
+		}
+	}
+	echo $result;
+
+} else if (isset($_POST['delete'])) {
+	// DELETE COMMAND
+	$sql = "DELETE FROM `brews` WHERE record='".$_POST['record']."';";
+	$result = mysqli_query($connect, $sql);
+	if (! $result) {
+		syslog(LOG_NOTICE, "db_product: result: ".mysqli_error($connect));
+	} else {
+		syslog(LOG_NOTICE, "db_product: deleted record ".$_POST['record']);
+	}
+	echo $result;
+
+} else {
+//	syslog(LOG_NOTICE, "db_product: select");
+//	if (isset($_GET['select'])) {
+//		syslog(LOG_NOTICE, "db_product: select isset ".$_GET['select']);
+//	}
+	// SELECT COMMAND
+	if (isset($_GET['select']) && ($_GET['select'] == "inprod")) {
+		$query = "SELECT record,name,code,birth,stage FROM prod_main WHERE stage != 'Closed' ORDER BY birth,code;";
+		$result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect));
+		$brews = '[';
+		$comma = FALSE;
+		while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
+			// Manual encode to JSON.
+			if ($comma)
+				$brews .= ',';
+			$comma = TRUE;
+			$brews .=  '{"record":' . $row['record'];
+			$brews .=  ',"name":"' . str_replace($escapers, $replacements, $row['name']);
+			$brews .= '","code":"' . str_replace($escapers, $replacements, $row['code']);
+			$brews .= '","birth":"' . str_replace($escapers, $replacements, $row['birth']);
+			$brews .= '","stage":"' . str_replace($escapers, $replacements, $row['stage']);
+			$brews .= '"}';
+		}
+		$brews .= ']';
+		header("Content-type: application/json");
+		echo $brews;
+		return;
+	}
+
+	/*
+	 * Default, select all
+	 */
+	$query = "SELECT * FROM prod_main ORDER BY birth,code;";
+	$result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect));
+	while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
+		$brews[] = array(
+			'record' => $row['record'],
+			'uuid' => $row['uuid'],
+			'name' => $row['name'],
+			'code' => $row['code'],
+			'birth' => $row['birth'],
+			'stage' => $row['stage'],
+			'notes' => $row['notes'],
+			'log_brew' => $row['log_brew'],
+			'log_fermentation' => $row['log_fermentation'],
+			'inventory_reduced' => $row['inventory_reduced'],
+			'locked' => $row['locked'],
+			'eq_name' => $row['eq_name'],
+			'eq_notes' => $row['eq_notes'],
+			'eq_boil_size' => $row['eq_boil_size'],
+			'eq_batch_size' => $row['eq_batch_size'],
+			'eq_tun_volume' => $row['eq_tun_volume'],
+			'eq_tun_weight' => $row['eq_tun_weight'],
+			'eq_tun_specific_heat' => $row['eq_tun_specific_heat'],
+			'eq_tun_material' => $row['eq_tun_material'],
+			'eq_tun_height' => $row['eq_tun_height'],
+			'eq_top_up_water' => $row['eq_top_up_water'],
+			'eq_trub_chiller_loss' => $row['eq_trub_chiller_loss'],
+			'eq_evap_rate' => $row['eq_evap_rate'],
+			'eq_boil_time' => $row['eq_boil_time'],
+			'eq_calc_boil_volume' => $row['eq_calc_boil_volume'],
+			'eq_top_up_kettle' => $row['eq_top_up_kettle'],
+			'eq_hop_utilization' => $row['eq_hop_utilization'],
+			'eq_lauter_volume' => $row['eq_lauter_volume'],
+			'eq_lauter_height' => $row['eq_lauter_height'],
+			'eq_lauter_deadspace' => $row['eq_lauter_deadspace'],
+			'eq_kettle_volume' => $row['eq_kettle_volume'],
+			'eq_kettle_height' => $row['eq_kettle_height'],
+			'eq_mash_volume' => $row['eq_mash_volume'],
+			'eq_efficiency' => $row['eq_efficiency'],
+			'brew_date_start' => $row['brew_date_start'],
+			'brew_mash_ph' => $row['brew_mash_ph'],
+			'brew_mash_sg' => $row['brew_mash_sg'],
+			'brew_sparge_temperature' => $row['brew_sparge_temperature'],
+			'brew_sparge_volume' => $row['brew_sparge_volume'],
+			'brew_preboil_volume' => $row['brew_preboil_volume'],
+			'brew_preboil_sg' => $row['brew_preboil_sg'],
+			'brew_preboil_ph' => $row['brew_preboil_ph'],
+			'brew_aboil_volume' => $row['brew_aboil_volume'],
+			'brew_aboil_sg' => $row['brew_aboil_sg'],
+			'brew_aboil_ph' => $row['brew_aboil_ph'],
+			'brew_aboil_efficiency' => $row['brew_aboil_efficiency'],
+			'brew_cooling_method' => $row['brew_cooling_method'],
+			'brew_cooling_time' => $row['brew_cooling_time'],
+			'brew_cooling_to' => $row['brew_cooling_to'],
+			'brew_whirlpool9' => $row['brew_whirlpool9'],
+			'brew_whirlpool7' => $row['brew_whirlpool7'],
+			'brew_whirlpool6' => $row['brew_whirlpool6'],
+			'brew_whirlpool2' => $row['brew_whirlpool2'],
+			'brew_fermenter_volume' => $row['brew_fermenter_volume'],
+			'brew_fermenter_extrawater' => $row['brew_fermenter_extrawater'],
+			'brew_aeration_time' => $row['brew_aeration_time'],
+			'brew_aeration_speed' => $row['brew_aeration_speed'],
+			'brew_aeration_type' => $row['brew_aeration_type'],
+			'brew_fermenter_sg' => $row['brew_fermenter_sg'],
+			'brew_fermenter_ibu' => $row['brew_fermenter_ibu'],
+			'brew_date_end' => $row['brew_date_end'],
+			'brew_log_available' => $row['brew_log_available'],
+			'primary_start_temp' => $row['primary_start_temp'],
+			'primary_max_temp' => $row['primary_max_temp'],
+			'primary_end_temp' => $row['primary_end_temp'],
+			'primary_end_sg' => $row['primary_end_sg'],
+			'primary_end_date' => $row['primary_end_date'],
+			'secondary_temp' => $row['secondary_temp'],
+			'secondary_end_date' => $row['secondary_end_date'],
+			'tertiary_temp' => $row['tertiary_temp'],
+			'package_date' => $row['package_date'],
+			'bottle_amount' => $row['bottle_amount'],
+			'bottle_carbonation' => $row['bottle_carbonation'],
+			'bottle_priming_sugar' => $row['bottle_priming_sugar'],
+			'bottle_priming_amount' => $row['bottle_priming_amount'],
+			'bottle_carbonation_temp' => $row['bottle_carbonation_temp'],
+			'keg_amount' => $row['keg_amount'],
+			'keg_carbonation' => $row['keg_carbonation'],
+			'keg_priming_sugar' => $row['keg_priming_sugar'],
+			'keg_priming_amount' => $row['keg_priming_amount'],
+			'keg_carbonation_temp' => $row['keg_carbonation_temp'],
+			'keg_forced_carb' => $row['keg_forced_carb'],
+			'keg_pressure' => $row['keg_pressure'],
+			'keg_priming_factor' => $row['keg_priming_factor'],
+			'taste_notes' => $row['taste_notes'],
+			'taste_rate' => $row['taste_rate'],
+			'taste_date' => $row['taste_date'],
+			'taste_color' => $row['taste_color'],
+			'taste_transparency' => $row['taste_transparency'],
+			'taste_head' => $row['taste_head'],
+			'taste_aroma' => $row['taste_aroma'],
+			'taste_taste' => $row['taste_taste'],
+			'taste_mouthfeel' => $row['taste_mouthfeel'],
+			'taste_aftertaste' => $row['taste_aftertaste']
+		);
+	}
+//	syslog(LOG_NOTICE, json_encode($brews));
+	echo json_encode($brews);
+}
+?>
--- a/www/includes/global.inc.php	Wed Nov 21 21:17:18 2018 +0100
+++ b/www/includes/global.inc.php	Thu Nov 22 22:27:42 2018 +0100
@@ -184,7 +184,7 @@
      </li>
      <li>Productie
       <ul>
-       <li>In bewerking</li>
+       <li><a href="prod_inprod.php">In bewerking</a></li>
        <li>Start nieuw</li>
        <li>Archief
 	<ul>
--- a/www/inv_equipments.php	Wed Nov 21 21:17:18 2018 +0100
+++ b/www/inv_equipments.php	Thu Nov 22 22:27:42 2018 +0100
@@ -72,6 +72,7 @@
        <td><div id="lauter_height"></div></td>
        <td style="vertical-align: top; float: right;">Volume eind koken l:</td>
        <td><div id="batch_size"></div></td>
+      </tr>
       <tr>
        <td style="vertical-align: top; float: right;">Filterkuip verlies l:</td>
        <td><div id="lauter_deadspace"></div></td>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/js/prod_edit.js	Thu Nov 22 22:27:42 2018 +0100
@@ -0,0 +1,328 @@
+/*****************************************************************************
+ * Copyright (C) 2018
+ *
+ * Michiel Broek <mbroek at mbse dot eu>
+ *
+ * This file is part of BMS
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * BrewCloud is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with ThermFerm; see the file COPYING.  If not, write to the Free
+ * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *****************************************************************************/
+
+
+$(document).ready(function () {
+
+	console.log("record:" + my_record + "  return:" + my_return + "  theme:" + theme);
+
+	var dataReecord = {};
+	var url = "includes/db_product.php";
+	// tooltips
+	$("#name").jqxTooltip({ content: 'De naam voor dit product.' });
+	$("#code").jqxTooltip({ content: 'Product code nummer.' });
+	$("#birth").jqxTooltip({ content: 'De ontwerp datum van dit product.' });
+	$("#stage").jqxTooltip({ content: 'De productie fase van dit product.' });
+	$("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit product.' });
+	$("#eq_name").jqxTooltip({ content: 'The unique name of this brew equipment.' });
+	$("#eq_notes").jqxTooltip({ content: 'Some notes about the equipment.' });
+	$("#eq_tun_volume").jqxTooltip({ content: 'Mash TUN volume.' });
+	$("#eq_tun_height").jqxTooltip({ content: 'Mash TUN height in cm.' });
+	$("#eq_tun_weight").jqxTooltip({ content: 'Mash TUN weight in Kg.' });
+	$("#eq_tun_material").jqxTooltip({ content: 'Mash TUN material. Needed to calculate the right strike temperature.' });
+	$("#eq_mash_volume").jqxTooltip({ content: 'Mash water for the first step.' });
+	$("#eq_lauter_volume").jqxTooltip({ content: 'Total lauter volume.' });
+	$("#eq_lauter_height").jqxTooltip({ content: 'Height of the lauter TUN in cm.' });
+	$("#eq_lauter_deadspace").jqxTooltip({ content: 'Volume loss in the lauter TUN.' });
+	$("#eq_efficiency").jqxTooltip({ content: 'Average efficiency.' });
+	$("#eq_kettle_volume").jqxTooltip({ content: 'Boil kettle volume in liters.' });
+	$("#eq_kettle_height").jqxTooltip({ content: 'Boil kettle height in cm.' });
+	$("#eq_boil_size").jqxTooltip({ content: 'Normal boil volume in liters' });
+	$("#eq_evap_rate").jqxTooltip({ content: 'Evaporation in liters per hour.' });
+	$("#eq_boil_time").jqxTooltip({ content: 'Normal boil time in minutes.' });
+	$("#eq_top_up_kettle").jqxTooltip({ content: 'Extra water added to the boil.' });
+	$("#eq_hop_utilization").jqxTooltip({ content: '100% for smaller installations, higher for large breweries.' });
+	$("#eq_batch_size").jqxTooltip({ content: 'Calculated batch size, liters at end of the boil.' });
+	$("#eq_trub_chiller_loss").jqxTooltip({ content: 'Standard loss in liters during transfer to the fermenter.' });
+
+
+	// Prepare the data
+	var source = {
+		datatype: "json",
+		cache: false,
+		datafields: [
+			{ name: 'record', type: 'number' },
+			{ name: 'uuid', type: 'string' },
+			{ name: 'name', type: 'string' },
+			{ name: 'code', type: 'string' },
+			{ name: 'birth', type: 'string' },
+			{ name: 'stage', type: 'string' },
+			{ name: 'notes', type: 'string' },
+			{ name: 'eq_name', type: 'string' },
+			{ name: 'eq_boil_size', type: 'float' },
+			{ name: 'eq_batch_size', type: 'float' },
+			{ name: 'eq_tun_volume', type: 'float' },
+			{ name: 'eq_tun_weight', type: 'float' },
+			{ name: 'eq_trub_chiller_loss', type: 'float' },
+			{ name: 'eq_evap_rate', type: 'float' },
+			{ name: 'eq_boil_time', type: 'float' },
+			{ name: 'eq_lauter_deadspace', type: 'float' },
+			{ name: 'eq_top_up_kettle', type: 'float' },
+			{ name: 'eq_hop_utilization', type: 'float' },
+			{ name: 'eq_notes', type: 'string' },
+			{ name: 'eq_lauter_volume', type: 'float' },
+			{ name: 'eq_kettle_volume', type: 'float' },
+			{ name: 'eq_tun_material', type: 'string' },
+			{ name: 'eq_tun_height', type: 'float' },
+			{ name: 'eq_kettle_height', type: 'float' },
+			{ name: 'eq_lauter_height', type: 'float' },
+			{ name: 'eq_mash_volume', type: 'float' },
+			{ name: 'eq_efficiency', type: 'float' }
+		],
+		id: 'record',
+		url: url
+	};
+	// Load data and select one record.
+	var dataAdapter = new $.jqx.dataAdapter(source, {
+		loadComplete: function () {
+			var records = dataAdapter.records;
+			dataRecord = records[0];
+			// Hidden record uuid
+			$("#name").val(dataRecord.name);
+			$("#code").val(dataRecord.code);
+			$("#birth").val(dataRecord.birth);
+			$("#stage").val(dataRecord.stage);
+			$("#notes").val(dataRecord.notes);
+			$("#eq_name").val(dataRecord.eq_name);
+			$("#eq_boil_size").val(dataRecord.eq_boil_size);
+			$("#eq_batch_size").val(dataRecord.eq_batch_size);
+			$("#eq_tun_volume").val(dataRecord.eq_tun_volume);
+			$("#eq_tun_weight").val(dataRecord.eq_tun_weight);
+			$("#eq_trub_chiller_loss").val(dataRecord.eq_trub_chiller_loss);
+			$("#eq_evap_rate").val(dataRecord.eq_evap_rate);
+			$("#eq_boil_time").val(dataRecord.eq_boil_time);
+			$("#eq_lauter_deadspace").val(dataRecord.eq_lauter_deadspace);
+			$("#eq_top_up_kettle").val(dataRecord.eq_top_up_kettle);
+			$("#eq_hop_utilization").val(dataRecord.eq_hop_utilization);
+			$("#eq_notes").val(dataRecord.eq_notes);
+			$("#eq_lauter_volume").val(dataRecord.eq_lauter_volume);
+			$("#eq_kettle_volume").val(dataRecord.eq_kettle_volume);
+			$("#eq_tun_material").val(dataRecord.eq_tun_material);
+			$("#eq_tun_height").val(dataRecord.eq_tun_height);
+			$("#eq_kettle_height").val(dataRecord.eq_kettle_height);
+			$("#eq_lauter_height").val(dataRecord.eq_lauter_height);
+			$("#eq_mash_volume").val(dataRecord.eq_mash_volume);
+			$("#eq_efficiency").val(dataRecord.eq_efficiency);
+
+		},
+		loadError: function (jqXHR, status, error) {
+		},
+		beforeLoadComplete: function (records) {
+			var filteredRecords = [];
+			for (var i = 0; i < records.length; i++) {
+				if (records[i].record == my_record) {
+				filteredRecords.push(records[i]);
+				}
+			}
+			return filteredRecords;
+		}
+	});
+	dataAdapter.dataBind();
+
+	// initialize the input fields.
+	var srcMaterial= [ "RVS", "Aluminium", "Kunststof", "Koper" ];
+	$("#name").jqxInput({ theme: theme, width: 640, height: 23 });
+	$("#code").jqxInput({ theme: theme, width: 100, height: 23 });
+	$("#birth").jqxDateTimeInput({ theme: theme, width: 150, height: 23, formatString: 'yyyy-MM-dd' });
+	$("#stage").jqxInput({ theme: theme, width: 100, height: 23, disabled: true });
+	$("#notes").jqxInput({ theme: theme, width: 960, height: 200 });
+	$("#eq_name").jqxInput({ theme: theme, width: 250, height: 23 });
+	$("#eq_boil_size").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 });
+	$("#eq_batch_size").jqxNumberInput({ inputMode: 'simple', readOnly: 'true', theme: theme, width: 50, height: 23, min: 0, decimalDigits: 1 });
+	$("#eq_tun_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 });
+	$("#eq_tun_weight").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 2, spinButtons: true });
+	$("#eq_trub_chiller_loss").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
+	$("#eq_evap_rate").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 2, spinButtons: true, spinButtonsStep: 0.05 });
+	$("#eq_boil_time").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 0, spinButtons: true });
+	$("#eq_lauter_deadspace").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
+	$("#eq_top_up_kettle").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.1 });
+	$("#eq_hop_utilization").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 0, spinButtons: true });
+	$("#eq_notes").jqxInput({ theme: theme, width: 640, height: 100 });
+	$("#eq_lauter_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 });
+	$("#eq_kettle_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 });
+	$("#eq_tun_material").jqxDropDownList({ theme: theme, source: srcMaterial, selectedIndex: 0, width: 110, height: 23, dropDownHeight: 130 });
+	$("#eq_tun_height").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
+	$("#eq_kettle_height").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
+	$("#eq_lauter_height").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
+	$("#eq_mash_volume").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true, spinButtonsStep: 0.5 });
+	$("#eq_efficiency").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true });
+
+	$('#jqxTabs').jqxTabs({
+		theme: theme,
+		width: 1280,
+		height: 630,
+		autoHeight: false,
+		position: 'top'
+	});
+
+
+
+/*
+	//Creating wizard module
+	var wizard = (function () {
+
+		//Adding event listeners
+		var _addHandlers = function () {
+			$('#name').on('change', function (event) { wizard.validate(true); });
+			$('#nextButtonCompleted').click(function () {
+				console.log("insert start");
+				var newrow = {
+					record: -1,
+					name: $("#name").val(),
+					notes: $("#notes").val(),
+					st_name: $('#st_name').val(),
+					st_letter: $('#st_style_letter').val(),
+					mash_ph: 5.4,
+					mash_sparge_temp: 78.0
+				};
+				var data = "insert=true&return=" + my_return + "&" + $.param(newrow);
+				$.ajax({
+					dataType: 'json',
+					url: "includes/db_recipes.php",
+					cache: false,
+					data: data,
+					type: "POST",
+					success: function (data, status, xhr) {
+						// update command is executed.
+						window.location.href = my_return;
+					},
+					error: function(jqXHR, textStatus, errorThrown) {
+					}
+				});
+			});
+			$('.nextButton').click(function () {
+				wizard.validate(true);
+				$('#jqxTabs').jqxTabs('next');
+			});
+			$('.backButton').click(function () {
+				wizard.validate(true);
+				$('#jqxTabs').jqxTabs('previous');
+			});
+		};
+
+		return {
+			//Initializing the wizzard - creating all elements, adding event handlers and starting the validation
+			init: function () {
+				$('#jqxTabs').jqxTabs({
+					theme: theme,
+					height: 630,
+					width: 1280,
+					autoHeight: false,
+					position: 'top',
+					keyboardNavigation: false
+				});
+				$('#nextButtonBase').jqxButton({ theme: theme, width: 150 });
+				$('#nextButtonStyle').jqxButton({ theme: theme, width: 150});
+				$('#backButtonStyle').jqxButton({ theme: theme, width: 150});
+				$('#nextButtonCompleted').jqxButton({ theme: theme, width: 150});
+				$('#backButtonCompleted').jqxButton({ theme: theme, width: 150});
+				_addHandlers();
+				this.validate();
+				this.showHint('Validation hints.');
+			},
+
+			//Validating all wizard tabs
+			validate: function (notify) {
+				if (!this.firstTab(notify)) {
+					$('#jqxTabs').jqxTabs('disableAt', 1);
+					$('#jqxTabs').jqxTabs('disableAt', 2);
+					return;
+				} else {
+					$('#jqxTabs').jqxTabs('enableAt', 1);
+				}
+				if (!this.secondTab(notify)) {
+					$('#jqxTabs').jqxTabs('disableAt', 2);
+					return;
+				} else {
+					$('#jqxTabs').jqxTabs('enableAt', 2);
+				}
+			},
+
+			//Displaying message to the user
+			showHint: function (message, selector) {
+				if (typeof selector === 'undefined') {
+					selector = '.hint';
+				}
+				if (message === '') {
+					message = 'Ok, je mag doorgaan.';
+				}
+				$(selector).html('<strong>' + message + '</strong>');
+			},
+
+			//Validating the first tab
+			firstTab: function (notify) {
+				var name = $('#name').val(),
+				    type = $('#type').val(),
+				    boil_time = parseFloat($("#boil_time").jqxNumberInput('decimal')),
+				    est_og = parseFloat($("#est_og").jqxNumberInput('decimal')),
+				    efficiency = parseFloat($("#efficiency").jqxNumberInput('decimal')),
+				    message = '';
+				if (name.length < 3) {
+					message += 'Je moet een recept naam invullen. <br />';
+				}
+				// Check if name already exists.
+				if (type.length < 1) {
+					message += 'Je moet een brouw type kiezen. <br />';
+				}
+				if ((boil_time < 4) || (boil_time > 360)) {
+					message += 'De kooktijd moet tussen 4 en 360 minuten zijn. <br />';
+				}
+				if ((est_og < 1.010) || (est_og > 1.200)) {
+					message += 'Het OG moet tussen 1.010 en 1.500 zijn. <br />';
+				}
+				if ((efficiency < 35) || (efficiency > 95)) {
+					message += 'Het brouwzaal rendement moet tussen 35 en 95 zijn. <br />';
+				}
+				if (message !== '') {
+					if (notify) {
+						this.showHint(message, '#hintBase');
+					}
+					return false;
+				}
+				this.showHint('Ok, je mag doorgaan.', '#hintBase');
+				return true;
+			},
+
+			//Validating the second tab
+			secondTab: function (notify) {
+				var stylesel = $('#styleSelect').val(),
+				    message = '';
+				if (stylesel.length < 3) {
+					message += 'Je moet een bierstijl kiezen. <br />';
+				}
+				if (message !== '') {
+					if (notify) {
+						this.showHint(message, '#hintStyle');
+					}
+					return false;
+				}
+				this.showHint('Ok, je mag doorgaan.', '#hintStyle');
+				return true;
+			}
+		}
+	} ());
+*/
+	//Initializing the wizard
+//	wizard.init();
+
+});
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/js/prod_inprod.js	Thu Nov 22 22:27:42 2018 +0100
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (C) 2018
+ *
+ * Michiel Broek <mbroek at mbse dot eu>
+ *
+ * This file is part of BMS
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * BrewCloud is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with ThermFerm; see the file COPYING.  If not, write to the Free
+ * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *****************************************************************************/
+
+
+$(document).ready(function () {
+	var source = {
+		datatype: "json",
+		cache: false,
+		datafields: [
+			{ name: 'record', type: 'number' },
+			{ name: 'name', type: 'string' },
+			{ name: 'code', type: 'string' },
+			{ name: 'birth', type: 'string' },
+			{ name: 'stage', type: 'string' },
+		],
+		id: 'record',
+		url: "includes/db_product.php?select=inprod"
+	};
+	var dataAdapter = new $.jqx.dataAdapter(source);
+	// initialize jqxGrid
+	$("#jqxgrid").jqxGrid({
+		width: 1280,
+		height: 630,
+		source: dataAdapter,
+		theme: theme,
+		showstatusbar: true,
+		localization: getLocalization(),
+		renderstatusbar: function (statusbar) {
+			var container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
+			var addButton = $("<div style='float: right; margin-right: 15px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Add</span></div>");
+			container.append(addButton);
+			statusbar.append(container);
+			addButton.jqxButton({ theme: theme, width: 120, height: 20 });
+			// add new recipe.
+			addButton.click(function (event) {
+				var url= "prod_new.php?return=prod_inprod.php";
+				window.location.href = url;
+			});
+		},
+		filterable: true,
+		filtermode: 'excel',
+		columns: [
+			{ text: 'Datum', datafield: 'birth', width: 120 },
+			{ text: 'Code', datafield: 'code', width: 120 },
+			{ text: 'Naam', datafield: 'name' },
+			{ text: 'Fase', datafield: 'stage', width: 150 },
+			{ text: 'Wijzig', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function () {
+				return "Wijzig";
+				}, buttonclick: function (row) {
+					var datarecord = dataAdapter.records[row];
+					var url= "prod_edit.php?record=" + datarecord.record + "&select=inprod&return=prod_inprod.php";
+					window.location.href = url;
+				}
+			}
+		],
+	});
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/js/prod_new.js	Thu Nov 22 22:27:42 2018 +0100
@@ -0,0 +1,171 @@
+/*****************************************************************************
+ * Copyright (C) 2018
+ *
+ * Michiel Broek <mbroek at mbse dot eu>
+ *
+ * This file is part of BMS
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * BrewCloud is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with ThermFerm; see the file COPYING.  If not, write to the Free
+ * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *****************************************************************************/
+
+
+$(document).ready(function () {
+
+	// tooltips
+	$("#name").jqxTooltip({ content: 'De naam voor dit recept.' });
+	$("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit recept.' });
+
+	// editers
+	var srcType = [ "All Grain", "Partial Mash", "Extract" ];
+	$("#name").jqxInput({ theme: theme, width: 640, height: 23 });
+	$("#notes").jqxInput({ theme: theme, width: 960, height: 200 });
+
+	//Creating wizard module
+	var wizard = (function () {
+
+		//Adding event listeners
+		var _addHandlers = function () {
+			$('#name').on('change', function (event) { wizard.validate(true); });
+			$('#nextButtonCompleted').click(function () {
+				console.log("insert start");
+				var newrow = {
+					record: -1,
+					name: $("#name").val(),
+					notes: $("#notes").val(),
+				};
+				var data = "insert=true&return=" + my_return + "&" + $.param(newrow);
+				$.ajax({
+					dataType: 'json',
+					url: "includes/db_product.php",
+					cache: false,
+					data: data,
+					type: "POST",
+					success: function (data, status, xhr) {
+						// update command is executed.
+						window.location.href = my_return;
+					},
+					error: function(jqXHR, textStatus, errorThrown) {
+					}
+				});
+			});
+			$('.nextButton').click(function () {
+				wizard.validate(true);
+				$('#jqxTabs').jqxTabs('next');
+			});
+			$('.backButton').click(function () {
+				wizard.validate(true);
+				$('#jqxTabs').jqxTabs('previous');
+			});
+		};
+
+		return {
+			//Initializing the wizzard - creating all elements, adding event handlers and starting the validation
+			init: function () {
+				$('#jqxTabs').jqxTabs({
+					theme: theme,
+					height: 630,
+					width: 1280,
+					autoHeight: false,
+					position: 'top',
+					keyboardNavigation: false
+				});
+				$('#nextButtonBase').jqxButton({ theme: theme, width: 150 });
+				$('#nextButtonStyle').jqxButton({ theme: theme, width: 150});
+				$('#backButtonStyle').jqxButton({ theme: theme, width: 150});
+				$('#nextButtonCompleted').jqxButton({ theme: theme, width: 150});
+				$('#backButtonCompleted').jqxButton({ theme: theme, width: 150});
+				_addHandlers();
+				this.validate();
+				this.showHint('Validation hints.');
+			},
+
+			//Validating all wizard tabs
+			validate: function (notify) {
+				if (!this.firstTab(notify)) {
+					$('#jqxTabs').jqxTabs('disableAt', 1);
+					$('#jqxTabs').jqxTabs('disableAt', 2);
+					return;
+				} else {
+					$('#jqxTabs').jqxTabs('enableAt', 1);
+				}
+				if (!this.secondTab(notify)) {
+					$('#jqxTabs').jqxTabs('disableAt', 2);
+					return;
+				} else {
+					$('#jqxTabs').jqxTabs('enableAt', 2);
+				}
+			},
+
+			//Displaying message to the user
+			showHint: function (message, selector) {
+				if (typeof selector === 'undefined') {
+					selector = '.hint';
+				}
+				if (message === '') {
+					message = 'Ok, je mag doorgaan.';
+				}
+				$(selector).html('<strong>' + message + '</strong>');
+			},
+
+			//Validating the first tab
+			firstTab: function (notify) {
+				var name = $('#name').val(),
+				    message = '';
+				if (name.length < 3) {
+					message += 'Je moet een recept naam invullen. <br />';
+				}
+				// Check if name already exists.
+				//if ((boil_time < 4) || (boil_time > 360)) {
+				//	message += 'De kooktijd moet tussen 4 en 360 minuten zijn. <br />';
+				//}
+				//if ((est_og < 1.010) || (est_og > 1.200)) {
+				//	message += 'Het OG moet tussen 1.010 en 1.500 zijn. <br />';
+				//}
+				//if ((efficiency < 35) || (efficiency > 95)) {
+				//	message += 'Het brouwzaal rendement moet tussen 35 en 95 zijn. <br />';
+				//}
+				if (message !== '') {
+					if (notify) {
+						this.showHint(message, '#hintBase');
+					}
+					return false;
+				}
+				this.showHint('Ok, je mag doorgaan.', '#hintBase');
+				return true;
+			},
+
+			//Validating the second tab
+			secondTab: function (notify) {
+				var stylesel = $('#styleSelect').val(),
+				    message = '';
+				if (stylesel.length < 3) {
+					message += 'Je moet een bierstijl kiezen. <br />';
+				}
+				if (message !== '') {
+					if (notify) {
+						this.showHint(message, '#hintStyle');
+					}
+					return false;
+				}
+				this.showHint('Ok, je mag doorgaan.', '#hintStyle');
+				return true;
+			}
+		}
+	} ());
+
+	//Initializing the wizard
+	wizard.init();
+});
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/prod_edit.php	Thu Nov 22 22:27:42 2018 +0100
@@ -0,0 +1,148 @@
+<?php
+require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
+page_header('Brouw overzicht', 'prod_edit');
+?>
+
+   <div id='jqxTabs'>
+    <ul>
+     <li style="margin-left: 30px;">Algemeen</li>
+     <li>Apparatuur</li>
+     <li>Brouwdag</li>
+    </ul>
+
+    <div class="section">
+     <div style="overflow: hidden;">
+      <table style="width: 100%;">
+       <tr>
+        <td style="vertical-align: top;">
+         <table>
+          <tr>
+           <td style="vertical-align: top; float: right; padding: 3px;">Brouw naam:</td>
+           <td align="left" colspan="5" style="vertical-align: top; padding: 3px;"><input id="name" /></td>
+          </tr>
+          <tr>
+           <td style="vertical-align: top; float: right; padding: 3px;">Brouw code:</td>
+           <td align="left" style="vertical-align: top; padding: 3px;"><input id="code" /></td>
+           <td style="vertical-align: top; float: right; padding: 3px;">Start planning:</td>
+           <td align="left" style="vertical-align: top;"><div id="birth"></div></td>
+           <td style="vertical-align: top; float: right; padding: 3px;">Brouw fase:</td>
+           <td align="left" style="vertical-align: top; padding: 3px;"><input id="stage" /></td>
+          <tr>
+           <td style="vertical-align: top; float: right; padding: 3px;">Opmerkingen:</td>
+           <td colspan="5" style="padding: 3px;"><textarea id="notes"></textarea></td>
+          </tr>
+	 </table>
+        </td>
+        <td style="vertical-align: top;">
+         <table>
+	  <tr><td><input style="margin-right: 10px;" type="button" id="Klop1"  value="Knop 1" /></td></tr>
+          <tr><td><input style="margin-right: 10px;" type="button" id="Knop2"  value="Knop 2" /></td></tr>
+          <tr><td><input style="margin-right: 10px;" type="button" id="Knop3"  value="Knop 3" /></td></tr>
+         </table>
+        </td>
+       </tr>
+      </table>
+     </div>
+     <div id="hintBase" class="hint">
+     </div>
+    </div>
+
+    <div class="section"> <!-- Tab 2 -->
+     <div style="overflow: hidden;">
+      <table>
+       <tr>
+	<td align="right" style="vertical-align: top;">Kies apparatuur:</td>
+        <td align="left" colspan="3"><div id="styleSelect">Apparatuur</div></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right; padding: 3px;">Installatie naam:</td>
+        <td align="left" colspan="3" style="vertical-align: top; padding: 3px;"><input id="eq_name" /></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right; padding: 3px;">Opmerkingen:</td>
+        <td colspan="5" style="padding: 3px;"><textarea id="eq_notes"></textarea></td>
+       </tr>
+       <tr>
+        <th style="text-align: center;" colspan="2">Maischen</th>
+        <th style="text-align: center;" colspan="2">Koken</th>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right;">Maischkuip volume l:</td>
+        <td><div id="eq_tun_volume"></div></td>
+        <td style="vertical-align: top; float: right;">Kookketel volume l:</td>
+        <td><div id="eq_kettle_volume"></div></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right;">Maischkuip hoogte cm:</td>
+        <td><div id="eq_tun_height"></div></td>
+        <td style="vertical-align: top; float: right;">Kookketel hoogte cm:</td>
+        <td><div id="eq_kettle_height"></div></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right;">Maischkuip gewicht kg:</td>
+        <td><div id="eq_tun_weight"></div></td>
+        <td style="vertical-align: top; float: right;">Kook volume l:</td>
+        <td><div id="eq_boil_size"></div></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right;">Maischkuip materiaal:</td>
+        <td><div id="eq_tun_material"></div></td>
+        <td style="vertical-align: top; float: right;">Verdamping per uur l:</td>
+        <td><div id="eq_evap_rate"></div></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right;">Maischwater l:</td>
+        <td><div id="eq_mash_volume"></div></td>
+        <td style="vertical-align: top; float: right;">Kooktijd in minuten:</td>
+        <td><div id="eq_boil_time"></div></td>
+       </tr>
+       <tr>
+        <th style="text-align: center;" colspan="2">Filteren</th>
+        <td style="vertical-align: top; float: right;">Extra water bij koken l:</td>
+        <td><div id="eq_top_up_kettle"></div></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right;">Filter volume l:</td>
+        <td><div id="eq_lauter_volume"></div></td>
+        <td style="vertical-align: top; float: right;">Hopfactor %:</td>
+        <td><div id="eq_hop_utilization"></div></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right;">Filterkuip hoogte cm:</td>
+        <td><div id="eq_lauter_height"></div></td>
+        <td style="vertical-align: top; float: right;">Volume eind koken l:</td>
+	<td><div id="eq_batch_size"></div></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right;">Filterkuip verlies l:</td>
+        <td><div id="eq_lauter_deadspace"></div></td>
+        <th style="text-align: center;" colspan="2">Koelen</th>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right;">Brouwzaalrendement %:</td>
+        <td><div id="eq_efficiency"></div></td>
+        <td style="vertical-align: top; float: right;">Trub verlies kookketel l:</td>
+        <td><div id="eq_trub_chiller_loss"></div></td>
+       </tr>
+      </table>
+     </div>
+     <div class="hint" id="hintStyle">
+     </div>
+    </div>
+
+    <div class="section"> <!-- Tab 3 -->
+     <div style="overflow: hidden; margin: 25px;"><br>
+      <p>Alle nodige gegevens zijn compleet.</p>
+      <p> Zodra je de "Volgende" toets gebruikt zal een nieuw recept aangemaakt worden en<br>
+      wordt het recept in de database gezet. Hierna kun je dat recept bewerken.</p>
+     </div>
+     <div id="completedButtonsWrapper">
+      <input type="button" value="Terug" id="backButtonCompleted" class="backButton" />
+      <input type="button" value="Volgende" class="nextButton" id="nextButtonCompleted" />
+     </div>
+    </div>
+   </div>
+
+<?php
+page_footer();
+?>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/prod_inprod.php	Thu Nov 22 22:27:42 2018 +0100
@@ -0,0 +1,14 @@
+<?php
+require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
+page_header('Producten in bewerking', 'prod_inprod');
+?>
+
+   <div id="jqxgrid"></div>
+    <div style="margin-top: 30px;">
+    <div id="cellbegineditevent"></div>
+    <div style="margin-top: 10px;" id="cellendeditevent"></div>
+   </div>
+
+<?php
+page_footer();
+?>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/prod_new.php	Thu Nov 22 22:27:42 2018 +0100
@@ -0,0 +1,77 @@
+<?php
+require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
+page_header('Nieuw product', 'prod_new');
+?>
+
+   <div id='jqxTabs'>
+    <ul>
+     <li style="margin-left: 30px;">Product basis</li>
+     <li>Apparatuur</li>
+     <li>Overzicht</li>
+    </ul>
+
+    <div class="section">
+     <div style="overflow: hidden;">
+      <table>
+       <tr>
+        <td style="vertical-align: top; float: right; padding: 3px;">Recept naam:</td>
+        <td align="left" colspan="3" style="vertical-align: top; padding: 3px;"><input id="name" /></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right; padding: 3px;">Opmerkingen:</td>
+        <td colspan="3" style="padding: 3px;"><textarea id="notes"></textarea></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right; padding: 3px;">Brouw type:</td>
+	<td align="left" style="padding: 3px;"><div id="type"></div></td>
+        <td style="vertical-align: top; float: right; padding: 3px;">Start SG:</td>
+        <td style="padding: 3px;"><div style="float: left;" id="est_og"></div></td>
+       </tr>
+       <tr>
+        <td style="vertical-align: top; float: right; padding: 3px;">Kooktijd minuten:</td>
+        <td style="padding: 3px;"><div id="boil_time"></div></td>
+        <td style="vertical-align: top; float: right; padding: 3px;">Brouwzaal rendement:</td>
+        <td style="padding: 3px;"><div id="efficiency"></div></td>
+       </tr>
+      </table>
+     </div>
+     <div id="hintBase" class="hint">
+     </div>
+     <div id="baseButtonsWrapper">
+      <input type="button" value="Volgende" class="nextButton" id="nextButtonBase" />
+     </div>
+    </div>
+
+    <div class="section">
+     <div style="overflow: hidden;">
+      <table>
+       <tr>
+	<td align="right" style="vertical-align: top;">Kies stijl:</td>
+        <td align="left" colspan="3"><div id="styleSelect">Stylenlijst</div></td>
+       </tr>
+      </table>
+     </div>
+     <div class="hint" id="hintStyle">
+     </div>
+     <div id="styleButtonsWrapper">
+      <input type="button" value="Terug" class="backButton" id="backButtonStyle" />
+      <input type="button" value="Volgende" class="nextButton" id="nextButtonStyle" />
+     </div>
+    </div>
+
+    <div class="section">
+     <div style="overflow: hidden; margin: 25px;"><br>
+      <p>Alle nodige gegevens zijn compleet.</p>
+      <p> Zodra je de "Volgende" toets gebruikt zal een nieuw recept aangemaakt worden en<br>
+      wordt het recept in de database gezet. Hierna kun je dat recept bewerken.</p>
+     </div>
+     <div id="completedButtonsWrapper">
+      <input type="button" value="Terug" id="backButtonCompleted" class="backButton" />
+      <input type="button" value="Volgende" class="nextButton" id="nextButtonCompleted" />
+     </div>
+    </div>
+   </div>
+
+<?php
+page_footer();
+?>

mercurial