1 <?php |
1 <?php |
2 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); |
2 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); |
3 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); |
3 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); |
|
4 require_once($_SERVER['DOCUMENT_ROOT'].'/includes/constants.php'); |
4 |
5 |
5 |
6 |
6 $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
7 $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
7 if (! $link) { |
8 if (! $link) { |
8 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); |
9 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); |
30 <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> |
31 <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> |
31 </head> |
32 </head> |
32 <body> |
33 <body> |
33 <pre> |
34 <pre> |
34 <?php |
35 <?php |
35 |
|
36 $recipetype = array( 'Extract', 'Deelmaisch', 'Mout' ); |
|
37 $colormethod = array( 'Morey', 'Mosher', 'Daniels' ); |
|
38 $ibumethod = array( 'Tinseth', 'Rager', 'Daniels' ); |
|
39 $added = array( 'Maischen', 'Koken', 'Vergisten', 'Nagisten/lageren', 'Bottelen' ); |
|
40 $hopform = array( 'Pellets', 'Plugs', 'Bellen', 'Hop nat', 'Cryo Hop' ); |
|
41 $hopuse = array( 'Maischen', 'First wort', 'Koken', 'Vlamuit', 'Whirlpool', 'Koudhop' ); |
|
42 $misctype = array( 'Specerij', 'Kruid', 'Smaakstof', 'Klaringsmiddel', 'Brouwzout', 'Gistvoeding', 'Anders' ); |
|
43 $miscuse = array( 'Starter', 'Maischen', 'Koken', 'Hoofdvergisting', 'Nagisting/lagering', 'Bottelen' ); |
|
44 $yeastform = array( 'Vloeibaar', 'Droog', 'Schuine buis', 'Slurry', 'Ingevroren', 'Depot' ); |
|
45 $yeastuse = array( 'Hoofdgisting', 'Nagisting', 'Lagering', 'Bottelen' ); |
|
46 $steptype = array( 'Infusie', 'Directe verwarming', 'Decoctie' ); |
|
47 $acidtype = array( 'Melkzuur', 'Zoutzuur', 'Fosforzuur', 'Zwavelzuur' ); |
|
48 |
36 |
49 |
37 |
50 function itemline($item, $content) { |
38 function itemline($item, $content) { |
51 |
39 |
52 echo $item . " "; |
40 echo $item . " "; |
208 echo "-------------------- ---------------------- --------- --------- ---------" . PHP_EOL; |
196 echo "-------------------- ---------------------- --------- --------- ---------" . PHP_EOL; |
209 $arr = json_decode($row['json_mashs'], true); |
197 $arr = json_decode($row['json_mashs'], true); |
210 foreach($arr as $item) { |
198 foreach($arr as $item) { |
211 |
199 |
212 if ($item['step_type'] == 1) { |
200 if ($item['step_type'] == 1) { |
213 $stype = formatstr($steptype[$item['step_type']], 22); |
201 $stype = formatstr($mashtype[$item['step_type']], 22); |
214 } else { |
202 } else { |
215 $stype = formatstr($steptype[$item['step_type']].' '.sprintf("%.1f", $item['step_infuse_amount']).' liter', 22); |
203 $stype = formatstr($mashtype[$item['step_type']].' '.sprintf("%.1f", $item['step_infuse_amount']).' liter', 22); |
216 } |
204 } |
217 echo sprintf("%s %s %s %s %s", |
205 echo sprintf("%s %s %s %s %s", |
218 formatstr($item['step_name'], 20), $stype, sprintf("%6.1f °C", $item['step_temp']), |
206 formatstr($item['step_name'], 20), $stype, sprintf("%6.1f °C", $item['step_temp']), |
219 sprintf("%4.0f min.", $item['step_time']), sprintf("%4.0f min.", $item['ramp_time'])) . PHP_EOL; |
207 sprintf("%4.0f min.", $item['step_time']), sprintf("%4.0f min.", $item['ramp_time'])) . PHP_EOL; |
220 } |
208 } |