1503 } |
1528 } |
1504 $count = mysqli_affected_rows($db); |
1529 $count = mysqli_affected_rows($db); |
1505 if ($count > 0) { |
1530 if ($count > 0) { |
1506 $sql .= "', log_brew='1"; |
1531 $sql .= "', log_brew='1"; |
1507 } |
1532 } |
1508 $lsql = "UPDATE log_fermentation SET product_uuid='".$uuid."', product_name='".mysqli_real_escape_string($db, $recipe->NAME); |
1533 |
1509 $lsql .= "' WHERE product_code='".mysqli_real_escape_string($db, $recipe->NR_RECIPE)."';"; |
1534 $filename = '../log/fermentation/'.$recipe->NR_RECIPE.' '.$recipe->NAME.'.log'; |
1510 if (! $result = mysqli_query($db, $lsql)) { |
1535 if (file_exists($filename)) { |
1511 printf("Error: %s\n", mysqli_error($db)); |
|
1512 } |
|
1513 $count = mysqli_affected_rows($db); |
|
1514 if ($count > 0) { |
|
1515 $sql .= "', log_fermentation='1"; |
1536 $sql .= "', log_fermentation='1"; |
1516 } else { |
1537 } else { |
1517 // See if there really are no records |
1538 if ($recipe->FERM_MEASUREMENTS) { |
1518 $lsql = "SELECT product_code FROM log_fermentation WHERE product_code='".$recipe->NR_RECIPE."';"; |
1539 /* |
1519 $count = mysqli_affected_rows($db); |
1540 * There is internal logdata in the xml, create a logfile |
1520 if ($count > 0) { |
1541 */ |
|
1542 $fp = fopen($filename, "w+"); |
|
1543 foreach ($recipe->FERM_MEASUREMENTS->FERM_MEASUREMENT as $measurement) { |
|
1544 $dt = substr($measurement->DATE_TIME, 6, 4).substr($measurement->DATE_TIME,2,4).substr($measurement->DATE_TIME,0,2); |
|
1545 $dt .= ' '.substr($measurement->DATE_TIME, 11,8); |
|
1546 $line = $dt.',NONE,PRIMARY,'; |
|
1547 $line .= sprintf("%.1f",floatval($measurement->TEMP_SENSOR_1)) .','; |
|
1548 $line .= sprintf("%.1f",floatval($measurement->TEMP_SENSOR_2)) .','; |
|
1549 $line .= 'NA,NA,NA,NA,NA,NA,NA,NA,' . PHP_EOL; |
|
1550 fwrite($fp, $line); |
|
1551 } |
|
1552 fclose($fp); |
1521 $sql .= "', log_fermentation='1"; |
1553 $sql .= "', log_fermentation='1"; |
|
1554 } else { |
|
1555 $sql .= "', log_fermentation='0"; |
1522 } |
1556 } |
1523 } |
|
1524 |
|
1525 /* |
|
1526 * If no external fermentation log is found, check for an internal one. |
|
1527 */ |
|
1528 if (($count == 0) && $recipe->FERM_MEASUREMENTS) { |
|
1529 $lsql = "DELETE FROM log_fermentation WHERE product_code='".mysqli_real_escape_string($db, $recipe->NR_RECIPE)."';"; |
|
1530 if (! $lresult = mysqli_query($db, $lsql)) { |
|
1531 printf("Error: %s\n", mysqli_error($db)); |
|
1532 } |
|
1533 foreach ($recipe->FERM_MEASUREMENTS->FERM_MEASUREMENT as $measurement) { |
|
1534 $dt = substr($measurement->DATE_TIME, 6, 4).substr($measurement->DATE_TIME,2,4).substr($measurement->DATE_TIME,0,2); |
|
1535 $dt .= ' '.substr($measurement->DATE_TIME, 11,8); |
|
1536 $lsql = "INSERT INTO log_fermentation SET product_uuid='".$uuid; |
|
1537 $lsql .= "', product_code='" . mysqli_real_escape_string($db, $recipe->NR_RECIPE); |
|
1538 $lsql .= "', product_name='" . mysqli_real_escape_string($db, $recipe->NAME); |
|
1539 $lsql .= "', datetime='" . $dt; |
|
1540 $lsql .= "', temperature_air='" . floatval($measurement->TEMP_SENSOR_1); |
|
1541 $lsql .= "', temperature_beer='" . floatval($measurement->TEMP_SENSOR_2); |
|
1542 $lsql .= "';"; |
|
1543 if (! $lresult = mysqli_query($db, $lsql)) { |
|
1544 printf("Error: %s\n", mysqli_error($db)); |
|
1545 } |
|
1546 } |
|
1547 $sql .= "', log_fermentation='1"; |
|
1548 } |
1557 } |
1549 |
1558 |
1550 if ($recipe->EQUIPMENT) { |
1559 if ($recipe->EQUIPMENT) { |
1551 $sql .= "', eq_name='" . mysqli_real_escape_string($db, $recipe->EQUIPMENT->NAME); |
1560 $sql .= "', eq_name='" . mysqli_real_escape_string($db, $recipe->EQUIPMENT->NAME); |
1552 $sql .= "', eq_notes='" . mysqli_real_escape_string($db, $recipe->EQUIPMENT->NOTES); |
1561 $sql .= "', eq_notes='" . mysqli_real_escape_string($db, $recipe->EQUIPMENT->NOTES); |
1553 $sql .= "', eq_boil_size='" . floatval($recipe->EQUIPMENT->BOIL_SIZE); |
1562 $sql .= "', eq_boil_size='" . floatval($recipe->EQUIPMENT->BOIL_SIZE); |
1554 $sql .= "', eq_batch_size='" . floatval($recipe->EQUIPMENT->BATCH_SIZE); |
1563 $sql .= "', eq_batch_size='" . floatval($recipe->EQUIPMENT->BATCH_SIZE); |
1555 $sql .= "', eq_tun_volume='" . floatval($recipe->EQUIPMENT->TUN_VOLUME); |
1564 $sql .= "', eq_tun_volume='" . floatval($recipe->EQUIPMENT->TUN_VOLUME); |
1556 $sql .= "', eq_tun_weight='" . floatval($recipe->EQUIPMENT->TUN_WEIGHT); |
1565 $sql .= "', eq_tun_weight='" . floatval($recipe->EQUIPMENT->TUN_WEIGHT); |
1557 $sql .= "', eq_tun_specific_heat='" . floatval($recipe->EQUIPMENT->TUN_SPECIFIC_HEAT); |
1566 $sql .= "', eq_tun_specific_heat='" . floatval($recipe->EQUIPMENT->TUN_SPECIFIC_HEAT); |
1558 $sql .= "', eq_tun_material='" . mysqli_real_escape_string($db, $recipe->EQUIPMENT->TUN_MATERIAL); |
1567 $sql .= "', eq_tun_material='" . $recipe->EQUIPMENT->TUN_MATERIAL; |
1559 $sql .= "', eq_tun_height='" . floatval($recipe->EQUIPMENT->TUN_HEIGHT); |
1568 $sql .= "', eq_tun_height='" . floatval($recipe->EQUIPMENT->TUN_HEIGHT); |
1560 if ($recipe->EQUIPMENT->TOP_UP_WATER) |
1569 if ($recipe->EQUIPMENT->TOP_UP_WATER) |
1561 $sql .= "', eq_top_up_water='" . floatval($recipe->EQUIPMENT->TOP_UP_WATER); |
1570 $sql .= "', eq_top_up_water='" . floatval($recipe->EQUIPMENT->TOP_UP_WATER); |
1562 $sql .= "', eq_trub_chiller_loss='" . floatval($recipe->EQUIPMENT->TRUB_CHILLER_LOSS); |
1571 $sql .= "', eq_trub_chiller_loss='" . floatval($recipe->EQUIPMENT->TRUB_CHILLER_LOSS); |
1563 /* |
1572 /* |
1621 if ($recipe->PH_AFTER_BOIL) |
1628 if ($recipe->PH_AFTER_BOIL) |
1622 $sql .= "', brew_aboil_ph='" . floatval($recipe->PH_AFTER_BOIL); |
1629 $sql .= "', brew_aboil_ph='" . floatval($recipe->PH_AFTER_BOIL); |
1623 if ($recipe->ACTUAL_EFFICIENCY) |
1630 if ($recipe->ACTUAL_EFFICIENCY) |
1624 $sql .= "', brew_aboil_efficiency='" . floatval($recipe->ACTUAL_EFFICIENCY); |
1631 $sql .= "', brew_aboil_efficiency='" . floatval($recipe->ACTUAL_EFFICIENCY); |
1625 $sql .= "', brew_whirlpool2='" . floatval($recipe->WHIRLPOOL_TIME); |
1632 $sql .= "', brew_whirlpool2='" . floatval($recipe->WHIRLPOOL_TIME); |
1626 $sql .= "', brew_cooling_method='" . mysqli_real_escape_string($db, $recipe->COOLING_METHOD); |
1633 |
|
1634 if ($recipe->COOLING_METHOD == '-') |
|
1635 $sql .= "', brew_cooling_method='0"; |
|
1636 else if ($recipe->COOLING_METHOD == 'Emersion chiller') |
|
1637 $sql .= "', brew_cooling_method='1"; |
|
1638 else if ($recipe->COOLING_METHOD == 'Counterflow chiller') |
|
1639 $sql .= "', brew_cooling_method='2"; |
|
1640 else if ($recipe->COOLING_METHOD == 'Au bain marie') |
|
1641 $sql .= "', brew_cooling_method='3"; |
|
1642 else if ($recipe->COOLING_METHOD == 'Natural') |
|
1643 $sql .= "', brew_cooling_method='4"; |
|
1644 else |
|
1645 echo "Unknown COOLING_METHOD " . $recipe->COOLING_METHOD . PHP_EOL; |
1627 $sql .= "', brew_cooling_time='" . floatval($recipe->COOLING_TIME); |
1646 $sql .= "', brew_cooling_time='" . floatval($recipe->COOLING_TIME); |
1628 $sql .= "', brew_cooling_to='" . floatval($recipe->COOLING_TO); |
1647 $sql .= "', brew_cooling_to='" . floatval($recipe->COOLING_TO); |
1629 if ($recipe->VOLUME_FERMENTER) |
1648 if ($recipe->VOLUME_FERMENTER) |
1630 $sql .= "', brew_fermenter_volume='" . floatval($recipe->VOLUME_FERMENTER); |
1649 $sql .= "', brew_fermenter_volume='" . floatval($recipe->VOLUME_FERMENTER); |
1631 if ($recipe->EQUIPMENT->TOP_UP_WATER_BREWDAY) |
1650 if ($recipe->EQUIPMENT->TOP_UP_WATER_BREWDAY) |
1632 $sql .= "', brew_fermenter_extrawater='" . floatval($recipe->EQUIPMENT->TOP_UP_WATER_BREWDAY); |
1651 $sql .= "', brew_fermenter_extrawater='" . floatval($recipe->EQUIPMENT->TOP_UP_WATER_BREWDAY); |
1633 $sql .= "', brew_fermenter_sg='" . floatval($recipe->OG_FERMENTER); |
1652 $sql .= "', brew_fermenter_sg='" . floatval($recipe->OG_FERMENTER); |
1634 $sql .= "', brew_fermenter_ibu='" . floatval($recipe->IBU); |
1653 $sql .= "', brew_fermenter_ibu='" . floatval($recipe->IBU); |
1635 $sql .= "', brew_aeration_type='" . mysqli_real_escape_string($db, $recipe->AERATION_TYPE); |
1654 |
1636 if ($recipe->AERATION_TYPE != "None") { |
1655 if ($recipe->AERATION_TYPE == 'None') |
|
1656 $sql .= "', brew_aeration_type='0"; |
|
1657 else if ($recipe->AERATION_TYPE == 'Air') { |
|
1658 $sql .= "', brew_aeration_type='1"; |
1637 $sql .= "', brew_aeration_speed='" . floatval($recipe->AERATION_SPEED); |
1659 $sql .= "', brew_aeration_speed='" . floatval($recipe->AERATION_SPEED); |
1638 $sql .= "', brew_aeration_time='" . floatval($recipe->AERATION_TIME); |
1660 $sql .= "', brew_aeration_time='" . floatval($recipe->AERATION_TIME); |
1639 } |
1661 } else if ($recipe->AERATION_TYPE == 'Oxygen') { |
|
1662 $sql .= "', brew_aeration_type='2"; |
|
1663 $sql .= "', brew_aeration_speed='" . floatval($recipe->AERATION_SPEED); |
|
1664 $sql .= "', brew_aeration_time='" . floatval($recipe->AERATION_TIME); |
|
1665 } else |
|
1666 echo "Unknown AERATION_TYPE " . $recipe->AERATION_TYPE . PHP_EOL; |
|
1667 |
1640 $sql .= "', brew_date_end='" . $date_end; |
1668 $sql .= "', brew_date_end='" . $date_end; |
1641 } |
1669 } |
1642 |
1670 |
1643 $sql .= "', og='" . floatval($recipe->OG); |
1671 $sql .= "', og='" . floatval($recipe->OG); |
1644 $sql .= "', fg='" . floatval($recipe->FG); |
1672 $sql .= "', fg='" . floatval($recipe->FG); |
1645 |
1673 |
1646 if ($recipe->PRIMARY_AGE && ($stageno >= 3)) { |
1674 if ($recipe->PRIMARY_AGE && ($stage >= 3)) { |
1647 /* PRIMARY_TEMP is the average of START_TEMP_PRIMARY MAX_TEMP_PRIMARY END_TEMP_PRIMARY */ |
1675 /* PRIMARY_TEMP is the average of START_TEMP_PRIMARY MAX_TEMP_PRIMARY END_TEMP_PRIMARY */ |
1648 $pdate = new DateTime($brewdate); |
1676 $pdate = new DateTime($brewdate); |
1649 $pdate->modify("+".floatval($recipe->PRIMARY_AGE)." days"); |
1677 $pdate->modify("+".floatval($recipe->PRIMARY_AGE)." days"); |
1650 $sql .= "', primary_start_temp='" . floatval($recipe->START_TEMP_PRIMARY); |
1678 $sql .= "', primary_start_temp='" . floatval($recipe->START_TEMP_PRIMARY); |
1651 $sql .= "', primary_max_temp='" . floatval($recipe->MAX_TEMP_PRIMARY); |
1679 $sql .= "', primary_max_temp='" . floatval($recipe->MAX_TEMP_PRIMARY); |
1652 $sql .= "', primary_end_temp='" . floatval($recipe->END_TEMP_PRIMARY); |
1680 $sql .= "', primary_end_temp='" . floatval($recipe->END_TEMP_PRIMARY); |
1653 $sql .= "', primary_end_sg='" . floatval($recipe->SG_END_PRIMARY); |
1681 $sql .= "', primary_end_sg='" . floatval($recipe->SG_END_PRIMARY); |
1654 $sql .= "', primary_end_date='" . $pdate->format("Y-m-d"); |
1682 $sql .= "', primary_end_date='" . $pdate->format("Y-m-d"); |
1655 $stageno = 4; |
1683 $stage = 4; // Secondary |
1656 $stage = "Secondary"; |
1684 |
1657 |
1685 if ($recipe->SECONDARY_AGE && ($stage >= 4)) { |
1658 if ($recipe->SECONDARY_AGE && ($stageno >= 4)) { |
|
1659 $sdate = new DateTime($brewdate); |
1686 $sdate = new DateTime($brewdate); |
1660 $sdate->modify("+".floatval($recipe->SECONDARY_AGE)." days"); |
1687 $sdate->modify("+".floatval($recipe->SECONDARY_AGE)." days"); |
1661 $sql .= "', secondary_temp='" . floatval($recipe->SECONDARY_TEMP); |
1688 $sql .= "', secondary_temp='" . floatval($recipe->SECONDARY_TEMP); |
1662 $sql .= "', secondary_end_date='" . $sdate->format("Y-m-d"); |
1689 $sql .= "', secondary_end_date='" . $sdate->format("Y-m-d"); |
1663 $stageno = 5; |
1690 $stage = 5; // Tertiary |
1664 $stage = "Tertiary"; |
1691 |
1665 |
1692 if ($recipe->TERTIARY_TEMP && ($stage >= 5)) { |
1666 if ($recipe->TERTIARY_TEMP && ($stageno >= 5)) { |
|
1667 $sql .= "', tertiary_temp='" . floatval($recipe->TERTIARY_TEMP); |
1693 $sql .= "', tertiary_temp='" . floatval($recipe->TERTIARY_TEMP); |
1668 } |
1694 } |
1669 } |
1695 } |
1670 } |
1696 } |
1671 |
1697 |
1672 if ($recipe->DATE_BOTTLING && ($recipe->AMOUNT_BOTTLING || $recipe->AMOUNT_KEGGED) && |
1698 if ($recipe->DATE_BOTTLING && ($recipe->AMOUNT_BOTTLING || $recipe->AMOUNT_KEGGED) && |
1673 ($recipe->AMOUNT_PRIMING || $recipe->AMOUNT_PRIMING_KEGS) && ($stageno >= 5)) { |
1699 ($recipe->AMOUNT_PRIMING || $recipe->AMOUNT_PRIMING_KEGS) && ($stage >= 5)) { |
1674 $bdate = substr($recipe->DATE_BOTTLING, 6, 4).substr($recipe->DATE_BOTTLING,2,4).substr($recipe->DATE_BOTTLING,0,2); |
1700 $bdate = substr($recipe->DATE_BOTTLING, 6, 4).substr($recipe->DATE_BOTTLING,2,4).substr($recipe->DATE_BOTTLING,0,2); |
1675 $sql .= "', package_date='" . $bdate; |
1701 $sql .= "', package_date='" . $bdate; |
1676 $stage = "Package"; |
1702 $stage = 6; // Package |
1677 $stageno = 6; |
|
1678 $dStart = new DateTime($bdate); |
1703 $dStart = new DateTime($bdate); |
1679 $dEnd = new DateTime(''); |
1704 $dEnd = new DateTime(''); |
1680 $dDiff = $dStart->diff($dEnd); |
1705 $dDiff = $dStart->diff($dEnd); |
1681 $age = floatval($dDiff->days); |
1706 $age = floatval($dDiff->days); |
1682 if ($age == 0) { // Package day |
1707 if ($age == 0) { // Package day |
1683 $stage = "Package"; |
1708 $stage = 6; |
1684 $stageno = 6; |
|
1685 } else if ($age < 14) { // Carbonation period |
1709 } else if ($age < 14) { // Carbonation period |
1686 $stage = "Carbonation"; |
1710 $stage = 7; |
1687 $stageno = 7; |
|
1688 } else if ($age < 42) { // Mature, fixed 6 weeks |
1711 } else if ($age < 42) { // Mature, fixed 6 weeks |
1689 $stage = "Mature"; |
1712 $stage = 8; |
1690 $stageno = 8; |
|
1691 } else { // Ready for tasting. |
1713 } else { // Ready for tasting. |
1692 $stage = "Taste"; |
1714 $stage = 9; |
1693 $stageno = 9; |
|
1694 } |
1715 } |
1695 |
1716 |
1696 if ($recipe->AMOUNT_BOTTLING && $recipe->AMOUNT_PRIMING) { |
1717 if ($recipe->AMOUNT_BOTTLING && $recipe->AMOUNT_PRIMING) { |
1697 $sql .= "', bottle_amount='" . floatval($recipe->AMOUNT_BOTTLING); |
1718 $sql .= "', bottle_amount='" . floatval($recipe->AMOUNT_BOTTLING); |
1698 $sql .= "', bottle_carbonation='" . floatval($recipe->CARBONATION); |
1719 $sql .= "', bottle_carbonation='" . floatval($recipe->CARBONATION); |
|
1720 |
1699 if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose") |
1721 if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose") |
1700 $sql .= "', bottle_priming_sugar='Kristalsuiker"; |
1722 $sql .= "', bottle_priming_sugar='0"; |
1701 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose") |
1723 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose") |
1702 $sql .= "', bottle_priming_sugar='Glucose/dextrose"; |
1724 $sql .= "', bottle_priming_sugar='1"; |
1703 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey") |
1725 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey") |
1704 $sql .= "', bottle_priming_sugar='Honing"; |
1726 $sql .= "', bottle_priming_sugar='2"; |
1705 else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME") |
1727 else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME") |
1706 $sql .= "', bottle_priming_sugar='Moutextract"; |
1728 $sql .= "', bottle_priming_sugar='3"; |
1707 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis") |
1729 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis") |
1708 $sql .= "', bottle_priming_sugar='Melasse"; |
1730 $sql .= "', bottle_priming_sugar='4"; |
1709 $sql .= "', bottle_priming_amount='" . floatval($recipe->AMOUNT_PRIMING); |
1731 $sql .= "', bottle_priming_amount='" . floatval($recipe->AMOUNT_PRIMING); |
1710 $sql .= "', bottle_carbonation_temp='" . floatval($recipe->CARBONATION_TEMP); |
1732 $sql .= "', bottle_carbonation_temp='" . floatval($recipe->CARBONATION_TEMP); |
1711 } |
1733 } |
1712 if ($recipe->AMOUNT_KEGGED && $recipe->AMOUNT_PRIMING_KEGS) { |
1734 if ($recipe->AMOUNT_KEGGED && $recipe->AMOUNT_PRIMING_KEGS) { |
1713 $sql .= "', keg_amount='" . floatval($recipe->AMOUNT_KEGGED); |
1735 $sql .= "', keg_amount='" . floatval($recipe->AMOUNT_KEGGED); |
1714 $sql .= "', keg_carbonation='" . floatval($recipe->CARBONATION); // Lijkt wel hetzelfde als bottles |
1736 $sql .= "', keg_carbonation='" . floatval($recipe->CARBONATION); // Lijkt wel hetzelfde als bottles |
1715 if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose") |
1737 if ($recipe->PRIMING_SUGAR_BOTTLES == "Saccharose") |
1716 $sql .= "', keg_priming_sugar='Kristalsuiker"; |
1738 $sql .= "', keg_priming_sugar='0"; |
1717 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose") |
1739 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Glucose or dextrose") |
1718 $sql .= "', keg_priming_sugar='Glucose/dextrose"; |
1740 $sql .= "', keg_priming_sugar='1"; |
1719 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey") |
1741 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Honey") |
1720 $sql .= "', keg_priming_sugar='Honing"; |
1742 $sql .= "', keg_priming_sugar='2"; |
1721 else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME") |
1743 else if ($recipe->PRIMING_SUGAR_BOTTLES == "DME") |
1722 $sql .= "', keg_priming_sugar='Moutextract"; |
1744 $sql .= "', keg_priming_sugar='3"; |
1723 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis") |
1745 else if ($recipe->PRIMING_SUGAR_BOTTLES == "Molassis") |
1724 $sql .= "', keg_priming_sugar='Melasse"; |
1746 $sql .= "', keg_priming_sugar='4"; |
1725 $sql .= "', keg_priming_amount='" . floatval($recipe->AMOUNT_PRIMING_KEGS); |
1747 $sql .= "', keg_priming_amount='" . floatval($recipe->AMOUNT_PRIMING_KEGS); |
1726 $sql .= "', keg_carbonation_temp='" . floatval($recipe->KEG_CARB_TEMP); |
1748 $sql .= "', keg_carbonation_temp='" . floatval($recipe->KEG_CARB_TEMP); |
1727 ($recipe->FORCED_CARB_KEGS == 'TRUE') ? $sql .= "', keg_forced_carb='1" : $sql .= "', keg_forced_carb='0"; |
1749 ($recipe->FORCED_CARB_KEGS == 'TRUE') ? $sql .= "', keg_forced_carb='1" : $sql .= "', keg_forced_carb='0"; |
1728 $sql .= "', keg_pressure='" . floatval($recipe->KEG_PRESSURE); |
1750 $sql .= "', keg_pressure='" . floatval($recipe->KEG_PRESSURE); |
1729 } |
1751 } |
1730 } |
1752 } |
1731 |
1753 |
1732 if ($recipe->TASTE_NOTES && $recipe->TASTING_RATE && $recipe->TASTE_DATE && ($stageno >= 9)) { |
1754 if ($recipe->TASTE_NOTES && $recipe->TASTING_RATE && $recipe->TASTE_DATE && ($stage >= 9)) { |
1733 $stage = "Ready"; // Ready if tasted. |
1755 $stage = 10; // Ready |
1734 $stageno = 10; |
|
1735 $sql .= "', taste_notes='" . mysqli_real_escape_string($db, $recipe->TASTE_NOTES); |
1756 $sql .= "', taste_notes='" . mysqli_real_escape_string($db, $recipe->TASTE_NOTES); |
1736 $sql .= "', taste_rate='" . floatval($recipe->TASTING_RATE); |
1757 $sql .= "', taste_rate='" . floatval($recipe->TASTING_RATE); |
1737 $tdate = substr($recipe->TASTE_DATE, 6, 4).substr($recipe->TASTE_DATE,2,4).substr($recipe->TASTE_DATE,0,2); |
1758 $tdate = substr($recipe->TASTE_DATE, 6, 4).substr($recipe->TASTE_DATE,2,4).substr($recipe->TASTE_DATE,0,2); |
1738 $sql .= "', taste_date='" . $tdate; |
1759 $sql .= "', taste_date='" . $tdate; |
1739 $sql .= "', taste_color='" . mysqli_real_escape_string($db, $recipe->TASTE_COLOR); |
1760 $sql .= "', taste_color='" . mysqli_real_escape_string($db, $recipe->TASTE_COLOR); |