Thu, 10 Feb 2022 22:15:10 +0100
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | require($_SERVER['DOCUMENT_ROOT']."/config.php"); |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | require($_SERVER['DOCUMENT_ROOT']."/version.php"); |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | #Connect to the database |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME); |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | if (! $connect) { |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | } |
77
a9f8de2d7b2b
Fixed most charset problems. Added fpdf library. Added inventory pdf creation.
Michiel Broek <mbroek@mbse.eu>
parents:
50
diff
changeset
|
11 | mysqli_set_charset($connect, "utf8" ); |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | |
120 | 13 | $rescapers = array("'"); |
14 | $rreplacements = array("\\'"); | |
50
6d94167c2697
Next steps to implement a recipe editor
Michiel Broek <mbroek@mbse.eu>
parents:
45
diff
changeset
|
15 | |
768
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
16 | $response = array( |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
17 | 'error' => false, |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
18 | 'msg' => 'Ok', |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
19 | ); |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
20 | |
213
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
21 | if (isset($_POST['insert']) || isset($_POST['update'])) { |
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
22 | if (isset($_POST['insert'])) { |
120 | 23 | $sql = "INSERT INTO"; |
24 | } | |
213
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
25 | if (isset($_POST['update'])) { |
120 | 26 | $sql = "UPDATE"; |
27 | } | |
785
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
28 | $sql .= " `profile_mash` SET "; |
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
29 | if (isset($_POST['uuid']) && (strlen($_POST['uuid']) == 36)) { |
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
30 | $sql .= "uuid='" . $_POST['uuid']; |
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
31 | } else { |
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
32 | $uuid = str_replace("\n", "", file_get_contents('/proc/sys/kernel/random/uuid')); |
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
33 | $sql .= "uuid='" . $uuid; |
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
34 | } |
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
35 | $sql .= "', name='" . mysqli_real_escape_string($connect, $_POST['name']); |
213
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
36 | $sql .= "', notes='" . mysqli_real_escape_string($connect, $_POST['notes']); |
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
37 | $array = $_POST['steps']; |
215
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
38 | $comma = FALSE; |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
39 | $steps = '['; |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
40 | foreach($array as $key => $item) { |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
41 | /* |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
42 | * Manual encode to json. This eliminates the wrong UTF-8 encodings |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
43 | * but also removes the unwanted fields. |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
44 | */ |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
45 | if ($comma) |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
46 | $steps.= ','; |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
47 | $steps .= '{"step_name":"' . str_replace($rescapers,$rreplacements,$item['step_name']); |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
48 | $steps .= '","step_type":' . $item['step_type']; |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
49 | $steps .= ',"step_temp":' . $item['step_temp']; |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
50 | $steps .= ',"end_temp":' . $item['end_temp']; |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
51 | $steps .= ',"step_time":' . $item['step_time']; |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
52 | $steps .= ',"ramp_time":' . $item['ramp_time'] . '}'; |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
53 | $comma = TRUE; |
120 | 54 | } |
215
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
55 | $steps .= ']'; |
83cee005d2d9
Fixed the utf-8 problems when storing json arrays on the server by using manual encoding. The json-encode function sucks for this project. Added step detail edit screen instead of on grid cell editing. This must go into the product and recipe editors too.
Michiel Broek <mbroek@mbse.eu>
parents:
214
diff
changeset
|
56 | $sql .= "', steps='" . $steps; |
213
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
57 | if (isset($_POST['insert'])) { |
120 | 58 | $sql .= "';"; |
59 | } | |
213
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
60 | if (isset($_POST['update'])) { |
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
61 | $sql .= "' WHERE record='" . $_POST['record'] . "';"; |
120 | 62 | } |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
63 | $result = mysqli_query($connect, $sql); |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
64 | if (! $result) { |
45
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
38
diff
changeset
|
65 | syslog(LOG_NOTICE, "db_profile_mash: ".$sql." result: ".mysqli_error($connect)); |
768
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
66 | $response['error'] = true; |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
67 | $response['msg'] = "SQL fout: ".mysqli_error($connect); |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
68 | } |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
69 | exit(json_encode($response)); |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
70 | |
213
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
71 | } else if (isset($_POST['delete'])) { |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
72 | // DELETE COMMAND |
213
b0d484a5525e
First step to make profile mash work with indexes and make the edit screen universal.
Michiel Broek <mbroek@mbse.eu>
parents:
120
diff
changeset
|
73 | $sql = "DELETE FROM `profile_mash` WHERE record='".$_POST['record']."';"; |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
74 | $result = mysqli_query($connect, $sql); |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
75 | if (! $result) { |
45
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
38
diff
changeset
|
76 | syslog(LOG_NOTICE, "db_profile_mash: ".$sql." result: ".mysqli_error($connect)); |
768
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
77 | $response['error'] = true; |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
78 | $response['msg'] = "SQL fout: ".mysqli_error($connect); |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
79 | } |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
80 | exit(json_encode($response)); |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
81 | |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
82 | } else { |
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
83 | // SELECT COMMAND |
785
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
84 | $query = "SELECT record,JSON_QUOTE(name),JSON_QUOTE(notes),steps,JSON_QUOTE(uuid) FROM profile_mash ORDER BY name"; |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
85 | $result = mysqli_query($connect, $query) or die("SQL Error 1: " . mysqli_error($connect)); |
38
b7d44c98d609
Initial setup for mash steps editing.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
86 | $mashprofiles = '['; |
b7d44c98d609
Initial setup for mash steps editing.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
87 | $comma = FALSE; |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
88 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
38
b7d44c98d609
Initial setup for mash steps editing.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
89 | // Manual encode to JSON. |
b7d44c98d609
Initial setup for mash steps editing.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
90 | if ($comma) { |
b7d44c98d609
Initial setup for mash steps editing.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
91 | $mashprofiles .= ','; |
b7d44c98d609
Initial setup for mash steps editing.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
92 | } |
b7d44c98d609
Initial setup for mash steps editing.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
93 | $comma = TRUE; |
736
d3d8e3b30a34
Use mariadb JSON support for mash and fermentation profiles.
Michiel Broek <mbroek@mbse.eu>
parents:
716
diff
changeset
|
94 | $mashprofile = '{"record":' . $row['record']; |
d3d8e3b30a34
Use mariadb JSON support for mash and fermentation profiles.
Michiel Broek <mbroek@mbse.eu>
parents:
716
diff
changeset
|
95 | $mashprofile .= ',"name":' . $row['JSON_QUOTE(name)']; |
d3d8e3b30a34
Use mariadb JSON support for mash and fermentation profiles.
Michiel Broek <mbroek@mbse.eu>
parents:
716
diff
changeset
|
96 | $mashprofile .= ',"notes":' . $row['JSON_QUOTE(notes)']; |
785
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
97 | $mashprofile .= ',"steps":' . $row['steps']; |
aa79acfdf8a9
Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents:
768
diff
changeset
|
98 | $mashprofile .= ',"uuid":' . $row['JSON_QUOTE(uuid)'] . '}'; |
736
d3d8e3b30a34
Use mariadb JSON support for mash and fermentation profiles.
Michiel Broek <mbroek@mbse.eu>
parents:
716
diff
changeset
|
99 | $mashprofiles .= $mashprofile; |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
100 | } |
38
b7d44c98d609
Initial setup for mash steps editing.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
101 | $mashprofiles .= ']'; |
b7d44c98d609
Initial setup for mash steps editing.
Michiel Broek <mbroek@mbse.eu>
parents:
25
diff
changeset
|
102 | header("Content-type: application/json"); |
768
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
103 | exit($mashprofiles); |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
104 | } |
768
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
105 | |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
106 | syslog(LOG_NOTICE, "db_profile_mash: missing arguments"); |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
107 | $response['error'] = true; |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
108 | $response['msg'] = "missing arguments"; |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
109 | echo json_encode($response); |
ae1195153fa2
Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents:
736
diff
changeset
|
110 | |
23
4b157d7a1cee
Added first part of mash profiles. Steps are in the database but not in the web ui.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
111 | ?> |