Sat, 06 Aug 2022 21:15:21 +0200
Packagig is now a viewer.
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 | /***************************************************************************** |
812 | 3 | * Copyright (C) 2014-2022 |
10
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; | |
180
a5aa3502310c
Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
172
diff
changeset
|
37 | if (isset($_GET['uuid'])) |
a5aa3502310c
Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
172
diff
changeset
|
38 | $my_uuid = $_GET['uuid']; |
a5aa3502310c
Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
172
diff
changeset
|
39 | else |
a5aa3502310c
Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
172
diff
changeset
|
40 | $my_uuid = ''; |
68 | 41 | if (isset($_GET['return'])) |
42 | $my_return = $_GET['return']; | |
43 | else | |
44 | $my_return = ''; | |
172
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
45 | if (isset($_GET['code'])) |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
46 | $my_code = $_GET['code']; |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
47 | else |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
48 | $my_code = ''; |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
49 | if (isset($_GET['name'])) |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
50 | $my_name = $_GET['name']; |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
51 | else |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
52 | $my_name = ''; |
302
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
297
diff
changeset
|
53 | if (isset($_GET['select'])) |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
297
diff
changeset
|
54 | $my_select = $_GET['select']; |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
297
diff
changeset
|
55 | else |
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
297
diff
changeset
|
56 | $my_select = ''; |
497
0fe366d953ab
Prepare screens for product divide batch.
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
57 | if (isset($_GET['split'])) |
0fe366d953ab
Prepare screens for product divide batch.
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
58 | $my_split = $_GET['split']; |
0fe366d953ab
Prepare screens for product divide batch.
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
59 | else |
0fe366d953ab
Prepare screens for product divide batch.
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
60 | $my_split = 0; |
498
10c6eeee60ce
Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
497
diff
changeset
|
61 | if (isset($_GET['stage'])) |
10c6eeee60ce
Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
497
diff
changeset
|
62 | $my_stage = $_GET['stage']; |
10c6eeee60ce
Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
497
diff
changeset
|
63 | else |
10c6eeee60ce
Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
497
diff
changeset
|
64 | $my_stage = 0; |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
65 | |
100
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
66 | $escapers = array("\\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
67 | $replacements = array("\\\\", "\\/", "\\\"", "\\n", "\\r", "\\t", "\\f", "\\b"); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
68 | |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
69 | /* Load setup record */ |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
70 | #Connect to the database |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
71 | $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
72 | if (! $connect) { |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
73 | die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
74 | } |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
75 | mysqli_set_charset($connect, "utf8" ); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
76 | $my_default_water = $my_brewery_name = $my_ibu_method = $my_color_method = ''; |
446 | 77 | $my_factor_mashhop = $my_factor_fwh = $my_factor_pellet = $my_factor_plug = $my_factor_wethop = $my_factor_cryohop = 0; |
100
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
78 | $my_brix_correction = $my_grain_absorbtion = 1.0; |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
79 | |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
80 | $result = mysqli_query($connect, "SELECT * FROM profile_setup WHERE record='1'") or die("SQL Error 1: " . mysqli_error($connect)); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
81 | if ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
82 | /* search water name */ |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
83 | $wresult = mysqli_query($connect, "SELECT name FROM inventory_waters WHERE record='".$row['default_water']."';"); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
84 | if ($wrow = mysqli_fetch_array($wresult, MYSQLI_ASSOC)) |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
85 | $my_default_water = str_replace($escapers, $replacements, $wrow['name']); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
86 | $my_brewery_name = str_replace($escapers, $replacements, $row['brewery_name']); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
87 | $my_factor_mashhop = floatval($row['factor_mashhop']); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
88 | $my_factor_fwh= floatval($row['factor_fwh']); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
89 | $my_factor_pellet= floatval($row['factor_pellet']); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
90 | $my_factor_plug= floatval($row['factor_plug']); |
289
4082c41f45e9
Added the use and calculation of wet hops. Assume 5.5 times more hops needed by weight.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
91 | $my_factor_wethop = floatval($row['factor_wethop']); |
446 | 92 | $my_factor_cryohop = floatval($row['factor_cryohop']); |
289
4082c41f45e9
Added the use and calculation of wet hops. Assume 5.5 times more hops needed by weight.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
93 | $my_ibu_method = $row['ibu_method']; |
4082c41f45e9
Added the use and calculation of wet hops. Assume 5.5 times more hops needed by weight.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
94 | $my_color_method = $row['color_method']; |
100
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
95 | $my_brix_correction = floatval($row['brix_correction']); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
96 | $my_grain_absorbtion = floatval($row['grain_absorbtion']); |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
97 | } |
172
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
98 | |
100
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
99 | |
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
100 | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
101 | function page_header($title, $loadjs) { |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
102 | global $my_style; |
11 | 103 | global $my_version; |
68 | 104 | global $my_record; |
180
a5aa3502310c
Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
172
diff
changeset
|
105 | global $my_uuid; |
68 | 106 | global $my_return; |
172
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
107 | global $my_name; |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
108 | global $my_code; |
302
d0f7b4ab000f
Added product export screen with choices to export to beerxml, duplicate product or copy to recipe. Products in wait state can now be deleted.
Michiel Broek <mbroek@mbse.eu>
parents:
297
diff
changeset
|
109 | global $my_select; |
498
10c6eeee60ce
Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
497
diff
changeset
|
110 | global $my_stage; |
497
0fe366d953ab
Prepare screens for product divide batch.
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
111 | global $my_split; |
100
08c92cb740b9
Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents:
99
diff
changeset
|
112 | global $my_brewery_name; |
101
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
113 | global $my_factor_mashhop; |
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
114 | global $my_factor_fwh; |
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
115 | global $my_factor_pellet; |
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
116 | global $my_factor_plug; |
289
4082c41f45e9
Added the use and calculation of wet hops. Assume 5.5 times more hops needed by weight.
Michiel Broek <mbroek@mbse.eu>
parents:
231
diff
changeset
|
117 | global $my_factor_wethop; |
446 | 118 | global $my_factor_cryohop; |
101
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
119 | global $my_ibu_method; |
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
120 | global $my_color_method; |
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
121 | global $my_brix_correction; |
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
122 | global $my_grain_absorbtion; |
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
123 | global $my_default_water; |
11 | 124 | ?> |
125 | <!DOCTYPE html> | |
126 | <html lang=nl-NL> | |
127 | <head> | |
128 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
129 | <title>BMS v<?php echo $my_version;?> - <?php echo $title;?></title> | |
667
1246550451ca
Removed the last compressed css file. Reworked all mash steps, implemented deconction steps. Added calculations for infuse amounts and decoctions amounts. The mash steps are now manually sorted in the editor grids to have full control over the steps order. Display errors in red in the grid. Updated beerxml export, the product checklist and print output of the products and recipes for all these mash steps changes.
Michiel Broek <mbroek@mbse.eu>
parents:
626
diff
changeset
|
130 | <link type="text/css" href="css/style.css" rel="stylesheet" media="all" /> |
11 | 131 | <link type="text/css" href="jqwidgets/styles/jqx.base.css" rel="stylesheet" /> |
132 | <link type="text/css" href="jqwidgets/styles/jqx.<?php echo $my_style; ?>.css" rel="stylesheet" /> | |
369 | 133 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
11 | 134 | <script> |
468
371f2da785d9
Code optimisation for compressed javascript
Michiel Broek <mbroek@mbse.eu>
parents:
464
diff
changeset
|
135 | var theme = "<?php echo $my_style; ?>", my_record = "<?php echo $my_record; ?>", |
498
10c6eeee60ce
Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
497
diff
changeset
|
136 | my_return = "<?php echo $my_return; ?>", my_name = "<?php echo $my_name; ?>", my_stage = "<?php echo $my_stage; ?>", |
497
0fe366d953ab
Prepare screens for product divide batch.
Michiel Broek <mbroek@mbse.eu>
parents:
468
diff
changeset
|
137 | my_code = "<?php echo $my_code; ?>", my_uuid = "<?php echo $my_uuid; ?>", my_split = "<?php echo $my_split; ?>", |
468
371f2da785d9
Code optimisation for compressed javascript
Michiel Broek <mbroek@mbse.eu>
parents:
464
diff
changeset
|
138 | my_select = "<?php echo $my_select; ?>", my_brewery_name = "<?php echo $my_brewery_name; ?>", my_factor_mashhop = "<?php echo $my_factor_mashhop; ?>", |
371f2da785d9
Code optimisation for compressed javascript
Michiel Broek <mbroek@mbse.eu>
parents:
464
diff
changeset
|
139 | my_factor_fwh = "<?php echo $my_factor_fwh; ?>", my_factor_pellet = "<?php echo $my_factor_pellet; ?>", |
371f2da785d9
Code optimisation for compressed javascript
Michiel Broek <mbroek@mbse.eu>
parents:
464
diff
changeset
|
140 | my_factor_plug = "<?php echo $my_factor_plug; ?>", my_factor_wethop = "<?php echo $my_factor_wethop; ?>", |
371f2da785d9
Code optimisation for compressed javascript
Michiel Broek <mbroek@mbse.eu>
parents:
464
diff
changeset
|
141 | my_factor_cryohop = "<?php echo $my_factor_cryohop; ?>", my_ibu_method = "<?php echo $my_ibu_method; ?>", |
371f2da785d9
Code optimisation for compressed javascript
Michiel Broek <mbroek@mbse.eu>
parents:
464
diff
changeset
|
142 | my_color_method = "<?php echo $my_color_method; ?>", my_brix_correction = "<?php echo $my_brix_correction; ?>", |
371f2da785d9
Code optimisation for compressed javascript
Michiel Broek <mbroek@mbse.eu>
parents:
464
diff
changeset
|
143 | my_grain_absorbtion = "<?php echo $my_grain_absorbtion; ?>", my_default_water = "<?php echo $my_default_water; ?>"; |
11 | 144 | </script> |
522
35675eadc655
Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents:
509
diff
changeset
|
145 | <script src="js/jquery-1.11.1.js"></script> |
679
48f8f3fce7c0
Added reconnecting-websocket.js to automatic reconnect the websocket if the connection is lost. Usefull for mobile devices that go to sleep after a while. Changed mon_fermenters to use websockets instead of polling. Fixed wrong temperature color ranges on the fermenter monior. Increased the websocket receive buffer to 2048. In cannot overflow, but larger messages are chunked and the application does not handle these split messages. Needs termferm 0.9.9 or newer.
Michiel Broek <mbroek@mbse.eu>
parents:
671
diff
changeset
|
146 | <script src="js/reconnecting-websocket.min.js"></script> |
11 | 147 | <script src="jqwidgets/jqxcore.js"></script> |
148 | <script src="jqwidgets/jqxwindow.js"></script> | |
149 | <script src="jqwidgets/jqxmenu.js"></script> | |
50
6d94167c2697
Next steps to implement a recipe editor
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
150 | <script src="jqwidgets/jqxtabs.js"></script> |
11 | 151 | <script src="jqwidgets/jqxdata.js"></script> |
39 | 152 | <script src="jqwidgets/jqxdata.export.js"></script> |
129
7f41b61c3faf
Added a loader during recipe load. Recalculate percentages if a fermentable row is deleted. Don't edit amounts if using weight percentages. Update grid percentages if a fermentable amount is changed. Recalculate IBU's after changes with fermentables.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
153 | <script src="jqwidgets/jqxloader.js"></script> |
11 | 154 | <script src="jqwidgets/jqxbuttons.js"></script> |
155 | <script src="jqwidgets/jqxscrollbar.js"></script> | |
156 | <script src="jqwidgets/jqxgrid.js"></script> | |
50
6d94167c2697
Next steps to implement a recipe editor
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
157 | <script src="jqwidgets/jqxgrid.grouping.js"></script> |
39 | 158 | <script src="jqwidgets/jqxgrid.edit.js"></script> |
159 | <script src="jqwidgets/jqxgrid.sort.js"></script> | |
11 | 160 | <script src="jqwidgets/jqxgrid.pager.js"></script> |
161 | <script src="jqwidgets/jqxgrid.filter.js"></script> | |
162 | <script src="jqwidgets/jqxgrid.selection.js"></script> | |
163 | <script src="jqwidgets/jqxnumberinput.js"></script> | |
164 | <script src="jqwidgets/jqxlistbox.js"></script> | |
165 | <script src="jqwidgets/jqxdropdownlist.js"></script> | |
166 | <script src="jqwidgets/jqxdropdownbutton.js"></script> | |
167 | <script src="jqwidgets/jqxinput.js"></script> | |
168 | <script src="jqwidgets/jqxeditor.js"></script> | |
169 | <script src="jqwidgets/jqxtooltip.js"></script> | |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
180
diff
changeset
|
170 | <script src="jqwidgets/jqxswitchbutton.js"></script> |
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
180
diff
changeset
|
171 | <script src="jqwidgets/jqxradiobutton.js"></script> |
11 | 172 | <script src="jqwidgets/jqxcheckbox.js"></script> |
173 | <script src="jqwidgets/jqxdatetimeinput.js"></script> | |
174 | <script src="jqwidgets/jqxcalendar.js"></script> | |
16 | 175 | <script src="jqwidgets/jqxgauge.js"></script> |
172
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
176 | <script src="jqwidgets/jqxchart.core.js"></script> |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
177 | <script src="jqwidgets/jqxchart.rangeselector.js"></script> |
16 | 178 | <script src="jqwidgets/jqxdraw.js"></script> |
139
eb1ac7487710
Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents:
129
diff
changeset
|
179 | <script src="jqwidgets/jqxprogressbar.js"></script> |
297
5e2424bfbc4a
Added import brew json logfiles
Michiel Broek <mbroek@mbse.eu>
parents:
292
diff
changeset
|
180 | <script src="jqwidgets/jqxfileupload.js"></script> |
5e2424bfbc4a
Added import brew json logfiles
Michiel Broek <mbroek@mbse.eu>
parents:
292
diff
changeset
|
181 | <script src="jqwidgets/jqxpanel.js"></script> |
11 | 182 | <script src="jqwidgets/globalization/globalize.js"></script> |
522
35675eadc655
Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents:
509
diff
changeset
|
183 | <script src="js/global.js"></script> |
11 | 184 | <?php |
185 | if (strlen($loadjs)) | |
498
10c6eeee60ce
Initial design of the divide batch screen.
Michiel Broek <mbroek@mbse.eu>
parents:
497
diff
changeset
|
186 | echo ' <script src="js/'.$loadjs.'.js"></script>'.PHP_EOL; |
11 | 187 | ?> |
188 | </head> | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
189 | |
11 | 190 | <body class="default"> |
191 | <div id="jqxWidget"> | |
129
7f41b61c3faf
Added a loader during recipe load. Recalculate percentages if a fermentable row is deleted. Don't edit amounts if using weight percentages. Update grid percentages if a fermentable amount is changed. Recalculate IBU's after changes with fermentables.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
192 | <div id="jqxLoader"> |
7f41b61c3faf
Added a loader during recipe load. Recalculate percentages if a fermentable row is deleted. Don't edit amounts if using weight percentages. Update grid percentages if a fermentable amount is changed. Recalculate IBU's after changes with fermentables.
Michiel Broek <mbroek@mbse.eu>
parents:
114
diff
changeset
|
193 | </div> |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
194 | |
11 | 195 | <!-- Menu --> |
684
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
196 | <div id="jqxMenu" style='float: left;'> |
11 | 197 | <ul> |
344
e25bbf19619d
First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents:
307
diff
changeset
|
198 | <li style='width: 80px;'> |
e25bbf19619d
First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents:
307
diff
changeset
|
199 | <a href="index.php">Home</a> |
e25bbf19619d
First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents:
307
diff
changeset
|
200 | </li> |
e25bbf19619d
First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents:
307
diff
changeset
|
201 | <li style='width: 80px;'>Monitoren |
345
dd1eb3f7fbf4
Added icons to the monitor menus
Michiel Broek <mbroek@mbse.eu>
parents:
344
diff
changeset
|
202 | <ul style='width: 200px;'> |
dd1eb3f7fbf4
Added icons to the monitor menus
Michiel Broek <mbroek@mbse.eu>
parents:
344
diff
changeset
|
203 | <li><img style='float: left; margin-right: 5px;' src='images/computer.png' />Systemen |
503
b23ef14c6b09
Web pages for the CO2 meters added.
Michiel Broek <mbroek@mbse.eu>
parents:
498
diff
changeset
|
204 | <ul style='width: 200px;'> |
684
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
205 | <div id="m_nodes"></div> |
345
dd1eb3f7fbf4
Added icons to the monitor menus
Michiel Broek <mbroek@mbse.eu>
parents:
344
diff
changeset
|
206 | </ul> |
15 | 207 | </li> |
345
dd1eb3f7fbf4
Added icons to the monitor menus
Michiel Broek <mbroek@mbse.eu>
parents:
344
diff
changeset
|
208 | <li><img style='float: left; margin-right: 5px;' src='images/fridge.png' />Klimaatkasten |
dd1eb3f7fbf4
Added icons to the monitor menus
Michiel Broek <mbroek@mbse.eu>
parents:
344
diff
changeset
|
209 | <ul style='width: 200px;'> |
684
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
210 | <div id="m_fermenters"></div> |
15 | 211 | </ul> |
212 | </li> | |
509 | 213 | <li><img style='float: left; margin-right: 5px;' src='images/beerbottle.png' />CO2 meters |
503
b23ef14c6b09
Web pages for the CO2 meters added.
Michiel Broek <mbroek@mbse.eu>
parents:
498
diff
changeset
|
214 | <ul style='width: 250px;'> |
684
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
215 | <div id="m_co2meters"></div> |
503
b23ef14c6b09
Web pages for the CO2 meters added.
Michiel Broek <mbroek@mbse.eu>
parents:
498
diff
changeset
|
216 | </ul> |
b23ef14c6b09
Web pages for the CO2 meters added.
Michiel Broek <mbroek@mbse.eu>
parents:
498
diff
changeset
|
217 | </li> |
569
d0e7ab1fc245
Added monitor menu entry for ispindels
Michiel Broek <mbroek@mbse.eu>
parents:
522
diff
changeset
|
218 | <li><img style='float: left; margin-right: 5px;' src='images/fermenter.png' />iSpindels |
d0e7ab1fc245
Added monitor menu entry for ispindels
Michiel Broek <mbroek@mbse.eu>
parents:
522
diff
changeset
|
219 | <ul style='width: 250px;'> |
684
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
220 | <div id="m_ispindels"></div> |
569
d0e7ab1fc245
Added monitor menu entry for ispindels
Michiel Broek <mbroek@mbse.eu>
parents:
522
diff
changeset
|
221 | </ul> |
d0e7ab1fc245
Added monitor menu entry for ispindels
Michiel Broek <mbroek@mbse.eu>
parents:
522
diff
changeset
|
222 | </li> |
11 | 223 | </ul> |
224 | </li> | |
816 | 225 | <li style='width: 80px;'><a href="prod_inprod.php">Productie</a></li> |
812 | 226 | <li style='width: 80px;'><a href="rec_main.php">Recepten</a></li> |
227 | <li style='width: 80px;'><a href="gen_about.php">Over</a></li> | |
11 | 228 | </ul> |
229 | </div> <!-- End menu --> | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
230 | |
11 | 231 | <?php |
684
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
232 | $connect = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
233 | $result = mysqli_query($connect, "SELECT uuid,node,online FROM mon_nodes ORDER BY node"); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
234 | $menu_nodes = ''; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
235 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
236 | if ($row['online'] == 1) |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
237 | $img = "network-idle.png"; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
238 | else |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
239 | $img = "network-error.png"; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
240 | $menu_nodes .= '<li><img style="float: left; margin-right: 5px;" src="images/'.$img.'" /><a href="mon_node.php?uuid='.$row['uuid'].'">'.$row['node'].'</a></li>'; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
241 | } |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
242 | mysqli_free_result($result); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
243 | $menu_fermenters = ''; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
244 | $result = mysqli_query($connect, "SELECT uuid,node,alias,online FROM mon_fermenters ORDER BY node,alias"); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
245 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
246 | if ($row['online'] == 1) |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
247 | $img = "network-idle.png"; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
248 | else |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
249 | $img = "network-error.png"; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
250 | $menu_fermenters .= '<li><img style="float: left; margin-right: 5px;" src="images/'.$img.'" /><a href="mon_fermenter.php?uuid='.$row['uuid'].'">'.$row['node'].'/'.$row['alias'].'</a></li>'; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
251 | } |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
252 | mysqli_free_result($result); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
253 | $menu_co2meters = ''; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
254 | $result = mysqli_query($connect, "SELECT uuid,node,alias,online FROM mon_co2meters ORDER BY node,alias"); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
255 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
256 | if ($row['online'] == 1) |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
257 | $img = "network-idle.png"; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
258 | else |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
259 | $img = "network-error.png"; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
260 | $menu_co2meters .= '<li><img style="float: left; margin-right: 5px;" src="images/'.$img.'" /><a href="mon_co2meter.php?uuid='.$row['uuid'].'">'.$row['node'].'/'.$row['alias'].'</a></li>'; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
261 | } |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
262 | mysqli_free_result($result); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
263 | $menu_ispindels = ''; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
264 | $result = mysqli_query($connect, "SELECT uuid,node,alias,online FROM mon_ispindels ORDER BY node,alias"); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
265 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
266 | if ($row['online'] == 1) |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
267 | $img = "network-idle.png"; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
268 | else |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
269 | $img = "network-error.png"; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
270 | $menu_ispindels .= '<li><img style="float: left; margin-right: 5px;" src="images/'.$img.'" /><a href="mon_ispindel.php?uuid='.$row['uuid'].'">'.$row['alias'].'</a></li>'; |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
271 | } |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
272 | mysqli_free_result($result); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
273 | ?> |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
274 | <script> |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
275 | $('#m_nodes').html('<?php echo $menu_nodes; ?>'); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
276 | $('#m_fermenters').html('<?php echo $menu_fermenters; ?>'); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
277 | $('#m_co2meters').html('<?php echo $menu_co2meters; ?>'); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
278 | $('#m_ispindels').html('<?php echo $menu_ispindels; ?>'); |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
279 | </script> |
ccb9f24d0fe9
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
Michiel Broek <mbroek@mbse.eu>
parents:
679
diff
changeset
|
280 | <?php |
11 | 281 | } |
282 | ||
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
283 | |
11 | 284 | function confirm_delete() { |
285 | ?> | |
286 | <div id="eventWindow"> | |
287 | <div> | |
288 | Bevestig verwijderen | |
289 | </div> | |
290 | <div> | |
291 | <div> | |
292 | Klik "OK" om dit record definitief te verwijderen.<br> | |
293 | Druk "Cancel" om te sluiten zonder dit record te verwijderen. | |
294 | </div> | |
295 | <div> | |
296 | <div style="float: right; margin-top: 15px; margin-bottom: 10px;"> | |
297 | <input type="button" id="delOk" value="OK" style="margin-right: 15px" /> | |
298 | <input type="button" id="delCancel" value="Cancel" style="margin-right: 65px" /> | |
299 | </div> | |
300 | </div> | |
301 | </div> | |
302 | </div> | |
303 | ||
304 | <?php | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
305 | } |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
306 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
307 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
308 | function page_footer() { |
11 | 309 | ?> |
310 | </div> <!-- jqxWidget --> | |
311 | </body> | |
312 | </html> | |
313 | <?php | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
314 | } |
11 | 315 | ?> |