--- 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