Mon, 29 Apr 2019 17:10:38 +0200
Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | require($_SERVER['DOCUMENT_ROOT']."/config.php"); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | require($_SERVER['DOCUMENT_ROOT']."/version.php"); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | #Connect to the database |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | if (! $connect) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | mysqli_set_charset($connect, "utf8" ); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
13 | $escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
14 | $replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b"); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
15 | $rescapers = array("'"); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
16 | $rreplacements = array("\\'"); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
17 | $disallowed = array('visibleindex','uniqueid','boundindex','uid','h_weight','m_weight'); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | if (isset($_POST['insert']) || isset($_POST['update'])) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | if (isset($_POST['insert'])) { |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
21 | $sql = "INSERT INTO `products` SET "; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | if (isset($_POST['update'])) { |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
24 | $sql = "UPDATE `products` SET "; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
26 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
27 | $stage = $_POST['stage']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
28 | |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | // Basic settings |
166
635033a29c48
Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents:
164
diff
changeset
|
30 | if (isset($_POST['uuid'])) { |
635033a29c48
Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents:
164
diff
changeset
|
31 | $sql .= "uuid='" . $_POST['uuid']; |
635033a29c48
Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents:
164
diff
changeset
|
32 | syslog(LOG_NOTICE, 'Keep uuid '); |
635033a29c48
Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents:
164
diff
changeset
|
33 | } else { |
635033a29c48
Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents:
164
diff
changeset
|
34 | $uuid = str_replace("\n", "", file_get_contents('/proc/sys/kernel/random/uuid')); |
635033a29c48
Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents:
164
diff
changeset
|
35 | $sql .= "uuid='" . $uuid; |
635033a29c48
Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents:
164
diff
changeset
|
36 | syslog(LOG_NOTICE, 'New uuid '); |
635033a29c48
Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents:
164
diff
changeset
|
37 | } |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
38 | $sql .= "', name='" . mysqli_real_escape_string($connect, $_POST['name']); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
39 | $sql .= "', code='" . mysqli_real_escape_string($connect, $_POST['code']); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
40 | $sql .= "', birth='" . $_POST['birth']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
41 | $sql .= "', stage='" . $_POST['stage']; |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
42 | $sql .= "', notes='" . mysqli_real_escape_string($connect, $_POST['notes']); |
252
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
43 | $sql .= "', log_brew='" . $_POST['log_brew']; |
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
44 | $sql .= "', log_fermentation='" . $_POST['log_fermentation']; |
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
45 | $sql .= "', inventory_reduced='" . $_POST['inventory_reduced']; |
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
46 | $sql .= "', locked='" . $_POST['locked']; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
47 | // Equipment |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
48 | $sql .= "', eq_name='" . mysqli_real_escape_string($connect, $_POST['eq_name']); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
49 | $sql .= "', eq_boil_size='" . $_POST['eq_boil_size']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
50 | $sql .= "', eq_batch_size='" . $_POST['eq_batch_size']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
51 | $sql .= "', eq_tun_volume='" . $_POST['eq_tun_volume']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
52 | $sql .= "', eq_tun_weight='" . $_POST['eq_tun_weight']; |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
53 | $sql .= "', eq_tun_specific_heat='" . $_POST['eq_tun_specific_heat']; |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
54 | $sql .= "', eq_tun_material='" . $_POST['eq_tun_material']; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
55 | $sql .= "', eq_tun_height='" . $_POST['eq_tun_height']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
56 | $sql .= "', eq_top_up_water='" . $_POST['eq_top_up_water']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
57 | $sql .= "', eq_trub_chiller_loss='" . $_POST['eq_trub_chiller_loss']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
58 | $sql .= "', eq_evap_rate='" . $_POST['eq_evap_rate']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
59 | $sql .= "', eq_boil_time='" . $_POST['eq_boil_time']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
60 | $sql .= "', eq_calc_boil_volume='" . $_POST['eq_calc_boil_volume']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
61 | $sql .= "', eq_top_up_kettle='" . $_POST['eq_top_up_kettle']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
62 | $sql .= "', eq_hop_utilization='" . $_POST['eq_hop_utilization']; |
164
0a5abea575a9
Added the last tab, fermentation to the product editer.
Michiel Broek <mbroek@mbse.eu>
parents:
163
diff
changeset
|
63 | $sql .= "', eq_notes='" . mysqli_real_escape_string($connect, $_POST['eq_notes']); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
64 | $sql .= "', eq_lauter_volume='" . $_POST['eq_lauter_volume']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
65 | $sql .= "', eq_lauter_height='" . $_POST['eq_lauter_height']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
66 | $sql .= "', eq_lauter_deadspace='" . $_POST['eq_lauter_deadspace']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
67 | $sql .= "', eq_kettle_volume='" . $_POST['eq_kettle_volume']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
68 | $sql .= "', eq_kettle_height='" . $_POST['eq_kettle_height']; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
69 | $sql .= "', eq_mash_volume='" . $_POST['eq_mash_volume']; |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
70 | $sql .= "', eq_mash_max='" . $_POST['eq_mash_max']; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
71 | $sql .= "', eq_efficiency='" . $_POST['eq_efficiency']; |
285 | 72 | // brewdate |
73 | if ($_POST['brew_date_start'] == '') | |
74 | $sql .= "', brew_date_start=NULL"; | |
75 | else | |
76 | $sql .= "', brew_date_start='" . $_POST['brew_date_start'] . "'"; | |
77 | $sql .= ", brew_mash_ph='" . $_POST['brew_mash_ph']; | |
78 | $sql .= "', brew_mash_sg='" . $_POST['brew_mash_sg']; | |
79 | $sql .= "', brew_sparge_temperature='" . $_POST['brew_sparge_temperature']; | |
80 | $sql .= "', brew_sparge_volume='" . $_POST['brew_sparge_volume']; | |
81 | $sql .= "', brew_sparge_ph='" . $_POST['brew_sparge_ph']; | |
82 | $sql .= "', brew_preboil_volume='" . $_POST['brew_preboil_volume']; | |
83 | $sql .= "', brew_preboil_sg='" . $_POST['brew_preboil_sg']; | |
84 | $sql .= "', brew_preboil_ph='" . $_POST['brew_preboil_ph']; | |
85 | $sql .= "', brew_aboil_volume='" . $_POST['brew_aboil_volume']; | |
86 | $sql .= "', brew_aboil_sg='" . $_POST['brew_aboil_sg']; | |
87 | $sql .= "', brew_aboil_ph='" . $_POST['brew_aboil_ph']; | |
88 | $sql .= "', brew_aboil_efficiency='" . $_POST['brew_aboil_efficiency']; | |
89 | $sql .= "', brew_cooling_method='" . $_POST['brew_cooling_method']; | |
90 | $sql .= "', brew_cooling_time='" . $_POST['brew_cooling_time']; | |
91 | $sql .= "', brew_cooling_to='" . $_POST['brew_cooling_to']; | |
92 | $sql .= "', brew_whirlpool9='" . $_POST['brew_whirlpool9']; | |
93 | $sql .= "', brew_whirlpool7='" . $_POST['brew_whirlpool7']; | |
94 | $sql .= "', brew_whirlpool6='" . $_POST['brew_whirlpool6']; | |
95 | $sql .= "', brew_whirlpool2='" . $_POST['brew_whirlpool2']; | |
96 | $sql .= "', brew_aeration_time='" . $_POST['brew_aeration_time']; | |
97 | $sql .= "', brew_aeration_speed='" . $_POST['brew_aeration_speed']; | |
98 | $sql .= "', brew_aeration_type='" . $_POST['brew_aeration_type']; | |
99 | $sql .= "', brew_fermenter_volume='" . $_POST['brew_fermenter_volume']; | |
100 | $sql .= "', brew_fermenter_extrawater='" . $_POST['brew_fermenter_extrawater']; | |
101 | $sql .= "', brew_fermenter_tcloss='" . $_POST['brew_fermenter_tcloss']; | |
102 | $sql .= "', brew_fermenter_sg='" . $_POST['brew_fermenter_sg']; | |
103 | $sql .= "', brew_fermenter_ibu='" . $_POST['brew_fermenter_ibu']; | |
104 | $sql .= "', brew_fermenter_color='" . $_POST['brew_fermenter_color']; | |
105 | if ($_POST['brew_date_end'] == '') | |
106 | $sql .= "', brew_date_end=NULL"; | |
107 | else | |
108 | $sql .= "', brew_date_end='" . $_POST['brew_date_end'] . "'"; | |
109 | $sql .= ", og='" . $_POST['og']; | |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
110 | $sql .= "', fg='" . $_POST['fg']; |
285 | 111 | $sql .= "', primary_start_temp='" . $_POST['primary_start_temp']; |
112 | $sql .= "', primary_max_temp='" . $_POST['primary_max_temp']; | |
113 | $sql .= "', primary_end_temp='" . $_POST['primary_end_temp']; | |
114 | if ($_POST['primary_end_date'] == '') | |
115 | $sql .= "', primary_end_date=NULL"; | |
116 | else | |
117 | $sql .= "', primary_end_date='" . $_POST['primary_end_date'] ."'"; | |
118 | $sql .= ", primary_end_sg='" . $_POST['primary_end_sg']; | |
119 | $sql .= "', secondary_temp='" . $_POST['secondary_temp']; | |
120 | if ($_POST['secondary_end_date'] == '') | |
121 | $sql .= "', secondary_end_date=NULL"; | |
122 | else | |
123 | $sql .= "', secondary_end_date='" . $_POST['secondary_end_date'] ."'"; | |
124 | $sql .= ", tertiary_temp='" . $_POST['tertiary_temp']; | |
125 | if ($_POST['package_date'] == '') | |
126 | $sql .= "', package_date=NULL"; | |
127 | else | |
128 | $sql .= "', package_date='" . $_POST['package_date'] ."'"; | |
129 | $sql .= ", bottle_amount='" . $_POST['bottle_amount']; | |
130 | $sql .= "', bottle_carbonation='" . $_POST['bottle_carbonation']; | |
131 | $sql .= "', bottle_priming_sugar='" . $_POST['bottle_priming_sugar']; | |
132 | $sql .= "', bottle_priming_amount='" . $_POST['bottle_priming_amount']; | |
133 | $sql .= "', bottle_carbonation_temp='" . $_POST['bottle_carbonation_temp']; | |
134 | $sql .= "', keg_amount='" . $_POST['keg_amount']; | |
135 | $sql .= "', keg_carbonation='" . $_POST['keg_carbonation']; | |
136 | $sql .= "', keg_priming_sugar='" . $_POST['keg_priming_sugar']; | |
137 | $sql .= "', keg_priming_amount='" . $_POST['keg_priming_amount']; | |
138 | $sql .= "', keg_carbonation_temp='" . $_POST['keg_carbonation_temp']; | |
139 | $sql .= "', keg_forced_carb='" . $_POST['keg_forced_carb']; | |
140 | $sql .= "', keg_pressure='" . $_POST['keg_pressure']; | |
141 | $sql .= "', taste_notes='" . mysqli_real_escape_string($connect, $_POST['taste_notes']); | |
142 | $sql .= "', taste_rate='" . $_POST['taste_rate']; | |
143 | if ($_POST['taste_date'] == '') | |
144 | $sql .= "', taste_date=NULL"; | |
145 | else | |
146 | $sql .= "', taste_date='" . $_POST['taste_date'] . "'"; | |
147 | $sql .= ", taste_color='" . mysqli_real_escape_string($connect, $_POST['taste_color']); | |
148 | $sql .= "', taste_transparency='" . mysqli_real_escape_string($connect, $_POST['taste_transparency']); | |
149 | $sql .= "', taste_head='" . mysqli_real_escape_string($connect, $_POST['taste_head']); | |
150 | $sql .= "', taste_aroma='" . mysqli_real_escape_string($connect, $_POST['taste_aroma']); | |
151 | $sql .= "', taste_taste='" . mysqli_real_escape_string($connect, $_POST['taste_taste']); | |
152 | $sql .= "', taste_mouthfeel='" . mysqli_real_escape_string($connect, $_POST['taste_mouthfeel']); | |
153 | $sql .= "', taste_aftertaste='" . mysqli_real_escape_string($connect, $_POST['taste_aftertaste']); | |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
154 | |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
155 | /* |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
156 | * Recipe part |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
157 | */ |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
158 | $sql .= "', st_name='" . mysqli_real_escape_string($connect, $_POST['st_name']); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
159 | $sql .= "', st_letter='" . mysqli_real_escape_string($connect, $_POST['st_letter']); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
160 | $sql .= "', st_guide='" . mysqli_real_escape_string($connect, $_POST['st_guide']); |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
161 | $sql .= "', st_type='" . $_POST['st_type']; |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
162 | $sql .= "', st_category='" . mysqli_real_escape_string($connect, $_POST['st_category']); |
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
163 | $sql .= "', st_category_number='" . $_POST['st_category_number']; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
164 | $sql .= "', st_og_min='" . $_POST['st_og_min']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
165 | $sql .= "', st_og_max='" . $_POST['st_og_max']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
166 | $sql .= "', st_fg_min='" . $_POST['st_fg_min']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
167 | $sql .= "', st_fg_max='" . $_POST['st_fg_max']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
168 | $sql .= "', st_ibu_min='" . $_POST['st_ibu_min']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
169 | $sql .= "', st_ibu_max='" . $_POST['st_ibu_max']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
170 | $sql .= "', st_color_min='" . $_POST['st_color_min']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
171 | $sql .= "', st_color_max='" . $_POST['st_color_max']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
172 | $sql .= "', st_carb_min='" . $_POST['st_carb_min']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
173 | $sql .= "', st_carb_max='" . $_POST['st_carb_max']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
174 | $sql .= "', st_abv_min='" . $_POST['st_abv_min']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
175 | $sql .= "', st_abv_max='" . $_POST['st_abv_max']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
176 | $sql .= "', type='" . $_POST['type']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
177 | $sql .= "', batch_size='" . $_POST['batch_size']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
178 | $sql .= "', boil_size='" . $_POST['boil_size']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
179 | $sql .= "', boil_time='" . $_POST['boil_time']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
180 | $sql .= "', efficiency='" . $_POST['efficiency']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
181 | $sql .= "', est_og='" . $_POST['est_og']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
182 | $sql .= "', est_fg='" . $_POST['est_fg']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
183 | $sql .= "', est_abv='" . $_POST['est_abv']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
184 | $sql .= "', est_carb='" . $_POST['est_carb']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
185 | $sql .= "', est_color='" . $_POST['est_color']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
186 | $sql .= "', color_method='" . $_POST['color_method']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
187 | $sql .= "', est_ibu='" . $_POST['est_ibu']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
188 | $sql .= "', ibu_method='" . $_POST['ibu_method']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
189 | $sql .= "', sparge_temp='" . $_POST['sparge_temp']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
190 | $sql .= "', sparge_ph='" . $_POST['sparge_ph']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
191 | $sql .= "', sparge_volume='" . $_POST['sparge_volume']; |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
192 | $sql .= "', sparge_source='" . $_POST['sparge_source']; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
193 | $sql .= "', sparge_acid_type='" . $_POST['sparge_acid_type']; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
194 | $sql .= "', sparge_acid_perc='" . $_POST['sparge_acid_perc']; |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
195 | $sql .= "', sparge_acid_amount='" . $_POST['sparge_acid_amount']; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
196 | $sql .= "', mash_ph='" . $_POST['mash_ph']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
197 | $sql .= "', mash_name='" . $_POST['mash_name']; |
252
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
198 | $sql .= "', calc_acid='" . $_POST['calc_acid']; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
199 | if (isset($_POST['w1_name'])) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
200 | $sql .= "', w1_name='" . mysqli_real_escape_string($connect, $_POST['w1_name']); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
201 | $sql .= "', w1_amount='" . $_POST['w1_amount']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
202 | $sql .= "', w1_calcium='" . $_POST['w1_calcium']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
203 | $sql .= "', w1_sulfate='" . $_POST['w1_sulfate']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
204 | $sql .= "', w1_chloride='" . $_POST['w1_chloride']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
205 | $sql .= "', w1_sodium='" . $_POST['w1_sodium']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
206 | $sql .= "', w1_magnesium='" . $_POST['w1_magnesium']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
207 | $sql .= "', w1_total_alkalinity='" . $_POST['w1_total_alkalinity']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
208 | $sql .= "', w1_ph='" . $_POST['w1_ph']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
209 | $sql .= "', w1_cost='" . $_POST['w1_cost']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
210 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
211 | if (isset($_POST['w2_name'])) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
212 | $sql .= "', w2_name='" . mysqli_real_escape_string($connect, $_POST['w2_name']); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
213 | $sql .= "', w2_amount='" . $_POST['w2_amount']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
214 | $sql .= "', w2_calcium='" . $_POST['w2_calcium']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
215 | $sql .= "', w2_sulfate='" . $_POST['w2_sulfate']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
216 | $sql .= "', w2_chloride='" . $_POST['w2_chloride']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
217 | $sql .= "', w2_sodium='" . $_POST['w2_sodium']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
218 | $sql .= "', w2_magnesium='" . $_POST['w2_magnesium']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
219 | $sql .= "', w2_total_alkalinity='" . $_POST['w2_total_alkalinity']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
220 | $sql .= "', w2_ph='" . $_POST['w2_ph']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
221 | $sql .= "', w2_cost='" . $_POST['w2_cost']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
222 | } |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
223 | $sql .= "', wa_acid_name='" . $_POST['wa_acid_name']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
224 | $sql .= "', wa_acid_perc='" . $_POST['wa_acid_perc']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
225 | $sql .= "', wa_base_name='" . $_POST['wa_base_name']; |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
226 | $sql .= "', starter_enable='" . $_POST['starter_enable']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
227 | $sql .= "', starter_type='" . $_POST['starter_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
228 | $sql .= "', starter_sg='" . $_POST['starter_sg']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
229 | $sql .= "', prop1_type='" . $_POST['prop1_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
230 | $sql .= "', prop1_volume='" . $_POST['prop1_volume']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
231 | $sql .= "', prop2_type='" . $_POST['prop2_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
232 | $sql .= "', prop2_volume='" . $_POST['prop2_volume']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
233 | $sql .= "', prop3_type='" . $_POST['prop3_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
234 | $sql .= "', prop3_volume='" . $_POST['prop3_volume']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
235 | $sql .= "', prop4_type='" . $_POST['prop4_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
236 | $sql .= "', prop4_volume='" . $_POST['prop4_volume']; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
237 | syslog(LOG_NOTICE, $sql); |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
238 | |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
239 | $fermentables = '['; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
240 | $comma = FALSE; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
241 | if (isset($_POST['fermentables'])) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
242 | $array = $_POST['fermentables']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
243 | foreach($array as $key => $item){ |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
244 | /* |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
245 | * Manual encode to json. |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
246 | */ |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
247 | if ($comma) |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
248 | $fermentables .= ','; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
249 | $comma = TRUE; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
250 | $fermentable = '{"f_name":"' . str_replace($rescapers,$rreplacements,$item['f_name']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
251 | $fermentable .= '","f_origin":"' . str_replace($rescapers,$rreplacements,$item['f_origin']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
252 | $fermentable .= '","f_supplier":"' . str_replace($rescapers,$rreplacements,$item['f_supplier']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
253 | $fermentable .= '","f_amount":' . $item['f_amount']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
254 | $fermentable .= ',"f_cost":' . $item['f_cost']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
255 | $fermentable .= ',"f_type":' . $item['f_type']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
256 | $fermentable .= ',"f_yield":' . $item['f_yield']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
257 | $fermentable .= ',"f_color":' . $item['f_color']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
258 | $fermentable .= ',"f_coarse_fine_diff":' . $item['f_coarse_fine_diff']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
259 | $fermentable .= ',"f_moisture":' . $item['f_moisture']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
260 | $fermentable .= ',"f_diastatic_power":' . $item['f_diastatic_power']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
261 | $fermentable .= ',"f_protein":' . $item['f_protein']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
262 | $fermentable .= ',"f_dissolved_protein":' . $item['f_dissolved_protein']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
263 | $fermentable .= ',"f_max_in_batch":' . $item['f_max_in_batch']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
264 | $fermentable .= ',"f_graintype":' . $item['f_graintype']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
265 | $fermentable .= ',"f_added":' . $item['f_added']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
266 | $fermentable .= ',"f_recommend_mash":' . $item['f_recommend_mash']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
267 | $fermentable .= ',"f_add_after_boil":' . $item['f_add_after_boil']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
268 | $fermentable .= ',"f_adjust_to_total_100":' . $item['f_adjust_to_total_100']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
269 | $fermentable .= ',"f_percentage":' . $item['f_percentage']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
270 | $fermentable .= ',"f_di_ph":' . $item['f_di_ph']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
271 | $fermentable .= ',"f_acid_to_ph_57":' . $item['f_acid_to_ph_57'] . '}'; |
285 | 272 | //syslog(LOG_NOTICE, $fermentable); |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
273 | $fermentables .= $fermentable; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
274 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
275 | } |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
276 | $fermentables .= ']'; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
277 | $sql .= "', json_fermentables='" . $fermentables; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
278 | |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
279 | $hops = '['; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
280 | $comma = FALSE; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
281 | if (isset($_POST['hops'])) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
282 | $array = $_POST['hops']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
283 | foreach($array as $key => $item){ |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
284 | if ($comma) |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
285 | $hops .= ','; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
286 | $comma = TRUE; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
287 | $hop = '{"h_name":"' . str_replace($rescapers,$rreplacements,$item['h_name']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
288 | $hop .= '","h_origin":"' . str_replace($rescapers,$rreplacements,$item['h_origin']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
289 | $hop .= '","h_amount":' . $item['h_amount']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
290 | $hop .= ',"h_cost":' . $item['h_cost']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
291 | $hop .= ',"h_type":' . $item['h_type']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
292 | $hop .= ',"h_form":' . $item['h_form']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
293 | $hop .= ',"h_useat":' . $item['h_useat']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
294 | $hop .= ',"h_time":' . $item['h_time']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
295 | $hop .= ',"h_alpha":' . $item['h_alpha']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
296 | $hop .= ',"h_beta":' . $item['h_beta']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
297 | $hop .= ',"h_hsi":' . $item['h_hsi']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
298 | $hop .= ',"h_humulene":' . $item['h_humulene']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
299 | $hop .= ',"h_caryophyllene":' . $item['h_caryophyllene']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
300 | $hop .= ',"h_cohumulone":' . $item['h_cohumulone']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
301 | $hop .= ',"h_myrcene":' . $item['h_myrcene']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
302 | $hop .= ',"h_total_oil":' . $item['h_total_oil'] . '}'; |
285 | 303 | //syslog(LOG_NOTICE, $hop); |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
304 | $hops .= $hop; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
305 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
306 | } |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
307 | $hops .= ']'; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
308 | $sql .= "', json_hops='" . $hops; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
309 | |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
310 | $miscs = '['; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
311 | $comma = FALSE; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
312 | if (isset($_POST['miscs'])) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
313 | $array = $_POST['miscs']; |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
314 | foreach($array as $key => $item){ |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
315 | if ($comma) |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
316 | $miscs .= ','; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
317 | $comma = TRUE; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
318 | $misc = '{"m_name":"' . str_replace($rescapers,$rreplacements,$item['m_name']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
319 | $misc .= '","m_amount":' . $item['m_amount']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
320 | $misc .= ',"m_type":' . $item['m_type']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
321 | $misc .= ',"m_use_use":' . $item['m_use_use']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
322 | $misc .= ',"m_time":' . $item['m_time']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
323 | $misc .= ',"m_amount_is_weight":' . $item['m_amount_is_weight']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
324 | $misc .= ',"m_cost":' . $item['m_cost'] . '}'; |
285 | 325 | //syslog(LOG_NOTICE, $misc); |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
326 | $miscs .= $misc; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
327 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
328 | } |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
329 | $miscs .= ']'; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
330 | $sql .= "', json_miscs='" . $miscs; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
331 | |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
332 | $yeasts = '['; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
333 | $comma = FALSE; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
334 | if (isset($_POST['yeasts'])) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
335 | $array = $_POST['yeasts']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
336 | foreach($array as $key => $item){ |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
337 | if ($comma) |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
338 | $yeasts .= ','; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
339 | $comma = TRUE; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
340 | $yeast = '{"y_name":"' . str_replace($rescapers,$rreplacements,$item['y_name']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
341 | $yeast .= '","y_laboratory":"' . str_replace($rescapers,$rreplacements,$item['y_laboratory']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
342 | $yeast .= '","y_product_id":"' . str_replace($rescapers,$rreplacements,$item['y_product_id']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
343 | $yeast .= '","y_amount":' . $item['y_amount']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
344 | $yeast .= ',"y_type":' . $item['y_type']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
345 | $yeast .= ',"y_form":' . $item['y_form']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
346 | $yeast .= ',"y_min_temperature":' . $item['y_min_temperature']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
347 | $yeast .= ',"y_max_temperature":' . $item['y_max_temperature']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
348 | $yeast .= ',"y_flocculation":' . $item['y_flocculation']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
349 | $yeast .= ',"y_attenuation":' . $item['y_attenuation']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
350 | $yeast .= ',"y_cells":' . $item['y_cells']; |
332
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
326
diff
changeset
|
351 | $yeast .= ',"y_tolerance":' . $item['y_tolerance']; |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
352 | $yeast .= ',"y_inventory":' . $item['y_inventory']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
353 | $yeast .= ',"y_use":' . $item['y_use']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
354 | $yeast .= ',"y_cost":' . $item['y_cost'] . '}'; |
285 | 355 | //syslog(LOG_NOTICE, $yeast); |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
356 | $yeasts .= $yeast; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
357 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
358 | } |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
359 | $yeasts .= ']'; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
360 | $sql .= "', json_yeasts='" . $yeasts; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
361 | |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
362 | $mashs = '['; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
363 | $comma = FALSE; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
364 | if (isset($_POST['mashs'])) { |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
365 | $array = $_POST['mashs']; |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
366 | foreach($array as $key => $item){ |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
367 | if ($comma) |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
368 | $mashs .= ','; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
369 | $comma = TRUE; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
370 | $mash = '{"step_name":"' . str_replace($rescapers,$rreplacements,$item['step_name']); |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
371 | $mash .= '","step_type":' . $item['step_type']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
372 | if (isset($item['step_infuse_amount']) && $item['step_infuse_amount'] != "") |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
373 | $mash .= ',"step_infuse_amount":' . $item['step_infuse_amount']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
374 | else |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
375 | $mash .= ',"step_infuse_amount":0'; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
376 | $mash .= ',"step_temp":' . $item['step_temp']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
377 | $mash .= ',"step_time":' . $item['step_time']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
378 | $mash .= ',"ramp_time":' . $item['ramp_time']; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
379 | $mash .= ',"end_temp":' . $item['end_temp'] . '}'; |
285 | 380 | //syslog(LOG_NOTICE, $mash); |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
381 | $mashs .= $mash; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
382 | } |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
383 | } |
238
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
384 | $mashs .= ']'; |
8e7384587a10
Adjusted product save into the database.
Michiel Broek <mbroek@mbse.eu>
parents:
237
diff
changeset
|
385 | $sql .= "', json_mashs='" . $mashs; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
386 | |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
387 | if (isset($_POST['insert'])) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
388 | $sql .= "';"; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
389 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
390 | if (isset($_POST['update'])) { |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
391 | $sql .= "' WHERE record='" . $_POST['record'] . "';"; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
392 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
393 | |
159
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
394 | $result = mysqli_query($connect, $sql); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
395 | if (! $result) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
396 | syslog(LOG_NOTICE, "db_product: result: ".mysqli_error($connect)); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
397 | } else { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
398 | if (isset($_POST['update'])) { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
399 | syslog(LOG_NOTICE, "db_product: updated record ".$_POST['record']); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
400 | } else { |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
401 | $lastid = mysqli_insert_id($connect); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
402 | syslog(LOG_NOTICE, "db_product: inserted record ".$lastid); |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
403 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
404 | } |
6428dae0605d
Backport water treatment to the product editor (inluding the bugs).
Michiel Broek <mbroek@mbse.eu>
parents:
151
diff
changeset
|
405 | echo $result; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
406 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
407 | } else if (isset($_POST['delete'])) { |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
408 | /* |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
409 | * DELETE command. |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
410 | */ |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
411 | $sql = "DELETE FROM `products` WHERE uuid='".$_POST['uuid']."';"; |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
412 | $result = mysqli_query($connect, $sql); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
413 | if (! $result) { |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
414 | syslog(LOG_NOTICE, "db_product: ".$sql." result: ".mysqli_error($connect)); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
415 | } else { |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
416 | syslog(LOG_NOTICE, "db_product: deleted product uuid ".$_POST['uuid']); |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
417 | } |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
418 | echo $result; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
419 | |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
420 | } else { |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
421 | /* |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
422 | * SELECT, produce a list of products that are not yet Closed. |
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
423 | */ |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
424 | if (isset($_GET['select']) && ($_GET['select'] == "inprod")) { |
321
4116e6184609
The products in production list now shows carbonation and mature period. Also the planned brewdate.
Michiel Broek <mbroek@mbse.eu>
parents:
299
diff
changeset
|
425 | $query = "SELECT record,name,code,birth,stage,brew_date_start,package_date FROM products WHERE stage != '11' ORDER BY birth,code;"; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
426 | $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
427 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
428 | $brews[] = array( |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
429 | 'record' => $row['record'], |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
430 | 'name' => $row['name'], |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
431 | 'code' => $row['code'], |
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
432 | 'birth' => $row['birth'], |
321
4116e6184609
The products in production list now shows carbonation and mature period. Also the planned brewdate.
Michiel Broek <mbroek@mbse.eu>
parents:
299
diff
changeset
|
433 | 'stage' => $row['stage'], |
4116e6184609
The products in production list now shows carbonation and mature period. Also the planned brewdate.
Michiel Broek <mbroek@mbse.eu>
parents:
299
diff
changeset
|
434 | 'brew_date' => substr($row['brew_date_start'], 0, 10), |
4116e6184609
The products in production list now shows carbonation and mature period. Also the planned brewdate.
Michiel Broek <mbroek@mbse.eu>
parents:
299
diff
changeset
|
435 | 'package_date' => $row['package_date'] |
114
4935e86b2775
Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents:
112
diff
changeset
|
436 | ); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
437 | } |
296
69fadd1aded2
Updated design document. Add content header application/json to all scripts that produce json output. Chart prints show the beer code and name in the header. Charts don't display the menu anymore.
Michiel Broek <mbroek@mbse.eu>
parents:
292
diff
changeset
|
438 | header("Content-type: application/json"); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
439 | echo json_encode($brews, JSON_UNESCAPED_UNICODE); |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
440 | return; |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
441 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
442 | |
290 | 443 | if (isset($_GET['select']) && ($_GET['select'] == "archname")) { |
292
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
444 | $query = "SELECT record,name,code,brew_date_start,st_name,og,fg,batch_size FROM products WHERE stage = '11' ORDER BY name,brew_date_start;"; |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
445 | $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
446 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
447 | $brews[] = array( |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
448 | 'record' => $row['record'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
449 | 'name' => $row['name'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
450 | 'code' => $row['code'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
451 | 'date' => substr($row['brew_date_start'], 0, 10), |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
452 | 'style' => $row['st_name'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
453 | 'og' => $row['og'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
454 | 'fg' => $row['fg'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
455 | 'batch_size' => $row['batch_size'] |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
456 | ); |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
457 | } |
296
69fadd1aded2
Updated design document. Add content header application/json to all scripts that produce json output. Chart prints show the beer code and name in the header. Charts don't display the menu anymore.
Michiel Broek <mbroek@mbse.eu>
parents:
292
diff
changeset
|
458 | header("Content-type: application/json"); |
292
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
459 | echo json_encode($brews, JSON_UNESCAPED_UNICODE); |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
460 | return; |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
461 | } |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
462 | |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
463 | if (isset($_GET['select']) && ($_GET['select'] == "archcode")) { |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
464 | $query = "SELECT record,name,code,brew_date_start,st_name,og,fg,batch_size FROM products WHERE stage = '11' ORDER BY code;"; |
290 | 465 | $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); |
466 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { | |
467 | $brews[] = array( | |
468 | 'record' => $row['record'], | |
469 | 'name' => $row['name'], | |
470 | 'code' => $row['code'], | |
292
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
471 | 'date' => substr($row['brew_date_start'], 0, 10), |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
472 | 'style' => $row['st_name'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
473 | 'og' => $row['og'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
474 | 'fg' => $row['fg'], |
290 | 475 | 'batch_size' => $row['batch_size'] |
476 | ); | |
477 | } | |
296
69fadd1aded2
Updated design document. Add content header application/json to all scripts that produce json output. Chart prints show the beer code and name in the header. Charts don't display the menu anymore.
Michiel Broek <mbroek@mbse.eu>
parents:
292
diff
changeset
|
478 | header("Content-type: application/json"); |
292
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
479 | echo json_encode($brews, JSON_UNESCAPED_UNICODE); |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
480 | return; |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
481 | } |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
482 | |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
483 | if (isset($_GET['select']) && ($_GET['select'] == "archdate")) { |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
484 | $query = "SELECT record,name,code,brew_date_start,st_name,og,fg,batch_size FROM products WHERE stage = '11' ORDER BY brew_date_start;"; |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
485 | $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
486 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
487 | $brews[] = array( |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
488 | 'record' => $row['record'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
489 | 'name' => $row['name'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
490 | 'code' => $row['code'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
491 | 'year' => substr($row['brew_date_start'], 0, 4), |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
492 | 'date' => substr($row['brew_date_start'], 0, 10), |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
493 | 'style' => $row['st_name'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
494 | 'og' => $row['og'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
495 | 'fg' => $row['fg'], |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
496 | 'batch_size' => $row['batch_size'] |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
497 | ); |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
498 | } |
296
69fadd1aded2
Updated design document. Add content header application/json to all scripts that produce json output. Chart prints show the beer code and name in the header. Charts don't display the menu anymore.
Michiel Broek <mbroek@mbse.eu>
parents:
292
diff
changeset
|
499 | header("Content-type: application/json"); |
292
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
500 | echo json_encode($brews, JSON_UNESCAPED_UNICODE); |
90cd3798edc2
Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents:
290
diff
changeset
|
501 | return; |
290 | 502 | } |
503 | ||
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
504 | /* |
185
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
505 | * SELECT, produce a list of products that can be fermented. |
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
506 | */ |
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
507 | if (isset($_GET['select']) && ($_GET['select'] == "ferment")) { |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
508 | $query = "SELECT code,name,uuid,stage,json_yeasts FROM products WHERE "; |
326
bf5fa5277c9f
Allow to select beer that is in carbonation stage
Michiel Broek <mbroek@mbse.eu>
parents:
321
diff
changeset
|
509 | $query .= "stage='1' OR stage='2' OR stage='3' OR stage='4' OR stage='5' OR stage='6' OR stage='7' ORDER BY code;"; |
185
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
510 | $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); |
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
511 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
512 | $yl = 0; |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
513 | $yh = 40; |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
514 | $yeasts = json_decode($row['json_yeasts'], true); |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
515 | for ($i = 0; $i < count($yeasts); $i++) { |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
516 | if ($yeasts[$i]['y_use'] == 0) { // Primary |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
517 | if (floatval($yeasts[$i]['y_min_temperature']) > $yl) |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
518 | $yl = floatval($yeasts[$i]['y_min_temperature']); |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
519 | if (floatval($yeasts[$i]['y_max_temperature']) < $yh) |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
520 | $yh = floatval($yeasts[$i]['y_max_temperature']); |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
521 | } |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
522 | } |
185
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
523 | $brews[] = array( |
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
524 | 'code' => $row['code'], |
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
525 | 'name' => $row['name'], |
192
7f69b43e6084
Implemented beer uuid product in monitor fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
526 | 'uuid' => $row['uuid'], |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
527 | 'stage' => $row['stage'], |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
528 | 'yeast_lo' => $yl, |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
296
diff
changeset
|
529 | 'yeast_hi' => $yh |
185
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
530 | ); |
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
531 | } |
296
69fadd1aded2
Updated design document. Add content header application/json to all scripts that produce json output. Chart prints show the beer code and name in the header. Charts don't display the menu anymore.
Michiel Broek <mbroek@mbse.eu>
parents:
292
diff
changeset
|
532 | header("Content-type: application/json"); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
533 | echo json_encode($brews, JSON_UNESCAPED_UNICODE); |
185
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
534 | return; |
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
535 | } |
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
536 | |
4c25db9e8102
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
Michiel Broek <mbroek@mbse.eu>
parents:
166
diff
changeset
|
537 | /* |
119
ae5e8d740173
Renamed some fields in prod_main to prevent ambigous names with the join. Delete product also deletes the corresponding recipe. Fixed equipment load and save. Read data from the product main joined with prod_recipes completed. The brewday page is now almost complete, the calculations must be added.
Michiel Broek <mbroek@mbse.eu>
parents:
115
diff
changeset
|
538 | * Default, select all or a given record. |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
539 | */ |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
540 | if (isset($_GET['record'])) { |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
541 | $query = "SELECT * FROM products WHERE record='" . $_GET['record'] . "';"; |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
542 | } else { |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
543 | $query = "SELECT * FROM products ORDER BY birth,code;"; |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
544 | } |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
545 | $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
546 | $brews = '['; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
547 | $comma = FALSE; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
548 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
549 | // Manual encode to JSON. |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
550 | if ($comma) |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
551 | $brews .= ','; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
552 | $comma = TRUE; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
553 | $brew = '{"record":' . $row['record']; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
554 | $brew .= ',"uuid":"' . str_replace($escapers, $replacements, $row['uuid']); |
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
555 | $brew .= '","name":"' . str_replace($escapers, $replacements, $row['name']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
556 | $brew .= '","code":"' . str_replace($escapers, $replacements, $row['code']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
557 | $brew .= '","birth":"' . str_replace($escapers, $replacements, $row['birth']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
558 | $brew .= '","stage":' . $row['stage']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
559 | $brew .= ',"notes":"' . str_replace($escapers, $replacements, $row['notes']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
560 | $brew .= '","log_brew":' . $row['log_brew']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
561 | $brew .= ',"log_fermentation":' . $row['log_fermentation']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
562 | $brew .= ',"inventory_reduced":' . $row['inventory_reduced']; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
563 | $brew .= ',"locked":' . $row['locked']; |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
564 | $brew .= ',"eq_name":"' . str_replace($escapers, $replacements, $row['eq_name']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
565 | $brew .= '","eq_notes":"' . str_replace($escapers, $replacements, $row['eq_notes']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
566 | $brew .= '","eq_boil_size":' . floatval($row['eq_boil_size']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
567 | $brew .= ',"eq_batch_size":' . floatval($row['eq_batch_size']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
568 | $brew .= ',"eq_tun_volume":' . floatval($row['eq_tun_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
569 | $brew .= ',"eq_tun_weight":' . floatval($row['eq_tun_weight']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
570 | $brew .= ',"eq_tun_specific_heat":' . floatval($row['eq_tun_specific_heat']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
571 | $brew .= ',"eq_tun_material":' . $row['eq_tun_material']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
572 | $brew .= ',"eq_tun_height":' . floatval($row['eq_tun_height']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
573 | $brew .= ',"eq_top_up_water":' . floatval($row['eq_top_up_water']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
574 | $brew .= ',"eq_trub_chiller_loss":' . floatval($row['eq_trub_chiller_loss']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
575 | $brew .= ',"eq_evap_rate":' . floatval($row['eq_evap_rate']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
576 | $brew .= ',"eq_boil_time":' . floatval($row['eq_boil_time']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
577 | $brew .= ',"eq_calc_boil_volume":' . $row['eq_calc_boil_volume']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
578 | $brew .= ',"eq_calc_boil_volume":' . floatval($row['eq_calc_boil_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
579 | $brew .= ',"eq_top_up_kettle":' . floatval($row['eq_top_up_kettle']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
580 | $brew .= ',"eq_hop_utilization":' . floatval($row['eq_hop_utilization']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
581 | $brew .= ',"eq_lauter_volume":' . floatval($row['eq_lauter_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
582 | $brew .= ',"eq_lauter_height":' . floatval($row['eq_lauter_height']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
583 | $brew .= ',"eq_lauter_deadspace":' . floatval($row['eq_lauter_deadspace']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
584 | $brew .= ',"eq_kettle_volume":' . floatval($row['eq_kettle_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
585 | $brew .= ',"eq_kettle_height":' . floatval($row['eq_kettle_height']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
586 | $brew .= ',"eq_mash_volume":' . floatval($row['eq_mash_volume']); |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
587 | $brew .= ',"eq_mash_max":' . floatval($row['eq_mash_max']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
588 | $brew .= ',"eq_efficiency":' . floatval($row['eq_efficiency']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
589 | $brew .= ',"eq_top_up_water":' . floatval($row['eq_top_up_water']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
590 | $brew .= ',"brew_date_start":"' . $row['brew_date_start']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
591 | $brew .= '","brew_mash_ph":' . floatval($row['brew_mash_ph']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
592 | $brew .= ',"brew_mash_sg":' . floatval($row['brew_mash_sg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
593 | $brew .= ',"brew_sparge_temperature":' . floatval($row['brew_sparge_temperature']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
594 | $brew .= ',"brew_sparge_volume":' . floatval($row['brew_sparge_volume']); |
121
875aeb365e1c
Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents:
119
diff
changeset
|
595 | $brew .= ',"brew_sparge_ph":' . floatval($row['brew_sparge_ph']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
596 | $brew .= ',"brew_preboil_volume":' . floatval($row['brew_preboil_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
597 | $brew .= ',"brew_preboil_sg":' . floatval($row['brew_preboil_sg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
598 | $brew .= ',"brew_preboil_ph":' . floatval($row['brew_preboil_ph']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
599 | $brew .= ',"brew_aboil_volume":' . floatval($row['brew_aboil_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
600 | $brew .= ',"brew_aboil_sg":' . floatval($row['brew_aboil_sg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
601 | $brew .= ',"brew_aboil_ph":' . floatval($row['brew_aboil_ph']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
602 | $brew .= ',"brew_aboil_efficiency":' . floatval($row['brew_aboil_efficiency']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
603 | $brew .= ',"brew_cooling_method":' . $row['brew_cooling_method']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
604 | $brew .= ',"brew_cooling_time":' . floatval($row['brew_cooling_time']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
605 | $brew .= ',"brew_cooling_to":' . floatval($row['brew_cooling_to']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
606 | $brew .= ',"brew_whirlpool9":' . floatval($row['brew_whirlpool9']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
607 | $brew .= ',"brew_whirlpool7":' . floatval($row['brew_whirlpool7']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
608 | $brew .= ',"brew_whirlpool6":' . floatval($row['brew_whirlpool6']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
609 | $brew .= ',"brew_whirlpool2":' . floatval($row['brew_whirlpool2']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
610 | $brew .= ',"brew_fermenter_volume":' . floatval($row['brew_fermenter_volume']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
611 | $brew .= ',"brew_fermenter_extrawater":' . floatval($row['brew_fermenter_extrawater']); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
612 | $brew .= ',"brew_fermenter_tcloss":' . floatval($row['brew_fermenter_tcloss']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
613 | $brew .= ',"brew_aeration_time":' . floatval($row['brew_aeration_time']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
614 | $brew .= ',"brew_aeration_speed":' . floatval($row['brew_aeration_speed']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
615 | $brew .= ',"brew_aeration_type":' . $row['brew_aeration_type']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
616 | $brew .= ',"brew_fermenter_sg":' . floatval($row['brew_fermenter_sg']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
617 | $brew .= ',"brew_fermenter_ibu":' . floatval($row['brew_fermenter_ibu']); |
254
3d61397fe9cd
Rework the volume to the fermenter and things that depend on that. New layout on the brewday tab. The calculation model is simpler then the brouwhulp version.
Michiel Broek <mbroek@mbse.eu>
parents:
252
diff
changeset
|
618 | $brew .= ',"brew_fermenter_color":' . floatval($row['brew_fermenter_color']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
619 | $brew .= ',"brew_date_end":"' . $row['brew_date_end']; |
252
b558f3dfcda3
Make sure all boolean values are saved correctly in the database.
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
620 | $brew .= '","og":' . floatval($row['og']); |
163
4a4cc3497a57
Added the packaging tab contents.
Michiel Broek <mbroek@mbse.eu>
parents:
159
diff
changeset
|
621 | $brew .= ',"fg":' . floatval($row['fg']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
622 | $brew .= ',"primary_start_temp":' . floatval($row['primary_start_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
623 | $brew .= ',"primary_max_temp":' . floatval($row['primary_max_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
624 | $brew .= ',"primary_end_temp":' . floatval($row['primary_end_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
625 | $brew .= ',"primary_end_sg":' . floatval($row['primary_end_sg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
626 | $brew .= ',"primary_end_date":"' . $row['primary_end_date']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
627 | $brew .= '","secondary_temp":' . floatval($row['secondary_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
628 | $brew .= ',"secondary_end_date":"' . $row['secondary_end_date']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
629 | $brew .= '","tertiary_temp":' . floatval($row['tertiary_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
630 | $brew .= ',"package_date":"' . $row['package_date']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
631 | $brew .= '","bottle_amount":' . floatval($row['bottle_amount']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
632 | $brew .= ',"bottle_carbonation":' . floatval($row['bottle_carbonation']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
633 | $brew .= ',"bottle_priming_sugar":' . $row['bottle_priming_sugar']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
634 | $brew .= ',"bottle_priming_amount":' . floatval($row['bottle_priming_amount']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
635 | $brew .= ',"bottle_carbonation_temp":' . floatval($row['bottle_carbonation_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
636 | $brew .= ',"keg_amount":' . floatval($row['keg_amount']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
637 | $brew .= ',"keg_carbonation":' . floatval($row['keg_carbonation']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
638 | $brew .= ',"keg_priming_sugar":' . $row['keg_priming_sugar']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
639 | $brew .= ',"keg_priming_amount":' . floatval($row['keg_priming_amount']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
640 | $brew .= ',"keg_carbonation_temp":' . floatval($row['keg_carbonation_temp']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
641 | $brew .= ',"keg_forced_carb":' . floatval($row['keg_forced_carb']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
642 | $brew .= ',"keg_pressure":' . floatval($row['keg_pressure']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
643 | $brew .= ',"taste_notes":"' . str_replace($escapers, $replacements, $row['taste_notes']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
644 | $brew .= '","taste_rate":' . floatval($row['taste_rate']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
645 | $brew .= ',"taste_date":"' . str_replace($escapers, $replacements, $row['taste_date']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
646 | $brew .= '","taste_color":"' . str_replace($escapers, $replacements, $row['taste_color']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
647 | $brew .= '","taste_transparency":"' . str_replace($escapers, $replacements, $row['taste_transparency']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
648 | $brew .= '","taste_head":"' . str_replace($escapers, $replacements, $row['taste_head']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
649 | $brew .= '","taste_aroma":"' . str_replace($escapers, $replacements, $row['taste_aroma']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
650 | $brew .= '","taste_taste":"' . str_replace($escapers, $replacements, $row['taste_taste']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
651 | $brew .= '","taste_mouthfeel":"' . str_replace($escapers, $replacements, $row['taste_mouthfeel']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
652 | $brew .= '","taste_aftertaste":"' . str_replace($escapers, $replacements, $row['taste_aftertaste']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
653 | $brew .= '","st_guide":"' . str_replace($escapers, $replacements, $row['st_guide']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
654 | $brew .= '","st_letter":"' . str_replace($escapers, $replacements, $row['st_letter']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
655 | $brew .= '","st_name":"' . str_replace($escapers, $replacements, $row['st_name']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
656 | $brew .= '","st_type":' . $row['st_type']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
657 | $brew .= ',"st_category":"' . str_replace($escapers, $replacements, $row['st_category']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
658 | $brew .= '","st_category_number":' . floatval($row['st_category_number']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
659 | $brew .= ',"st_og_min":' . floatval($row['st_og_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
660 | $brew .= ',"st_og_max":' . floatval($row['st_og_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
661 | $brew .= ',"st_fg_min":' . floatval($row['st_fg_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
662 | $brew .= ',"st_fg_max":' . floatval($row['st_fg_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
663 | $brew .= ',"st_ibu_min":' . floatval($row['st_ibu_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
664 | $brew .= ',"st_ibu_max":' . floatval($row['st_ibu_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
665 | $brew .= ',"st_color_min":' . floatval($row['st_color_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
666 | $brew .= ',"st_color_max":' . floatval($row['st_color_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
667 | $brew .= ',"st_carb_min":' . floatval($row['st_carb_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
668 | $brew .= ',"st_carb_max":' . floatval($row['st_carb_max']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
669 | $brew .= ',"st_abv_min":' . floatval($row['st_abv_min']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
670 | $brew .= ',"st_abv_max":' . floatval($row['st_abv_max']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
671 | $brew .= ',"type":' . $row['type']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
672 | $brew .= ',"batch_size":' . floatval($row['batch_size']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
673 | $brew .= ',"boil_size":' . floatval($row['boil_size']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
674 | $brew .= ',"boil_time":' . floatval($row['boil_time']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
675 | $brew .= ',"efficiency":' . floatval($row['efficiency']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
676 | $brew .= ',"est_og":' . floatval($row['est_og']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
677 | $brew .= ',"est_fg":' . floatval($row['est_fg']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
678 | $brew .= ',"est_abv":' . floatval($row['est_abv']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
679 | $brew .= ',"est_carb":' . floatval($row['est_carb']); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
680 | $brew .= ',"est_color":' . floatval($row['est_color']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
681 | $brew .= ',"color_method":' . $row['color_method']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
682 | $brew .= ',"est_ibu":' . floatval($row['est_ibu']); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
683 | $brew .= ',"ibu_method":' . $row['ibu_method']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
684 | $brew .= ',"sparge_temp":' . floatval($row['sparge_temp']); |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
685 | $brew .= ',"sparge_ph":' . floatval($row['sparge_ph']); |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
686 | $brew .= ',"sparge_volume":' . floatval($row['sparge_volume']); |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
687 | $brew .= ',"sparge_source":' . $row['sparge_source']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
688 | $brew .= ',"sparge_acid_type":' . $row['sparge_acid_type']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
689 | $brew .= ',"sparge_acid_perc":' . floatval($row['sparge_acid_perc']); |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
690 | $brew .= ',"sparge_acid_amount":' . floatval($row['sparge_acid_amount']); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
691 | $brew .= ',"mash_ph":' . $row['mash_ph']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
692 | $brew .= ',"mash_name":"' . $row['mash_name']; |
149
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
693 | $brew .= '","calc_acid":' . $row['calc_acid']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
694 | $brew .= ',"w1_name":"' . str_replace($escapers, $replacements, $row['w1_name']); |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
695 | $brew .= '","w1_amount":' . $row['w1_amount']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
696 | $brew .= ',"w1_calcium":' . $row['w1_calcium']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
697 | $brew .= ',"w1_sulfate":' . $row['w1_sulfate']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
698 | $brew .= ',"w1_chloride":' . $row['w1_chloride']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
699 | $brew .= ',"w1_sodium":' . $row['w1_sodium']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
700 | $brew .= ',"w1_magnesium":' . $row['w1_magnesium']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
701 | $brew .= ',"w1_total_alkalinity":' . $row['w1_total_alkalinity']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
702 | $brew .= ',"w1_ph":' . $row['w1_ph']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
703 | $brew .= ',"w1_cost":' . $row['w1_cost']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
704 | $brew .= ',"w2_name":"' . str_replace($escapers, $replacements, $row['w2_name']); |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
705 | $brew .= '","w2_amount":' . $row['w2_amount']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
706 | $brew .= ',"w2_calcium":' . $row['w2_calcium']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
707 | $brew .= ',"w2_sulfate":' . $row['w2_sulfate']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
708 | $brew .= ',"w2_chloride":' . $row['w2_chloride']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
709 | $brew .= ',"w2_sodium":' . $row['w2_sodium']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
710 | $brew .= ',"w2_magnesium":' . $row['w2_magnesium']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
711 | $brew .= ',"w2_total_alkalinity":' . $row['w2_total_alkalinity']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
712 | $brew .= ',"w2_ph":' . $row['w2_ph']; |
ff45488d480e
Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents:
121
diff
changeset
|
713 | $brew .= ',"w2_cost":' . $row['w2_cost']; |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
714 | $brew .= ',"wa_acid_name":' . $row['wa_acid_name']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
715 | $brew .= ',"wa_acid_perc":' . $row['wa_acid_perc']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
716 | $brew .= ',"wa_base_name":' . $row['wa_base_name']; |
278
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
717 | $brew .= ',"starter_enable":' . $row['starter_enable']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
718 | $brew .= ',"starter_type":' . $row['starter_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
719 | $brew .= ',"starter_sg":' . $row['starter_sg']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
720 | $brew .= ',"prop1_type":' . $row['prop1_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
721 | $brew .= ',"prop1_volume":' . $row['prop1_volume']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
722 | $brew .= ',"prop2_type":' . $row['prop2_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
723 | $brew .= ',"prop2_volume":' . $row['prop2_volume']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
724 | $brew .= ',"prop3_type":' . $row['prop3_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
725 | $brew .= ',"prop3_volume":' . $row['prop3_volume']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
726 | $brew .= ',"prop4_type":' . $row['prop4_type']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
727 | $brew .= ',"prop4_volume":' . $row['prop4_volume']; |
dc22dd5d77fd
Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
728 | |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
729 | if (isset($_GET['record'])) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
730 | // Append stock information. |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
731 | $fermentables = json_decode($row['json_fermentables'], true); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
732 | for ($i = 0; $i < count($fermentables); $i++) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
733 | $fermentables[$i]['f_inventory'] = 0; // Not in stock |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
734 | $fermentables[$i]['f_avail'] = 0; // Ingredient not in db |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
735 | $sql2 = "SELECT inventory FROM inventory_fermentables "; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
736 | $sql2 .= "WHERE name='".str_replace($rescapers, $rreplacements, $fermentables[$i]['f_name'])."' AND"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
737 | $sql2 .= " supplier='".str_replace($rescapers, $rreplacements, $fermentables[$i]['f_supplier'])."'"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
738 | if ($result2 = mysqli_query($connect, $sql2)) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
739 | if ($obj = mysqli_fetch_object($result2)) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
740 | $fermentables[$i]['f_inventory'] = floatval($obj->inventory); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
741 | $fermentables[$i]['f_avail'] = 1; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
742 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
743 | mysqli_free_result($result2); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
744 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
745 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
746 | $brew .= ',"fermentables":' . json_encode($fermentables, JSON_UNESCAPED_UNICODE); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
747 | |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
748 | $hops = json_decode($row['json_hops'], true); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
749 | for ($i = 0; $i < count($hops); $i++) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
750 | $hops[$i]['h_inventory'] = 0; // Not in stock |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
751 | $hops[$i]['h_avail'] = 0; // Ingredient not in db |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
752 | $sql2 = "SELECT inventory FROM inventory_hops "; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
753 | $sql2 .= "WHERE name='".str_replace($rescapers, $rreplacements, $hops[$i]['h_name'])."' AND"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
754 | $sql2 .= " origin='".str_replace($rescapers, $rreplacements, $hops[$i]['h_origin'])."' AND"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
755 | $sql2 .= " form='".$hops[$i]['h_form']."'"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
756 | if ($result2 = mysqli_query($connect, $sql2)) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
757 | if ($obj = mysqli_fetch_object($result2)) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
758 | $hops[$i]['h_inventory'] = floatval($obj->inventory); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
759 | $hops[$i]['h_avail'] = 1; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
760 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
761 | mysqli_free_result($result2); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
762 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
763 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
764 | $brew .= ',"hops":' . json_encode($hops, JSON_UNESCAPED_UNICODE); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
765 | |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
766 | $miscs = json_decode($row['json_miscs'], true); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
767 | for ($i = 0; $i < count($miscs); $i++) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
768 | $miscs[$i]['m_inventory'] = 0; // Not in stock |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
769 | $miscs[$i]['m_avail'] = 0; // Ingredient not in db |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
770 | $sql2 = "SELECT inventory FROM inventory_miscs "; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
771 | $sql2 .= "WHERE name='".str_replace($rescapers, $rreplacements, $miscs[$i]['m_name'])."' AND"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
772 | $sql2 .= " type='".$miscs[$i]['m_type']."'"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
773 | if ($result2 = mysqli_query($connect, $sql2)) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
774 | if ($obj = mysqli_fetch_object($result2)) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
775 | $miscs[$i]['m_inventory'] = floatval($obj->inventory); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
776 | $miscs[$i]['m_avail'] = 1; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
777 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
778 | mysqli_free_result($result2); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
779 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
780 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
781 | $brew .= ',"miscs":' . json_encode($miscs, JSON_UNESCAPED_UNICODE); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
782 | |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
783 | $yeasts = json_decode($row['json_yeasts'], true); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
784 | for ($i = 0; $i < count($yeasts); $i++) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
785 | $yeasts[$i]['y_inventory'] = 0; // Not in stock |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
786 | $yeasts[$i]['y_avail'] = 0; // Ingredient not in db |
332
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
326
diff
changeset
|
787 | $sql2 = "SELECT inventory,tolerance FROM inventory_yeasts "; |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
788 | $sql2 .= "WHERE name='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_name'])."' AND"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
789 | $sql2 .= " form='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_form'])."' AND"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
790 | $sql2 .= " laboratory='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_laboratory'])."' AND"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
791 | $sql2 .= " product_id='".str_replace($rescapers, $rreplacements, $yeasts[$i]['y_product_id'])."'"; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
792 | if ($result2 = mysqli_query($connect, $sql2)) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
793 | if ($obj = mysqli_fetch_object($result2)) { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
794 | $yeasts[$i]['y_inventory'] = floatval($obj->inventory); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
795 | $yeasts[$i]['y_avail'] = 1; |
332
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
326
diff
changeset
|
796 | if ($yeasts[$i]['y_tolerance'] == 0) { |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
326
diff
changeset
|
797 | $yeasts[$i]['y_tolerance'] = floatval($obj->tolerance); // Upgrade alcohol tolerance |
f0ca77097236
Display alcohol tolerance in the yeast editor. Display in red when the recipe estimate is higher then the yeast tolerance.
Michiel Broek <mbroek@mbse.eu>
parents:
326
diff
changeset
|
798 | } |
235
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
799 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
800 | mysqli_free_result($result2); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
801 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
802 | } |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
803 | $brew .= ',"yeasts":' . json_encode($yeasts, JSON_UNESCAPED_UNICODE); |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
804 | } else { |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
805 | // Just leave it |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
806 | $brew .= ',"fermentables":' . $row['json_fermentables']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
807 | $brew .= ',"hops":' . $row['json_hops']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
808 | $brew .= ',"miscs":' . $row['json_miscs']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
809 | $brew .= ',"yeasts":' . $row['json_yeasts']; |
0a063ac5d7f5
Recipes in progress loading uses indexes. Recipe from database has added inventory information for the ingredients.
Michiel Broek <mbroek@mbse.eu>
parents:
192
diff
changeset
|
810 | } |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
811 | $brew .= ',"mashs":' . $row['json_mashs']; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
812 | $brew .= '}'; |
151
2c9cfe2f0860
Merged prod_main and prod_recipe database tables into products. Added recipe tabs in the products editor.
Michiel Broek <mbroek@mbse.eu>
parents:
149
diff
changeset
|
813 | // syslog(LOG_NOTICE, $brew); |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
814 | $brews .= $brew; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
815 | } |
115
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
816 | $brews .= ']'; |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
817 | header("Content-type: application/json"); |
ad31f4bd4036
Inventory database script added missing fields. Product database script added JOIN with the prod_recipes table.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
818 | echo $brews; |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
819 | } |
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
820 | ?> |