Fri, 28 Sep 2018 17:29:23 +0200
Added category and type to the recipe style. Added tooltips in the edit screen. Added Alcohol and Carbonation to the recipe style. Redesigned the main edit window and added the style limits.
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | /***************************************************************************** |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | * Copyright (C) 2014-2018 |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | * Michiel Broek <mbroek at mbse dot eu> |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | * This file is part of Brewery Management System |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | * This is free software; you can redistribute it and/or modify it |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | * under the terms of the GNU General Public License as published by the |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | * Free Software Foundation; either version 2, or (at your option) any |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * later version. |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * BrewCloud is distributed in the hope that it will be useful, but |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | * General Public License for more details. |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | * along with ThermFerm; see the file COPYING. If not, write to the Free |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | *****************************************************************************/ |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | /* |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | * Look for the style names in the jqwidgets/styles directory. |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | */ |
30
f5ab22446aa5
Inventory fermentables and hops to standard weight format.
Michiel Broek <mbroek@mbse.eu>
parents:
23
diff
changeset
|
27 | //$my_style = 'ui-darkness'; |
f5ab22446aa5
Inventory fermentables and hops to standard weight format.
Michiel Broek <mbroek@mbse.eu>
parents:
23
diff
changeset
|
28 | $my_style = 'ui-mbse'; |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | require_once($_SERVER['DOCUMENT_ROOT'].'/config.php'); |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | require_once($_SERVER['DOCUMENT_ROOT'].'/version.php'); |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | |
68 | 33 | if (isset($_GET['record'])) |
34 | $my_record = $_GET['record']; | |
35 | else | |
36 | $my_record = -1; | |
37 | if (isset($_GET['return'])) | |
38 | $my_return = $_GET['return']; | |
39 | else | |
40 | $my_return = ''; | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
41 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | function page_header($title, $loadjs) { |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
43 | global $my_style; |
11 | 44 | global $my_version; |
68 | 45 | global $my_record; |
46 | global $my_return; | |
11 | 47 | ?> |
48 | <!DOCTYPE html> | |
49 | <html lang=nl-NL> | |
50 | <head> | |
51 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
52 | <title>BMS v<?php echo $my_version;?> - <?php echo $title;?></title> | |
53 | <link type="text/css" href="css/style.css" rel="stylesheet" media="all" /> | |
54 | <link type="text/css" href="jqwidgets/styles/jqx.base.css" rel="stylesheet" /> | |
55 | <link type="text/css" href="jqwidgets/styles/jqx.<?php echo $my_style; ?>.css" rel="stylesheet" /> | |
56 | <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> | |
57 | <script> | |
58 | var theme = "<?php echo $my_style; ?>"; | |
68 | 59 | var my_record = "<?php echo $my_record; ?>"; |
60 | var my_return = "<?php echo $my_return; ?>"; | |
11 | 61 | </script> |
62 | <script src="js/jquery-1.11.1.min.js"></script> | |
63 | <script src="jqwidgets/jqxcore.js"></script> | |
64 | <script src="jqwidgets/jqxwindow.js"></script> | |
65 | <script src="jqwidgets/jqxmenu.js"></script> | |
50
6d94167c2697
Next steps to implement a recipe editor
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
66 | <script src="jqwidgets/jqxtabs.js"></script> |
11 | 67 | <script src="jqwidgets/jqxdata.js"></script> |
39 | 68 | <script src="jqwidgets/jqxdata.export.js"></script> |
11 | 69 | <script src="jqwidgets/jqxbuttons.js"></script> |
70 | <script src="jqwidgets/jqxscrollbar.js"></script> | |
71 | <script src="jqwidgets/jqxgrid.js"></script> | |
50
6d94167c2697
Next steps to implement a recipe editor
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
72 | <script src="jqwidgets/jqxgrid.grouping.js"></script> |
39 | 73 | <script src="jqwidgets/jqxgrid.edit.js"></script> |
74 | <script src="jqwidgets/jqxgrid.sort.js"></script> | |
11 | 75 | <script src="jqwidgets/jqxgrid.pager.js"></script> |
76 | <script src="jqwidgets/jqxgrid.filter.js"></script> | |
77 | <script src="jqwidgets/jqxgrid.selection.js"></script> | |
78 | <script src="jqwidgets/jqxnumberinput.js"></script> | |
79 | <script src="jqwidgets/jqxlistbox.js"></script> | |
80 | <script src="jqwidgets/jqxdropdownlist.js"></script> | |
81 | <script src="jqwidgets/jqxdropdownbutton.js"></script> | |
82 | <script src="jqwidgets/jqxinput.js"></script> | |
83 | <script src="jqwidgets/jqxeditor.js"></script> | |
84 | <script src="jqwidgets/jqxtooltip.js"></script> | |
85 | <script src="jqwidgets/jqxcheckbox.js"></script> | |
86 | <script src="jqwidgets/jqxdatetimeinput.js"></script> | |
87 | <script src="jqwidgets/jqxcalendar.js"></script> | |
16 | 88 | <script src="jqwidgets/jqxgauge.js"></script> |
89 | <script src="jqwidgets/jqxdraw.js"></script> | |
11 | 90 | <script src="jqwidgets/globalization/globalize.js"></script> |
91 | <script src="js/global.js"></script> | |
92 | <?php | |
93 | if (strlen($loadjs)) | |
94 | echo ' <script src="js/'.$loadjs.'.js"></script>'.PHP_EOL; | |
95 | ?> | |
96 | </head> | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
97 | |
11 | 98 | <body class="default"> |
99 | <div id="jqxWidget"> | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
100 | |
11 | 101 | <!-- Menu --> |
102 | <div id="jqxMenu"> | |
103 | <ul> | |
15 | 104 | <li><a href="index.php">Home</a></li> |
11 | 105 | <li>Monitoren |
106 | <ul> | |
15 | 107 | <li>Systemen |
108 | <ul> | |
109 | <?php | |
48
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
110 | $connect = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
111 | $result = mysqli_query($connect, "SELECT uuid,node,online,net_address FROM mon_nodes ORDER BY node"); |
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
112 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
16 | 113 | echo ' <li><a href="mon_node.php?uuid='.$row['uuid'].'">'.$row['node'].'</a></li>'.PHP_EOL; |
15 | 114 | } |
115 | mysqli_free_result($result); | |
116 | ?> | |
117 | </ul> | |
118 | </li> | |
119 | <li>Klimaatkasten | |
120 | <ul> | |
121 | <?php | |
48
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
122 | $result = mysqli_query($connect, "SELECT uuid,node,alias,online,mode FROM mon_fermenters ORDER BY node,alias"); |
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
123 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
16 | 124 | echo ' <li><a href="mon_fermenter.php?uuid='.$row['uuid'].'">'.$row['node'].'/'.$row['alias'].'</a></li>'.PHP_EOL; |
15 | 125 | } |
126 | mysqli_free_result($result); | |
127 | ?> | |
128 | </ul> | |
129 | </li> | |
11 | 130 | </ul> |
131 | </li> | |
45
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
132 | <li>Productie |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
133 | </li> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
134 | <li>Recepten |
48
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
135 | <ul> |
67
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
136 | <li><a href="rec_main.php">Recepten</a></li> |
50
6d94167c2697
Next steps to implement a recipe editor
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
137 | <li>Import</li> |
48
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
138 | </ul> |
45
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
139 | </li> |
11 | 140 | <li>Inventaris |
141 | <ul> | |
142 | <li><a href="inv_suppliers.php">Leveranciers</a></li> | |
15 | 143 | <li><a href="inv_fermentables.php">Vergistbare ingredienten</a></li> |
11 | 144 | <li><a href="inv_hops.php">Hoppen</a></li> |
15 | 145 | <li><a href="inv_yeasts.php">Gisten</a></li> |
146 | <li><a href="inv_miscs.php">Overige ingredienten</a></li> | |
46
ff9be9dbcac0
Renamed inevntory water sources to inventory waters
Michiel Broek <mbroek@mbse.eu>
parents:
45
diff
changeset
|
147 | <li><a href="inv_waters.php">Brouwwater</a></li> |
11 | 148 | <li><a href="inv_equipments.php">Brouw apparatuur</a></li> |
30
f5ab22446aa5
Inventory fermentables and hops to standard weight format.
Michiel Broek <mbroek@mbse.eu>
parents:
23
diff
changeset
|
149 | <li><a href="inv_instock.php">Voorraad lijst</a></li> |
11 | 150 | </ul> |
151 | </li> | |
45
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
152 | <li>Profielen |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
153 | <ul> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
154 | <li><a href="profile_water.php">Water profielen</a></li> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
155 | <li><a href="profile_mash.php">Maisch schemas</a></li> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
156 | <li><a href="profile_styles.php">Bierstijlen</a></li> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
157 | </ul> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
158 | </li> |
11 | 159 | <li>Over |
160 | <ul> | |
67
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
161 | <li><a href="gen_about.php">Informatie</a></li> |
11 | 162 | </ul> |
163 | </li> | |
164 | </ul> | |
165 | </div> <!-- End menu --> | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
166 | |
11 | 167 | <?php |
168 | } | |
169 | ||
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
170 | |
11 | 171 | function confirm_delete() { |
172 | ?> | |
173 | <div id="eventWindow"> | |
174 | <div> | |
175 | Bevestig verwijderen | |
176 | </div> | |
177 | <div> | |
178 | <div> | |
179 | Klik "OK" om dit record definitief te verwijderen.<br> | |
180 | Druk "Cancel" om te sluiten zonder dit record te verwijderen. | |
181 | </div> | |
182 | <div> | |
183 | <div style="float: right; margin-top: 15px; margin-bottom: 10px;"> | |
184 | <input type="button" id="delOk" value="OK" style="margin-right: 15px" /> | |
185 | <input type="button" id="delCancel" value="Cancel" style="margin-right: 65px" /> | |
186 | </div> | |
187 | </div> | |
188 | </div> | |
189 | </div> | |
190 | ||
191 | <?php | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
192 | } |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
193 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
194 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
195 | function page_footer() { |
11 | 196 | ?> |
197 | </div> <!-- jqxWidget --> | |
198 | </body> | |
199 | </html> | |
200 | <?php | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
201 | } |
11 | 202 | ?> |