Thu, 30 Jan 2020 15:29:43 +0100
Don't include carbonation sugars in the fermentables.
www/prod_beerxml.php | file | annotate | diff | comparison | revisions | |
www/rec_beerxml.php | file | annotate | diff | comparison | revisions |
--- a/www/prod_beerxml.php Thu Jan 30 15:18:11 2020 +0100 +++ b/www/prod_beerxml.php Thu Jan 30 15:29:43 2020 +0100 @@ -1,8 +1,8 @@ <?php -//require_once('config.php'); -//require_once('includes/formulas.php'); -require_once($_SERVER['DOCUMENT_ROOT'].'/config.php'); -require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); +require_once('config.php'); +require_once('includes/formulas.php'); +//require_once($_SERVER['DOCUMENT_ROOT'].'/config.php'); +//require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); @@ -185,6 +185,7 @@ xmlwriter_start_element($xw, 'FERMENTABLES'); $arr = json_decode($row['json_fermentables'], true); foreach($arr as $item) { //foreach element in $arr + if ($item['f_added'] <= 3) { xmlwriter_start_element($xw, 'FERMENTABLE'); field($xw, 'VERSION', '1'); field($xw, 'NAME', $item['f_name']); @@ -208,6 +209,7 @@ field($xw, 'RECOMMEND_MASH', ($item['f_recommend_mash']) ? 'TRUE':'FALSE'); field($xw, 'GRAINTYPE', $graintype[$item['f_graintype']]); xmlwriter_end_element($xw); // FERMENTABLE + } } xmlwriter_end_element($xw); // FERMENTABLES
--- a/www/rec_beerxml.php Thu Jan 30 15:18:11 2020 +0100 +++ b/www/rec_beerxml.php Thu Jan 30 15:29:43 2020 +0100 @@ -289,6 +289,7 @@ xmlwriter_start_element($xw, 'FERMENTABLES'); $arr = json_decode($row['json_fermentables'], true); foreach($arr as $item) { //foreach element in $arr + if ($item['f_added'] <= 3) { xmlwriter_start_element($xw, 'FERMENTABLE'); xmlwriter_start_element($xw, 'VERSION'); @@ -366,6 +367,7 @@ xmlwriter_end_element($xw); xmlwriter_end_element($xw); // FERMENTABLE + } } xmlwriter_end_element($xw); // FERMENTABLES