www/prod_beerxml.php

changeset 667
1246550451ca
parent 606
39d4b9e7b447
equal deleted inserted replaced
666:029e65ca3678 667:1246550451ca
291 foreach($arr as $item) { //foreach element in $arr 291 foreach($arr as $item) { //foreach element in $arr
292 xmlwriter_start_element($xw, 'MASH_STEP'); 292 xmlwriter_start_element($xw, 'MASH_STEP');
293 field($xw, 'VERSION', '1'); 293 field($xw, 'VERSION', '1');
294 field($xw, 'NAME', $item['step_name']); 294 field($xw, 'NAME', $item['step_name']);
295 field($xw, 'TYPE', $mashsteptype[$item['step_type']]); 295 field($xw, 'TYPE', $mashsteptype[$item['step_type']]);
296 if ($item['step_type'] == 0) 296 if ($item['step_type'] == 0) {
297 field($xw, 'INFUSE_AMOUNT', sprintf("%.1f",floatval($item['step_infuse_amount']))); 297 field($xw, 'INFUSE_AMOUNT', sprintf("%.3f",floatval($item['step_infuse_amount'])));
298 field($xw, 'INFUSE_TEMP', sprintf("%.3f",floatval($item['step_infuse_temp'])));
299 }
300 if ($item['step_type'] == 2) {
301 field($xw, 'DECOCTION_AMT', sprintf("%.3f",floatval($item['step_infuse_amount'])));
302 }
298 field($xw, 'STEP_TEMP', sprintf("%.1f",floatval($item['step_temp']))); 303 field($xw, 'STEP_TEMP', sprintf("%.1f",floatval($item['step_temp'])));
299 field($xw, 'STEP_TIME', sprintf("%.1f",floatval($item['step_time']))); 304 field($xw, 'STEP_TIME', sprintf("%.1f",floatval($item['step_time'])));
300 field($xw, 'RAMP_TIME', sprintf("%.1f",floatval($item['ramp_time']))); 305 field($xw, 'RAMP_TIME', sprintf("%.1f",floatval($item['ramp_time'])));
301 field($xw, 'END_TEMP', sprintf("%.1f",floatval($item['end_temp']))); 306 field($xw, 'END_TEMP', sprintf("%.1f",floatval($item['end_temp'])));
302 field($xw, 'PH', sprintf("%.1f",floatval($row['mash_ph']))); 307 field($xw, 'PH', sprintf("%.1f",floatval($row['mash_ph'])));

mercurial