www/includes/global.inc.php

Sat, 25 Sep 2021 10:42:54 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 25 Sep 2021 10:42:54 +0200
changeset 778
e64fd38c469c
parent 728
6bb819bf919b
child 793
f7d0da7677ed
permissions
-rw-r--r--

If during styles import the CATEGORY_NUMBER is empty, insert 0 in the database instead.

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 /*****************************************************************************
728
6bb819bf919b Removed websocket debug info from the mainmenu
Michiel Broek <mbroek@mbse.eu>
parents: 687
diff changeset
3 * Copyright (C) 2014-2021
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
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
33 if (isset($_GET['record']))
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
34 $my_record = $_GET['record'];
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
35 else
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
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
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
41 if (isset($_GET['return']))
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
42 $my_return = $_GET['return'];
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
43 else
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
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
ee7bcfb8e270 Added Cryo Hops type.
Michiel Broek <mbroek@mbse.eu>
parents: 369
diff changeset
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
ee7bcfb8e270 Added Cryo Hops type.
Michiel Broek <mbroek@mbse.eu>
parents: 369
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
103 global $my_version;
68
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
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
2ff83855d574 Added recipe editor screen
Michiel Broek <mbroek@mbse.eu>
parents: 67
diff changeset
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
ee7bcfb8e270 Added Cryo Hops type.
Michiel Broek <mbroek@mbse.eu>
parents: 369
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
124 ?>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
125 <!DOCTYPE html>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
126 <html lang=nl-NL>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
127 <head>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
128 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
131 <link type="text/css" href="jqwidgets/styles/jqx.base.css" rel="stylesheet" />
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
132 <link type="text/css" href="jqwidgets/styles/jqx.<?php echo $my_style; ?>.css" rel="stylesheet" />
369
cb59de6241b9 Allow screen scaling
Michiel Broek <mbroek@mbse.eu>
parents: 347
diff changeset
133 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
147 <script src="jqwidgets/jqxcore.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
148 <script src="jqwidgets/jqxwindow.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
151 <script src="jqwidgets/jqxdata.js"></script>
39
400aae9fb0c8 Some small fixes
Michiel Broek <mbroek@mbse.eu>
parents: 36
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
154 <script src="jqwidgets/jqxbuttons.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
155 <script src="jqwidgets/jqxscrollbar.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
400aae9fb0c8 Some small fixes
Michiel Broek <mbroek@mbse.eu>
parents: 36
diff changeset
158 <script src="jqwidgets/jqxgrid.edit.js"></script>
400aae9fb0c8 Some small fixes
Michiel Broek <mbroek@mbse.eu>
parents: 36
diff changeset
159 <script src="jqwidgets/jqxgrid.sort.js"></script>
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
160 <script src="jqwidgets/jqxgrid.pager.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
161 <script src="jqwidgets/jqxgrid.filter.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
162 <script src="jqwidgets/jqxgrid.selection.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
163 <script src="jqwidgets/jqxnumberinput.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
164 <script src="jqwidgets/jqxlistbox.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
165 <script src="jqwidgets/jqxdropdownlist.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
166 <script src="jqwidgets/jqxdropdownbutton.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
167 <script src="jqwidgets/jqxinput.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
168 <script src="jqwidgets/jqxeditor.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
172 <script src="jqwidgets/jqxcheckbox.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
173 <script src="jqwidgets/jqxdatetimeinput.js"></script>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
174 <script src="jqwidgets/jqxcalendar.js"></script>
16
522022b4fae4 Added monitoring screens
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
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
522022b4fae4 Added monitoring screens
Michiel Broek <mbroek@mbse.eu>
parents: 15
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
184 <?php
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
187 ?>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
188 </head>
10
606b4af8f918 Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
189
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
190 <body class="default">
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
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
ccbe79db80b8 Waters import and home page
Michiel Broek <mbroek@mbse.eu>
parents: 11
diff changeset
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
ccbe79db80b8 Waters import and home page
Michiel Broek <mbroek@mbse.eu>
parents: 11
diff changeset
211 </ul>
ccbe79db80b8 Waters import and home page
Michiel Broek <mbroek@mbse.eu>
parents: 11
diff changeset
212 </li>
509
6c91eff82ff2 New menu icon
Michiel Broek <mbroek@mbse.eu>
parents: 503
diff changeset
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
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
223 </ul>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
224 </li>
344
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
225 <li style='width: 80px;'>Productie
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
226 <ul style='width: 200px;'>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
227 <li><img style='float: left; margin-right: 5px;' src='images/beerstyles.png' /><a href="prod_inprod.php">In bewerking</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
228 <li><img style='float: left; margin-right: 5px;' src='images/list-add.png' /><a href="prod_new.php?return=index.php">Start nieuw</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
229 <li><img style='float: left; margin-left: 3px; margin-right: 8px;' src='images/database.png' />Archief
109
3c334f3ca7f9 Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents: 101
diff changeset
230 <ul>
290
12aa92828e24 Added view archives by name
Michiel Broek <mbroek@mbse.eu>
parents: 289
diff changeset
231 <li><a href="prod_archive_name.php">Op naam</a></li>
292
90cd3798edc2 Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents: 290
diff changeset
232 <li><a href="prod_archive_code.php">Op code</a></li>
90cd3798edc2 Added archive view on date and code.
Michiel Broek <mbroek@mbse.eu>
parents: 290
diff changeset
233 <li><a href="prod_archive_date.php">Op datum</a></li>
109
3c334f3ca7f9 Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents: 101
diff changeset
234 </ul>
3c334f3ca7f9 Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents: 101
diff changeset
235 </li>
344
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
236 <li><img style='float: left; margin-right: 5px;' src='images/insert-object.png' />Import
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
237 <ul style='width: 200px;'>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
238 <li><img style='float: left; margin-right: 5px;' src='images/insert-object.png' /><a href="prod_impbrew.php">Brouw log</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
239 <li><img style='float: left; margin-right: 5px;' src='images/insert-image.png' />Etiket</li>
114
4935e86b2775 Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
240 </ul>
4935e86b2775 Small fixes for prject import from Brouwhulp. Fixes for poduct database read/write. New menu entries. Equipment select in product editor. Started brewday editor. Added conditions on some buttons and edit fields. Screen layout changes.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
241 </li>
452
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents: 446
diff changeset
242 <li><img style='float: left; margin-right: 5px;' src='images/printer.png' />Rapporten
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents: 446
diff changeset
243 <ul style='width: 200px;'>
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents: 446
diff changeset
244 <li><a href="prod_r_totals.php" target="_blank">Totaal productie</a></li>
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents: 446
diff changeset
245 <li><a href="prod_r_efficiency.php" target="_blank">Rendementen</a></li>
454
f05ced2b5124 Added yeast performance report.
Michiel Broek <mbroek@mbse.eu>
parents: 452
diff changeset
246 <li><a href="prod_r_yeast.php" target="_blank">Vergisting</a></li>
452
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents: 446
diff changeset
247 </ul>
4dbfa131d173 Added total and efficiency reports
Michiel Broek <mbroek@mbse.eu>
parents: 446
diff changeset
248 </li>
344
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
249 <li><img style='float: left; margin-right: 7px;' src='images/calendar.png' />Kalender</li>
109
3c334f3ca7f9 Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents: 101
diff changeset
250 </ul>
45
95251bedfab4 Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents: 43
diff changeset
251 </li>
344
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
252 <li style='width: 80px;'>Recepten
347
e6e7ec9e33e0 Finished bitterness and cl/so4 ratio calculations and design aids. Translated water error messages. Fixed recipes menu width.
Michiel Broek <mbroek@mbse.eu>
parents: 345
diff changeset
253 <ul style='width: 200px;'>
344
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
254 <li><img style='float: left; margin-right: 5px;' src='images/beerstyles.png' /><a href="rec_main.php">Recepten</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
255 <li><img style='float: left; margin-right: 5px;' src='images/insert-object.png' /><a href="rec_import.php">Import beerxml</a></li>
48
bdd1ec9b9c06 Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents: 46
diff changeset
256 </ul>
45
95251bedfab4 Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents: 43
diff changeset
257 </li>
344
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
258 <li style='width: 80px;'>Inventaris
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
259 <ul style='width: 250px;'>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
260 <li><img style='float: left; margin-right: 5px;' src='images/address-book.png' /><a href="inv_suppliers.php">Leveranciers</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
261 <li><img style='float: left; margin-right: 5px;' src='images/graan.png' /><a href="inv_fermentables.php">Vergistbare ingredienten</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
262 <li><img style='float: left; margin-right: 5px;' src='images/hop.png' /><a href="inv_hops.php">Hoppen</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
263 <li><img style='float: left; margin-left: 4px; margin-right: 9px;' src='images/erlenmeyer.png' /><a href="inv_yeasts.php">Gisten</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
264 <li><img style='float: left; margin-right: 5px;' src='images/peper.png' /><a href="inv_miscs.php">Overige ingredienten</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
265 <li><img style='float: left; margin-left: 3px; margin-right: 9px;' src='images/water.png' /><a href="inv_waters.php">Brouwwater</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
266 <li><img style='float: left; margin-right: 5px;' src='images/mash.png' /><a href="inv_equipments.php">Brouw apparatuur</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
267 <li><img style='float: left; margin-left: 3px; margin-right: 8px;' src='images/database.png' /><a href="inv_instock.php">Voorraad lijst</a></li>
626
571473f62c1e Added private yeastlab pdf list
Michiel Broek <mbroek@mbse.eu>
parents: 578
diff changeset
268 <li><img style='float: left; margin-left: 3px; margin-right: 8px;' src='images/science.png' /><a href="inv_yeastlab.php">Gistbank lijst</a></li>
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
269 </ul>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
270 </li>
344
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
271 <li style='width: 80px;'>Instellingen
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
272 <ul style='width: 200px;'>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
273 <li><img style='float: left; margin-left: 3px; margin-right: 9px;' src='images/water.png' /><a href="profile_water.php">Water profielen</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
274 <li><img style='float: left; margin-right: 5px;' src='images/mash.png' /><a href="profile_mash.php">Maisch schemas</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
275 <li><img style='float: left; margin-right: 5px;' src='images/beerstyles.png' /><a href="profile_styles.php">Bierstijlen</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
276 <li><img style='float: left; margin-right: 5px;' src='images/fermenter.png' /><a href="profile_fermentation.php">Vergisting profielen</a></li>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
277 <li><img style='float: left; margin-right: 5px;' src='images/preferences.png' /><a href="profile_setup.php">Instellingen</a></li>
45
95251bedfab4 Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents: 43
diff changeset
278 </ul>
95251bedfab4 Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents: 43
diff changeset
279 </li>
344
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
280 <li style='width: 80px;'>Over
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
281 <ul style='width: 150px;'>
e25bbf19619d First pass to add icons to the menus.
Michiel Broek <mbroek@mbse.eu>
parents: 307
diff changeset
282 <li><img style='float: left; margin-right: 5px;' src='images/help-about.png' /><a href="gen_about.php">Informatie</a></li>
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
283 </ul>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
284 </li>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
285 </ul>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
286 </div> <!-- End menu -->
10
606b4af8f918 Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
287
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
288 <?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
289 $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
290 $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
291 $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
292 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
293 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
294 $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
295 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
296 $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
297 $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
298 }
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
299 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
300 $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
301 $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
302 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
303 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
304 $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
305 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
306 $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
307 $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
308 }
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
309 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
310 $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
311 $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
312 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
313 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
314 $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
315 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
316 $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
317 $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
318 }
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
319 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
320 $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
321 $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
322 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
323 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
324 $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
325 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
326 $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
327 $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
328 }
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
329 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
330 ?>
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
331 <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
332 $('#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
333 $('#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
334 $('#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
335 $('#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
336 </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
337 <?php
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
338 }
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
339
10
606b4af8f918 Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
340
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
341 function confirm_delete() {
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
342 ?>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
343 <div id="eventWindow">
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
344 <div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
345 Bevestig verwijderen
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
346 </div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
347 <div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
348 <div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
349 Klik "OK" om dit record definitief te verwijderen.<br>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
350 Druk "Cancel" om te sluiten zonder dit record te verwijderen.
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
351 </div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
352 <div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
353 <div style="float: right; margin-top: 15px; margin-bottom: 10px;">
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
354 <input type="button" id="delOk" value="OK" style="margin-right: 15px" />
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
355 <input type="button" id="delCancel" value="Cancel" style="margin-right: 65px" />
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
356 </div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
357 </div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
358 </div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
359 </div>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
360
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
361 <?php
10
606b4af8f918 Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
362 }
606b4af8f918 Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
363
606b4af8f918 Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
364
606b4af8f918 Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
365 function page_footer() {
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
366 ?>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
367 </div> <!-- jqxWidget -->
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
368 </body>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
369 </html>
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
370 <?php
10
606b4af8f918 Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
371 }
11
d341f0a91a91 Added fermentable inventory
Michiel Broek <mbroek@mbse.eu>
parents: 10
diff changeset
372 ?>

mercurial