www/includes/db_inventory_equipments.php

changeset 116
ac993ef43b13
parent 115
ad31f4bd4036
child 149
ff45488d480e
--- a/www/includes/db_inventory_equipments.php	Thu Nov 29 23:21:42 2018 +0100
+++ b/www/includes/db_inventory_equipments.php	Fri Nov 30 17:40:39 2018 +0100
@@ -22,21 +22,11 @@
 	}
 	$sql .=    "name='" . mysqli_real_escape_string($connect, $_GET['name']);
 	$sql .= "', boil_size='" . $_GET['boil_size'];
-	$batch = '$_GET[\'boil_size\'] - ($_GET[\'evap_rate\'] * ($_GET[\'boil_time\'] / 60))';
-	$sql .= "', batch_size='" . eval('return ' . $batch . ';');
+	$sql .= "', batch_size='" . $_GET['batch_size'];
 	$sql .= "', tun_volume='" . $_GET['tun_volume'];
 	$sql .= "', tun_weight='" . $_GET['tun_weight'];
-	$material = mysqli_real_escape_string($connect, $_GET['tun_material']);
-	if ($material == "RVS") {
-		$sql .= "', tun_specific_heat='0.11";
-	} else if ($material == "Aluminium") {
-		$sql .= "', tun_specific_heat='0.22";
-	} else if ($material == "Kunststof") {
-		$sql .= "', tun_specific_heat='0.46";
-	} else if ($material == "Koper") {
-		$sql .= "', tun_specific_heat='0.092";
-	}
-	$sql .= "', tun_material='" . $material;
+	$sql .= "', tun_specific_heat='" .  $_GET['tun_specific_heat'];
+	$sql .= "', tun_material='" . mysqli_real_escape_string($connect, $_GET['tun_material']);
 	$sql .= "', tun_height='" . $_GET['tun_height'] / 100.0;
 	$sql .= "', top_up_water='" . $_GET['top_up_water'];
 	$sql .= "', trub_chiller_loss='" . $_GET['trub_chiller_loss'];
@@ -57,7 +47,7 @@
 		$sql .= "';";
 	}
 	if (isset($_GET['update'])) {
-	$sql .= "' WHERE record='" . $_GET['record'] . "';";
+		$sql .= "' WHERE record='" . $_GET['record'] . "';";
 	}
 	$result = mysqli_query($connect, $sql);
 	if (! $result) {

mercurial