189 $misc .= ',"m_type":' . $item['m_type']; |
189 $misc .= ',"m_type":' . $item['m_type']; |
190 $misc .= ',"m_use_use":' . $item['m_use_use']; |
190 $misc .= ',"m_use_use":' . $item['m_use_use']; |
191 $misc .= ',"m_time":' . $item['m_time']; |
191 $misc .= ',"m_time":' . $item['m_time']; |
192 $misc .= ',"m_amount_is_weight":' . $item['m_amount_is_weight']; |
192 $misc .= ',"m_amount_is_weight":' . $item['m_amount_is_weight']; |
193 $misc .= ',"m_cost":' . $item['m_cost'] . '}'; |
193 $misc .= ',"m_cost":' . $item['m_cost'] . '}'; |
194 syslog(LOG_NOTICE, $misc); |
194 //syslog(LOG_NOTICE, $misc); |
195 $miscs .= $misc; |
195 $miscs .= $misc; |
196 } |
196 } |
197 } |
197 } |
198 $miscs .= ']'; |
198 $miscs .= ']'; |
199 $sql .= "', json_miscs='" . $miscs; |
199 $sql .= "', json_miscs='" . $miscs; |
200 |
200 |
|
201 $yeasts = '['; |
|
202 $comma = FALSE; |
201 if (isset($_POST['yeasts'])) { |
203 if (isset($_POST['yeasts'])) { |
202 $array = $_POST['yeasts']; |
204 $array = $_POST['yeasts']; |
203 foreach($array as $key => $item){ |
205 foreach($array as $key => $item) { |
204 foreach ($disallowed as $disallowed_key) { |
206 if ($comma) |
205 unset($array[$key]["$disallowed_key"]); |
207 $yeasts .= ','; |
206 } |
208 $comma = TRUE; |
207 } |
209 $yeast = '{"y_name":"' . str_replace($rescapers,$rreplacements,$item['y_name']); |
208 syslog(LOG_NOTICE, "json_yeasts: ". str_replace($rescapers,$rreplacements,json_encode($array))); |
210 $yeast .= '","y_laboratory":"' . str_replace($rescapers,$rreplacements,$item['y_laboratory']); |
209 $sql .= "', json_yeasts='" . str_replace($rescapers,$rreplacements,json_encode($array)); |
211 $yeast .= '","y_product_id":"' . str_replace($rescapers,$rreplacements,$item['y_product_id']); |
210 } |
212 $yeast .= '","y_amount":' . $item['y_amount']; |
|
213 $yeast .= ',"y_type":' . $item['y_type']; |
|
214 $yeast .= ',"y_form":' . $item['y_form']; |
|
215 $yeast .= ',"y_min_temperature":' . $item['y_min_temperature']; |
|
216 $yeast .= ',"y_max_temperature":' . $item['y_max_temperature']; |
|
217 $yeast .= ',"y_flocculation":' . $item['y_flocculation']; |
|
218 $yeast .= ',"y_attenuation":' . $item['y_attenuation']; |
|
219 $yeast .= ',"y_cells":' . $item['y_cells']; |
|
220 $yeast .= ',"y_inventory":' . $item['y_inventory']; |
|
221 $yeast .= ',"y_use":' . $item['y_use']; |
|
222 $yeast .= ',"y_cost":' . $item['y_cost'] . '}'; |
|
223 syslog(LOG_NOTICE, $yeast); |
|
224 $yeasts .= $yeast; |
|
225 } |
|
226 } |
|
227 $yeasts .= ']'; |
|
228 $sql .= "', json_yeasts='" . $yeasts; |
211 |
229 |
212 if (isset($_POST['mashs'])) { |
230 if (isset($_POST['mashs'])) { |
213 $array = $_POST['mashs']; |
231 $array = $_POST['mashs']; |
214 foreach($array as $key => $item){ |
232 foreach($array as $key => $item){ |
215 foreach ($disallowed as $disallowed_key) { |
233 foreach ($disallowed as $disallowed_key) { |