Thu, 20 Jun 2019 13:55:12 +0200
Added packaging volume and add water or liquer to the beer after fermentation. Auto divide changing volumes between bottles and fusts. Upgrade the database in the crontask. Added these fields to the packaging tab screen.
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | //require_once('config.php'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | //require_once('includes/formulas.php'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | require_once($_SERVER['DOCUMENT_ROOT'].'/config.php'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | require_once($_SERVER['DOCUMENT_ROOT'].'/includes/formulas.php'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | if (! $link) { |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | if (! mysqli_set_charset($link, "utf8" )) { |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | echo "error"; |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | return 1; |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | //setlocale ( LC_ALL, 'nl_NL.UTF-8'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | if (isset($_GET["record"])) |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | $record = $_GET["record"]; |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | else |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | $record = 148; |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | $result = mysqli_query($link, "SELECT * FROM recipes WHERE record='".$record."'"); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | $row = mysqli_fetch_array($result); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
26 | $recipetype = array( 'Extract', 'Partial Mash', 'All Grain' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
27 | $styletype = array( 'Lager', 'Ale', 'Mead', 'Wheat', 'Mixed', 'Cider' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
28 | $hoptype = array( 'Bittering', 'Aroma', 'Both' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
29 | $hopform = array( 'Pellet', 'Plug', 'Leaf' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
30 | $hopuse = array( 'Mash', 'First wort', 'Boil', 'Aroma', 'Whirlpool', 'Dry hop' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
31 | $fermentabletype = array( 'Grain', 'Sugar', 'Extract', 'Dry extract', 'Adjunct' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
32 | $graintype = array( 'Base', 'Roast', 'Crystal', 'Kilned', 'Sour malt', 'Special', 'No malt' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
33 | $yeasttype = array( 'Lager', 'Ale', 'Wheat', 'Wine', 'Champagne' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
34 | $yeastform = array( 'Liquid', 'Dry', 'Slant', 'Culture', 'Frozen', 'Bottle' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
35 | $yeastuse = array( 'Primary', 'Secondary', 'Tertiary', 'Bottle' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
36 | $misctype = array( 'Spice', 'Herb', 'Flavor', 'Fining', 'Water agent', 'Yeast nutrient', 'Other' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
37 | $miscuse = array( 'Starter', 'Mash', 'Boil', 'Primary', 'Secondary', 'Bottling' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
38 | $mashsteptype = array( 'Infusion', 'Temperature', 'Decoction' ); |
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
39 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
40 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
41 | /* |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | * Create beerxml output |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
43 | */ |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
44 | $xw = xmlwriter_open_memory(); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
45 | xmlwriter_set_indent($xw, 1); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
46 | $res = xmlwriter_set_indent_string($xw, ' '); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
47 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
48 | xmlwriter_start_document($xw, '1.0', 'UTF-8'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
49 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
50 | xmlwriter_start_element($xw, 'RECIPES'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
51 | xmlwriter_start_element($xw, 'RECIPE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
52 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
53 | // Recipe basics |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
54 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
55 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
56 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
57 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
58 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
59 | xmlwriter_text($xw, $row['name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
60 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
61 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
62 | xmlwriter_start_element($xw, 'NOTES'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
63 | xmlwriter_text($xw, $row['notes']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
64 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
65 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
66 | xmlwriter_start_element($xw, 'TYPE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
67 | xmlwriter_text($xw, $recipetype[$row['type']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
68 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
69 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
70 | xmlwriter_start_element($xw, 'BREWER'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
71 | xmlwriter_text($xw, 'Anonymous'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
72 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
73 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
74 | xmlwriter_start_element($xw, 'BATCH_SIZE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
75 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['batch_size']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
76 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
77 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
78 | xmlwriter_start_element($xw, 'BOIL_SIZE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
79 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['boil_size']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
80 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
81 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
82 | xmlwriter_start_element($xw, 'BOIL_TIME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
83 | xmlwriter_text($xw, sprintf("%.0f",floatval($row['boil_time']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
84 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
85 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
86 | xmlwriter_start_element($xw, 'EFFICIENCY'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
87 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['efficiency']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
88 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
89 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
90 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
91 | // Style |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
92 | xmlwriter_start_element($xw, 'STYLE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
93 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
94 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
95 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
96 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
97 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
98 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
99 | xmlwriter_text($xw, $row['st_name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
100 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
101 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
102 | xmlwriter_start_element($xw, 'CATEGORY'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
103 | xmlwriter_text($xw, $row['st_category']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
104 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
105 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
106 | xmlwriter_start_element($xw, 'CATEGORY_NUMBER'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
107 | xmlwriter_text($xw, $row['st_category_number']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
108 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
109 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
110 | xmlwriter_start_element($xw, 'STYLE_LETTER'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
111 | xmlwriter_text($xw, $row['st_letter']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
112 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
113 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
114 | xmlwriter_start_element($xw, 'STYLE_GUIDE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
115 | xmlwriter_text($xw, $row['st_guide']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
116 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
117 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
118 | xmlwriter_start_element($xw, 'TYPE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
119 | xmlwriter_text($xw, $styletype[$row['st_type']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
120 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
121 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
122 | xmlwriter_start_element($xw, 'OG_MIN'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
123 | xmlwriter_text($xw, sprintf("%.3f",floatval($row['st_og_min']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
124 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
125 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
126 | xmlwriter_start_element($xw, 'OG_MAX'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
127 | xmlwriter_text($xw, sprintf("%.3f",floatval($row['st_og_max']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
128 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
129 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
130 | xmlwriter_start_element($xw, 'FG_MIN'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
131 | xmlwriter_text($xw, sprintf("%.3f",floatval($row['st_og_min']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
132 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
133 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
134 | xmlwriter_start_element($xw, 'OG_MAX'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
135 | xmlwriter_text($xw, sprintf("%.3f",floatval($row['st_fg_max']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
136 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
137 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
138 | xmlwriter_start_element($xw, 'IBU_MIN'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
139 | xmlwriter_text($xw, sprintf("%.0f",floatval($row['st_ibu_min']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
140 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
141 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
142 | xmlwriter_start_element($xw, 'IBU_MAX'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
143 | xmlwriter_text($xw, sprintf("%.0f",floatval($row['st_ibu_max']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
144 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
145 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
146 | xmlwriter_start_element($xw, 'COLOR_MIN'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
147 | xmlwriter_text($xw, sprintf("%.2f",ebc_to_srm(floatval($row['st_color_min'])))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
148 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
149 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
150 | xmlwriter_start_element($xw, 'COLOR_MAX'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
151 | xmlwriter_text($xw, sprintf("%.2f",ebc_to_srm(floatval($row['st_color_max'])))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
152 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
153 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
154 | xmlwriter_start_element($xw, 'CARB_MIN'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
155 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['st_carb_min']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
156 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
157 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
158 | xmlwriter_start_element($xw, 'CARB_MAX'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
159 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['st_carb_max']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
160 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
161 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
162 | xmlwriter_start_element($xw, 'ABV_MIN'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
163 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['st_abv_min']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
164 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
165 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
166 | xmlwriter_start_element($xw, 'ABV_MAX'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
167 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['st_abv_max']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
168 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
169 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
170 | xmlwriter_end_element($xw); // STYLE |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
171 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
172 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
173 | xmlwriter_start_element($xw, 'EQUIPMENT'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
174 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
175 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
176 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
177 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
178 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
179 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
180 | xmlwriter_text($xw, 'Dummy brewery'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
181 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
182 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
183 | xmlwriter_start_element($xw, 'BATCH_SIZE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
184 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['batch_size']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
185 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
186 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
187 | xmlwriter_start_element($xw, 'BOIL_SIZE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
188 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['boil_size']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
189 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
190 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
191 | xmlwriter_start_element($xw, 'BOIL_TIME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
192 | xmlwriter_text($xw, sprintf("%.0f",floatval($row['boil_time']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
193 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
194 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
195 | xmlwriter_end_element($xw); // EQUIPMENT |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
196 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
197 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
198 | xmlwriter_start_element($xw, 'HOPS'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
199 | $arr = json_decode($row['json_hops'], true); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
200 | foreach($arr as $item) { //foreach element in $arr |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
201 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
202 | xmlwriter_start_element($xw, 'HOP'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
203 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
204 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
205 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
206 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
207 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
208 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
209 | xmlwriter_text($xw, $item['h_name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
210 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
211 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
212 | xmlwriter_start_element($xw, 'ALPHA'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
213 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['h_alpha']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
214 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
215 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
216 | xmlwriter_start_element($xw, 'AMOUNT'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
217 | xmlwriter_text($xw, sprintf("%.4f",floatval($item['h_amount']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
218 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
219 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
220 | xmlwriter_start_element($xw, 'USE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
221 | xmlwriter_text($xw, $hopuse[$item['h_useat']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
222 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
223 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
224 | xmlwriter_start_element($xw, 'TIME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
225 | xmlwriter_text($xw, $item['h_time']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
226 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
227 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
228 | xmlwriter_start_element($xw, 'TYPE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
229 | xmlwriter_text($xw, $hoptype[$item['h_type']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
230 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
231 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
232 | xmlwriter_start_element($xw, 'FORM'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
233 | xmlwriter_text($xw, $hopform[$item['h_form']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
234 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
235 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
236 | xmlwriter_start_element($xw, 'BETA'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
237 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['h_beta']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
238 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
239 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
240 | xmlwriter_start_element($xw, 'HSI'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
241 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['h_hsi']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
242 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
243 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
244 | xmlwriter_start_element($xw, 'ORIGIN'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
245 | xmlwriter_text($xw, $item['h_origin']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
246 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
247 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
248 | xmlwriter_end_element($xw); // HOP |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
249 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
250 | xmlwriter_end_element($xw); // HOPS |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
251 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
252 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
253 | xmlwriter_start_element($xw, 'FERMENTABLES'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
254 | $arr = json_decode($row['json_fermentables'], true); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
255 | foreach($arr as $item) { //foreach element in $arr |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
256 | xmlwriter_start_element($xw, 'FERMENTABLE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
257 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
258 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
259 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
260 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
261 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
262 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
263 | xmlwriter_text($xw, $item['f_name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
264 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
265 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
266 | xmlwriter_start_element($xw, 'TYPE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
267 | xmlwriter_text($xw, $fermentabletype[$item['f_type']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
268 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
269 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
270 | xmlwriter_start_element($xw, 'AMOUNT'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
271 | xmlwriter_text($xw, sprintf("%.4f",floatval($item['f_amount']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
272 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
273 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
274 | xmlwriter_start_element($xw, 'YIELD'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
275 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['f_yield']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
276 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
277 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
278 | xmlwriter_start_element($xw, 'COLOR'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
279 | xmlwriter_text($xw, sprintf("%.1f",ebc_to_srm(floatval($item['f_color'])))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
280 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
281 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
282 | xmlwriter_start_element($xw, 'ADD_AFTER_BOIL'); |
400
6d07c51e7540
Fixed beerxml output for fermentables added after the boil.
Michiel Broek <mbroek@mbse.eu>
parents:
301
diff
changeset
|
283 | ($item['f_added'] > 1) ? xmlwriter_text($xw, 'TRUE') : xmlwriter_text($xw, 'FALSE'); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
284 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
285 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
286 | xmlwriter_start_element($xw, 'ORIGIN'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
287 | xmlwriter_text($xw, $item['f_origin']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
288 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
289 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
290 | xmlwriter_start_element($xw, 'SUPPLIER'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
291 | xmlwriter_text($xw, $item['f_supplier']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
292 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
293 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
294 | if (floatval($item['f_coarse_fine_diff'])) { |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
295 | xmlwriter_start_element($xw, 'COARSE_FINE_DIFF'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
296 | xmlwriter_text($xw, sprintf("%.4f",floatval($item['f_coarse_fine_diff']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
297 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
298 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
299 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
300 | if (floatval($item['f_moisture'])) { |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
301 | xmlwriter_start_element($xw, 'MOISTURE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
302 | xmlwriter_text($xw, sprintf("%.4f",floatval($item['f_moisture']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
303 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
304 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
305 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
306 | if (floatval($item['f_diastatic_power'])) { |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
307 | xmlwriter_start_element($xw, 'DIASTATIC_POWER'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
308 | xmlwriter_text($xw, sprintf("%.4f",floatval($item['f_diastatic_power']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
309 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
310 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
311 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
312 | if (floatval($item['f_protein'])) { |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
313 | xmlwriter_start_element($xw, 'PROTEIN'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
314 | xmlwriter_text($xw, sprintf("%.4f",floatval($item['f_protein']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
315 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
316 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
317 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
318 | if (floatval($item['f_max_in_batch'])) { |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
319 | xmlwriter_start_element($xw, 'MAX_IN_BATCH'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
320 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['f_max_in_batch']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
321 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
322 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
323 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
324 | xmlwriter_start_element($xw, 'RECOMMEND_MASH'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
325 | ($item['f_recommend_mash']) ? xmlwriter_text($xw, 'TRUE') : xmlwriter_text($xw, 'FALSE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
326 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
327 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
328 | xmlwriter_start_element($xw, 'GRAINTYPE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
329 | xmlwriter_text($xw, $graintype[$item['f_graintype']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
330 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
331 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
332 | xmlwriter_end_element($xw); // FERMENTABLE |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
333 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
334 | xmlwriter_end_element($xw); // FERMENTABLES |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
335 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
336 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
337 | xmlwriter_start_element($xw, 'MISCS'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
338 | $arr = json_decode($row['json_miscs'], true); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
339 | foreach($arr as $item) { |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
340 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
341 | xmlwriter_start_element($xw, 'MISC'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
342 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
343 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
344 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
345 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
346 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
347 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
348 | xmlwriter_text($xw, $item['m_name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
349 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
350 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
351 | xmlwriter_start_element($xw, 'TYPE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
352 | xmlwriter_text($xw, $misctype[$item['m_type']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
353 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
354 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
355 | xmlwriter_start_element($xw, 'AMOUNT'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
356 | xmlwriter_text($xw, sprintf("%.5f",floatval($item['m_amount']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
357 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
358 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
359 | xmlwriter_start_element($xw, 'AMOUNT_IS_WEIGHT'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
360 | ($item['m_amount_is_weight']) ? xmlwriter_text($xw, 'TRUE') : xmlwriter_text($xw, 'FALSE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
361 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
362 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
363 | xmlwriter_start_element($xw, 'USE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
364 | xmlwriter_text($xw, $miscuse[$item['m_use_use']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
365 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
366 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
367 | xmlwriter_start_element($xw, 'TIME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
368 | xmlwriter_text($xw, sprintf("%.0f",floatval($item['m_time']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
369 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
370 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
371 | xmlwriter_end_element($xw); // MISC |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
372 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
373 | xmlwriter_end_element($xw); // MISCS |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
374 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
375 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
376 | xmlwriter_start_element($xw, 'YEASTS'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
377 | $arr = json_decode($row['json_yeasts'], true); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
378 | foreach($arr as $item) { //foreach element in $arr |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
379 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
380 | xmlwriter_start_element($xw, 'YEAST'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
381 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
382 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
383 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
384 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
385 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
386 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
387 | xmlwriter_text($xw, $item['y_name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
388 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
389 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
390 | xmlwriter_start_element($xw, 'TYPE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
391 | xmlwriter_text($xw, $yeasttype[$item['y_type']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
392 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
393 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
394 | xmlwriter_start_element($xw, 'FORM'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
395 | xmlwriter_text($xw, $yeastform[$item['y_form']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
396 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
397 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
398 | xmlwriter_start_element($xw, 'AMOUNT'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
399 | xmlwriter_text($xw, sprintf("%.5f",floatval($item['y_amount']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
400 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
401 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
402 | xmlwriter_start_element($xw, 'AMOUNT_IS_WEIGHT'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
403 | ($item['y_form'] == 1) ? xmlwriter_text($xw, 'TRUE') : xmlwriter_text($xw, 'FALSE'); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
404 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
405 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
406 | xmlwriter_start_element($xw, 'LABORATORY'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
407 | xmlwriter_text($xw, $item['y_laboratory']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
408 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
409 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
410 | xmlwriter_start_element($xw, 'PRODUCT_ID'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
411 | xmlwriter_text($xw, $item['y_product_id']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
412 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
413 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
414 | xmlwriter_start_element($xw, 'MIN_TEMPERATURE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
415 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['y_min_temperature']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
416 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
417 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
418 | xmlwriter_start_element($xw, 'MAX_TEMPERATURE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
419 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['y_max_temperature']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
420 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
421 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
422 | xmlwriter_start_element($xw, 'ATTENUATION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
423 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['y_attenuation']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
424 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
425 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
426 | xmlwriter_start_element($xw, 'ADD_TO_SECONDARY'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
427 | ($item['y_use'] == 0) ? xmlwriter_text($xw, 'FALSE') : xmlwriter_text($xw, 'TRUE'); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
428 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
429 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
430 | xmlwriter_end_element($xw); // YEAST |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
431 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
432 | xmlwriter_end_element($xw); // YEASTS |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
433 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
434 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
435 | xmlwriter_start_element($xw, 'WATERS'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
436 | xmlwriter_start_element($xw, 'WATER'); // Source 1 |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
437 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
438 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
439 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
440 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
441 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
442 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
443 | xmlwriter_text($xw, $row['w1_name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
444 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
445 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
446 | xmlwriter_start_element($xw, 'AMOUNT'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
447 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_amount']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
448 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
449 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
450 | xmlwriter_start_element($xw, 'CALCIUM'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
451 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_calcium']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
452 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
453 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
454 | xmlwriter_start_element($xw, 'BICARBONATE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
455 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_total_alkalinity']) * 1.22)); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
456 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
457 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
458 | xmlwriter_start_element($xw, 'SULFATE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
459 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_sulfate']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
460 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
461 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
462 | xmlwriter_start_element($xw, 'CHLORIDE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
463 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_chloride']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
464 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
465 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
466 | xmlwriter_start_element($xw, 'SODIUM'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
467 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_sodium']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
468 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
469 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
470 | xmlwriter_start_element($xw, 'PH'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
471 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['w1_ph']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
472 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
473 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
474 | xmlwriter_start_element($xw, 'TOTAL_ALKALINITY'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
475 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w1_total_alkalinity']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
476 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
477 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
478 | xmlwriter_end_element($xw); // WATER |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
479 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
480 | if (strlen($row['w2_name'])) { |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
481 | xmlwriter_start_element($xw, 'WATER'); // Source 2 |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
482 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
483 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
484 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
485 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
486 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
487 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
488 | xmlwriter_text($xw, $row['w2_name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
489 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
490 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
491 | xmlwriter_start_element($xw, 'AMOUNT'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
492 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_amount']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
493 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
494 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
495 | xmlwriter_start_element($xw, 'CALCIUM'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
496 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_calcium']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
497 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
498 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
499 | xmlwriter_start_element($xw, 'BICARBONATE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
500 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_total_alkalinity']) * 1.22)); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
501 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
502 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
503 | xmlwriter_start_element($xw, 'SULFATE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
504 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_sulfate']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
505 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
506 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
507 | xmlwriter_start_element($xw, 'CHLORIDE'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
508 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_chloride']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
509 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
510 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
511 | xmlwriter_start_element($xw, 'SODIUM'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
512 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_sodium']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
513 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
514 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
515 | xmlwriter_start_element($xw, 'PH'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
516 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['w2_ph']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
517 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
518 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
519 | xmlwriter_start_element($xw, 'TOTAL_ALKALINITY'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
520 | xmlwriter_text($xw, sprintf("%.2f",floatval($row['w2_total_alkalinity']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
521 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
522 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
523 | xmlwriter_end_element($xw); // WATER |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
524 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
525 | xmlwriter_end_element($xw); // WATERS |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
526 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
527 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
528 | xmlwriter_start_element($xw, 'MASH'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
529 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
530 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
531 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
532 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
533 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
534 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
535 | xmlwriter_text($xw, $row['mash_name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
536 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
537 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
538 | xmlwriter_start_element($xw, 'GRAIN_TEMP'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
539 | xmlwriter_text($xw, '10.0'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
540 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
541 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
542 | xmlwriter_start_element($xw, 'PH'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
543 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['sparge_ph']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
544 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
545 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
546 | xmlwriter_start_element($xw, 'SPARGE_TEMP'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
547 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['sparge_temp']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
548 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
549 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
550 | xmlwriter_start_element($xw, 'MASH_STEPS'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
551 | $arr = json_decode($row['json_mashs'], true); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
552 | foreach($arr as $item) { //foreach element in $arr |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
553 | xmlwriter_start_element($xw, 'MASH_STEP'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
554 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
555 | xmlwriter_start_element($xw, 'VERSION'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
556 | xmlwriter_text($xw, '1'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
557 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
558 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
559 | xmlwriter_start_element($xw, 'NAME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
560 | xmlwriter_text($xw, $item['step_name']); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
561 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
562 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
563 | xmlwriter_start_element($xw, 'TYPE'); |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
564 | xmlwriter_text($xw, $mashsteptype[$item['step_type']]); |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
565 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
566 | |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
567 | if ($item['step_type'] == 0) { |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
568 | xmlwriter_start_element($xw, 'INFUSE_AMOUNT'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
569 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['step_infuse_amount']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
570 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
571 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
572 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
573 | xmlwriter_start_element($xw, 'STEP_TEMP'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
574 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['step_temp']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
575 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
576 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
577 | xmlwriter_start_element($xw, 'STEP_TIME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
578 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['step_time']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
579 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
580 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
581 | xmlwriter_start_element($xw, 'RAMP_TIME'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
582 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['ramp_time']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
583 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
584 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
585 | xmlwriter_start_element($xw, 'END_TEMP'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
586 | xmlwriter_text($xw, sprintf("%.1f",floatval($item['end_temp']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
587 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
588 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
589 | xmlwriter_start_element($xw, 'PH'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
590 | xmlwriter_text($xw, sprintf("%.1f",floatval($row['mash_ph']))); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
591 | xmlwriter_end_element($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
592 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
593 | xmlwriter_end_element($xw); // MASH_STEP |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
594 | } |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
595 | xmlwriter_end_element($xw); // MASH_STEPS |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
596 | xmlwriter_end_element($xw); // MASH |
231
9881453a49b3
Recipe print and export afjusted to use array indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
597 | |
175
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
598 | xmlwriter_end_element($xw); // RECIPE |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
599 | xmlwriter_end_element($xw); // RECIPES |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
600 | xmlwriter_end_document($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
601 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
602 | $beerxml = xmlwriter_output_memory($xw); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
603 | |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
604 | Header('Content-type: text/xml'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
605 | header('Content-Disposition: attachment; filename="' . $row['name'] . '.xml"'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
606 | header('Content-Transfer-Encoding: binary'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
607 | header('Expires: 0'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
608 | header('Pragma: no-cache'); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
609 | header('Content-Length: '.strlen($beerxml)); |
da16371538c3
When importing from brouwhulp use 0 and 1 instead of false and true for boolean variables. Added Export button to the recipe editor. Added beerxml recipe export.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
610 | exit($beerxml); |