--- a/www/prod_forum.php Mon Oct 14 23:13:40 2019 +0200 +++ b/www/prod_forum.php Wed Oct 16 21:05:03 2019 +0200 @@ -1,6 +1,7 @@ <?php require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); +require_once($_SERVER['DOCUMENT_ROOT'].'/includes/constants.php'); $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); @@ -33,19 +34,6 @@ <pre> <?php -$recipetype = array( 'Extract', 'Deelmaisch', 'Mout' ); -$colormethod = array( 'Morey', 'Mosher', 'Daniels' ); -$ibumethod = array( 'Tinseth', 'Rager', 'Daniels' ); -$added = array( 'Maischen', 'Koken', 'Vergisten', 'Nagisten/lageren', 'Bottelen' ); -$hopform = array( 'Pellets', 'Plugs', 'Bellen', 'Hop nat', 'Cryo Hop' ); -$hopuse = array( 'Maischen', 'First wort', 'Koken', 'Vlamuit', 'Whirlpool', 'Koudhop' ); -$misctype = array( 'Specerij', 'Kruid', 'Smaakstof', 'Klaringsmiddel', 'Brouwzout', 'Gistvoeding', 'Anders' ); -$miscuse = array( 'Starter', 'Maischen', 'Koken', 'Hoofdvergisting', 'Nagisting/lagering', 'Bottelen' ); -$yeastform = array( 'Vloeibaar', 'Droog', 'Schuine buis', 'Slurry', 'Ingevroren', 'Depot' ); -$yeastuse = array( 'Hoofdgisting', 'Nagisting', 'Lagering', 'Bottelen' ); -$steptype = array( 'Infusie', 'Directe verwarming', 'Decoctie' ); -$acidtype = array( 'Melkzuur', 'Zoutzuur', 'Fosforzuur', 'Zwavelzuur' ); - function itemline($item, $content) { @@ -113,8 +101,8 @@ $mashwater = 0; $arr = json_decode($row['json_fermentables'], true); -echo "Mout, granen en suikers EBC Gewicht kg % Gebruik tijdens" . PHP_EOL; -echo "---------------------------------------- --- ---------- ----- ----------------" . PHP_EOL; +echo "Mout, granen en suikers EBC Gewicht kg % Gebruik tijdens" . PHP_EOL; +echo "---------------------------------------- ---- ---------- ----- ----------------" . PHP_EOL; foreach($arr as $item) { $name = formatstr($item['f_name'] . " (" . $item['f_supplier'] . ")", 40); $amount = floatval($item['f_amount']); @@ -124,7 +112,7 @@ $sugarsm += $d; $grainabsorbtion += $item['f_amount']; } - echo sprintf("%s %3.0f %10.3f %5.1f ", $name, floatval($item['f_color']), $amount, floatval($item['f_percentage'])); + echo sprintf("%s %4.0f %10.3f %5.1f ", $name, floatval($item['f_color']), $amount, floatval($item['f_percentage'])); echo $added[$item['f_added']] . PHP_EOL; } $preboil_sg = estimate_sg($sugarsm, floatval($row['boil_size'])); @@ -210,9 +198,9 @@ foreach($arr as $item) { if ($item['step_type'] == 1) { - $stype = formatstr($steptype[$item['step_type']], 22); + $stype = formatstr($mashtype[$item['step_type']], 22); } else { - $stype = formatstr($steptype[$item['step_type']].' '.sprintf("%.1f", $item['step_infuse_amount']).' liter', 22); + $stype = formatstr($mashtype[$item['step_type']].' '.sprintf("%.1f", $item['step_infuse_amount']).' liter', 22); } echo sprintf("%s %s %s %s %s", formatstr($item['step_name'], 20), $stype, sprintf("%6.1f °C", $item['step_temp']),