1288 $sql .= "', brew_aeration_time='" . floatval($recipe->AERATION_TIME); |
1288 $sql .= "', brew_aeration_time='" . floatval($recipe->AERATION_TIME); |
1289 } |
1289 } |
1290 $sql .= "', brew_date_end='" . $date_end; |
1290 $sql .= "', brew_date_end='" . $date_end; |
1291 } |
1291 } |
1292 |
1292 |
|
1293 $sql .= "', og='" . floatval($recipe->OG); |
|
1294 $sql .= "', fg='" . floatval($recipe->FG); |
|
1295 |
1293 if ($recipe->PRIMARY_AGE && ($stageno >= 3)) { |
1296 if ($recipe->PRIMARY_AGE && ($stageno >= 3)) { |
1294 /* PRIMARY_TEMP is the average of START_TEMP_PRIMARY MAX_TEMP_PRIMARY END_TEMP_PRIMARY */ |
1297 /* PRIMARY_TEMP is the average of START_TEMP_PRIMARY MAX_TEMP_PRIMARY END_TEMP_PRIMARY */ |
1295 $pdate = new DateTime($brewdate); |
1298 $pdate = new DateTime($brewdate); |
1296 $pdate->modify("+".floatval($recipe->PRIMARY_AGE)." days"); |
1299 $pdate->modify("+".floatval($recipe->PRIMARY_AGE)." days"); |
1297 $sql .= "', primary_start_temp='" . floatval($recipe->START_TEMP_PRIMARY); |
1300 $sql .= "', primary_start_temp='" . floatval($recipe->START_TEMP_PRIMARY); |
1341 } |
1344 } |
1342 |
1345 |
1343 if ($recipe->AMOUNT_BOTTLING && $recipe->AMOUNT_PRIMING) { |
1346 if ($recipe->AMOUNT_BOTTLING && $recipe->AMOUNT_PRIMING) { |
1344 $sql .= "', bottle_amount='" . floatval($recipe->AMOUNT_BOTTLING); |
1347 $sql .= "', bottle_amount='" . floatval($recipe->AMOUNT_BOTTLING); |
1345 $sql .= "', bottle_carbonation='" . floatval($recipe->CARBONATION); |
1348 $sql .= "', bottle_carbonation='" . floatval($recipe->CARBONATION); |
1346 $sql .= "', bottle_priming_sugar='" . mysqli_real_escape_string($db, $recipe->PRIMING_SUGAR_BOTTLES); |
1349 if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose") |
|
1350 $sql .= "', bottle_priming_sugar='Kristalsuiker"; |
|
1351 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose") |
|
1352 $sql .= "', bottle_priming_sugar='Glucose/dextrose"; |
|
1353 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey") |
|
1354 $sql .= "', bottle_priming_sugar='Honing"; |
|
1355 else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME") |
|
1356 $sql .= "', bottle_priming_sugar='Moutextract"; |
|
1357 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis") |
|
1358 $sql .= "', bottle_priming_sugar='Melasse"; |
1347 $sql .= "', bottle_priming_amount='" . floatval($recipe->AMOUNT_PRIMING); |
1359 $sql .= "', bottle_priming_amount='" . floatval($recipe->AMOUNT_PRIMING); |
1348 $sql .= "', bottle_carbonation_temp='" . floatval($recipe->CARBONATION_TEMP); |
1360 $sql .= "', bottle_carbonation_temp='" . floatval($recipe->CARBONATION_TEMP); |
1349 } |
1361 } |
1350 if ($recipe->AMOUNT_KEGGED && $recipe->AMOUNT_PRIMING_KEGS) { |
1362 if ($recipe->AMOUNT_KEGGED && $recipe->AMOUNT_PRIMING_KEGS) { |
1351 $sql .= "', keg_amount='" . floatval($recipe->AMOUNT_KEGGED); |
1363 $sql .= "', keg_amount='" . floatval($recipe->AMOUNT_KEGGED); |
1352 $sql .= "', keg_carbonation='" . floatval($recipe->CARBONATION); // Lijkt wel hetzelfde als bottles |
1364 $sql .= "', keg_carbonation='" . floatval($recipe->CARBONATION); // Lijkt wel hetzelfde als bottles |
1353 $sql .= "', keg_priming_sugar='" . mysqli_real_escape_string($db, $recipe->PRIMING_SUGAR_KEGS); |
1365 if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose") |
|
1366 $sql .= "', keg_priming_sugar='Kristalsuiker"; |
|
1367 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose") |
|
1368 $sql .= "', keg_priming_sugar='Glucose/dextrose"; |
|
1369 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey") |
|
1370 $sql .= "', keg_priming_sugar='Honing"; |
|
1371 else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME") |
|
1372 $sql .= "', keg_priming_sugar='Moutextract"; |
|
1373 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis") |
|
1374 $sql .= "', keg_priming_sugar='Melasse"; |
1354 $sql .= "', keg_priming_amount='" . floatval($recipe->AMOUNT_PRIMING_KEGS); |
1375 $sql .= "', keg_priming_amount='" . floatval($recipe->AMOUNT_PRIMING_KEGS); |
1355 $sql .= "', keg_carbonation_temp='" . floatval($recipe->KEG_CARB_TEMP); |
1376 $sql .= "', keg_carbonation_temp='" . floatval($recipe->KEG_CARB_TEMP); |
1356 ($recipe->FORCED_CARB_KEGS == 'TRUE') ? $sql .= "', keg_forced_carb='1" : $sql .= "', keg_forced_carb='0"; |
1377 ($recipe->FORCED_CARB_KEGS == 'TRUE') ? $sql .= "', keg_forced_carb='1" : $sql .= "', keg_forced_carb='0"; |
1357 $sql .= "', keg_pressure='" . floatval($recipe->KEG_PRESSURE); |
1378 $sql .= "', keg_pressure='" . floatval($recipe->KEG_PRESSURE); |
1358 $sql .= "', keg_priming_factor='" . floatval($recipe->KEG_PRIMING_FACTOR); |
|
1359 } |
1379 } |
1360 } |
1380 } |
1361 |
1381 |
1362 if ($recipe->TASTE_NOTES && $recipe->TASTING_RATE && $recipe->TASTE_DATE && ($stageno >= 9)) { |
1382 if ($recipe->TASTE_NOTES && $recipe->TASTING_RATE && $recipe->TASTE_DATE && ($stageno >= 9)) { |
1363 $stage = "Ready"; // Ready if tasted. |
1383 $stage = "Ready"; // Ready if tasted. |