www/prod_beerxml.php

changeset 603
c0f638bcec9f
parent 598
890a532701e8
child 604
9e791905157a
--- a/www/prod_beerxml.php	Wed Jan 29 13:26:01 2020 +0100
+++ b/www/prod_beerxml.php	Wed Jan 29 16:58:04 2020 +0100
@@ -36,7 +36,8 @@
 $misctype = array( 'Spice', 'Herb', 'Flavor', 'Fining', 'Water agent', 'Yeast nutrient', 'Other' );
 $miscuse = array( 'Starter', 'Mash', 'Boil', 'Primary', 'Secondary', 'Bottling' );
 $mashsteptype = array( 'Infusion', 'Temperature', 'Decoction' );
-
+$colormethod = array( 'Morey', 'Mosher', 'Daniels', 'Halberstadt', 'Naudts' );
+$ibumethod = array( 'Tinseth', 'Rager', 'Daniels', 'Garetz', 'Mosher', 'Noonan' );
 
 
 /*
@@ -118,12 +119,18 @@
         xmlwriter_start_element($xw, 'EST_COLOR');
         xmlwriter_text($xw, sprintf("%.1f",floatval($row['est_color'])));
         xmlwriter_end_element($xw);
+	xmlwriter_start_element($xw, 'COLOR_METHOD');
+	xmlwriter_text($xw, $colormethod[$row['color_method']]);
+	xmlwriter_end_element($xw);
 }
 
 if (floatval($row['est_ibu']) > 0) {
         xmlwriter_start_element($xw, 'EST_IBU');
         xmlwriter_text($xw, sprintf("%.1f",floatval($row['est_ibu'])));
         xmlwriter_end_element($xw);
+	xmlwriter_start_element($xw, 'IBU_METHOD');
+	xmlwriter_text($xw, $ibumethod[$row['ibu_method']]);
+	xmlwriter_end_element($xw);
 }
 
 if ($row['brew_cooling_to'] > 0) {
@@ -515,6 +522,10 @@
 xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_calcium'])));
 xmlwriter_end_element($xw);
 
+xmlwriter_start_element($xw, 'MAGNESIUM');
+xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_magnesium'])));
+xmlwriter_end_element($xw);
+
 xmlwriter_start_element($xw, 'BICARBONATE');
 xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_total_alkalinity']) * 1.22));
 xmlwriter_end_element($xw);
@@ -560,6 +571,10 @@
 	xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_calcium'])));
 	xmlwriter_end_element($xw);
 
+	xmlwriter_start_element($xw, 'MAGNESIUM');
+        xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_magnesium'])));
+        xmlwriter_end_element($xw);
+
 	xmlwriter_start_element($xw, 'BICARBONATE');
 	xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_total_alkalinity']) * 1.22));
 	xmlwriter_end_element($xw);

mercurial