Fri, 25 Jan 2019 22:03:16 +0100
Friendly stock inventory display.
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | /***************************************************************************** |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | * Copyright (C) 2014-2018 |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | * Michiel Broek <mbroek at mbse dot eu> |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | * This file is part of Brewery Management System |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | * This is free software; you can redistribute it and/or modify it |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | * under the terms of the GNU General Public License as published by the |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | * Free Software Foundation; either version 2, or (at your option) any |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * later version. |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * BrewCloud is distributed in the hope that it will be useful, but |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | * General Public License for more details. |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | * |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | * along with ThermFerm; see the file COPYING. If not, write to the Free |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | *****************************************************************************/ |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | /* |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | * Look for the style names in the jqwidgets/styles directory. |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | */ |
30
f5ab22446aa5
Inventory fermentables and hops to standard weight format.
Michiel Broek <mbroek@mbse.eu>
parents:
23
diff
changeset
|
27 | //$my_style = 'ui-darkness'; |
f5ab22446aa5
Inventory fermentables and hops to standard weight format.
Michiel Broek <mbroek@mbse.eu>
parents:
23
diff
changeset
|
28 | $my_style = 'ui-mbse'; |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
29 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | require_once($_SERVER['DOCUMENT_ROOT'].'/config.php'); |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | require_once($_SERVER['DOCUMENT_ROOT'].'/version.php'); |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | |
68 | 33 | if (isset($_GET['record'])) |
34 | $my_record = $_GET['record']; | |
35 | else | |
36 | $my_record = -1; | |
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 = ''; |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
53 | |
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
|
54 | $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
|
55 | $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
|
56 | |
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
|
57 | /* 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
|
58 | #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
|
59 | $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
|
60 | 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
|
61 | 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
|
62 | } |
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
|
63 | 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
|
64 | $my_default_water = $my_brewery_name = $my_ibu_method = $my_color_method = ''; |
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
|
65 | $my_factor_mashhop = $my_factor_fwh = $my_factor_pellet = $my_factor_plug = 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
|
66 | $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
|
67 | |
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 | $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
|
69 | 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
|
70 | /* 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
|
71 | $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
|
72 | 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
|
73 | $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
|
74 | $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
|
75 | $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
|
76 | $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
|
77 | $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
|
78 | $my_factor_plug= floatval($row['factor_plug']); |
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 | $my_ibu_method = str_replace($escapers, $replacements, $row['ibu_method']); |
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 | $my_color_method = str_replace($escapers, $replacements, $row['color_method']); |
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 | $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
|
82 | $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
|
83 | } |
172
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
84 | |
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
|
85 | |
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 | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
87 | function page_header($title, $loadjs) { |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
88 | global $my_style; |
11 | 89 | global $my_version; |
68 | 90 | 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
|
91 | global $my_uuid; |
68 | 92 | global $my_return; |
172
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
93 | global $my_name; |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
94 | global $my_code; |
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 | 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
|
96 | 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
|
97 | 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
|
98 | 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
|
99 | global $my_factor_plug; |
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
100 | 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
|
101 | 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
|
102 | 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
|
103 | 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
|
104 | global $my_default_water; |
11 | 105 | ?> |
106 | <!DOCTYPE html> | |
107 | <html lang=nl-NL> | |
108 | <head> | |
109 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
110 | <title>BMS v<?php echo $my_version;?> - <?php echo $title;?></title> | |
111 | <link type="text/css" href="css/style.css" rel="stylesheet" media="all" /> | |
112 | <link type="text/css" href="jqwidgets/styles/jqx.base.css" rel="stylesheet" /> | |
113 | <link type="text/css" href="jqwidgets/styles/jqx.<?php echo $my_style; ?>.css" rel="stylesheet" /> | |
114 | <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> | |
115 | <script> | |
116 | var theme = "<?php echo $my_style; ?>"; | |
68 | 117 | var my_record = "<?php echo $my_record; ?>"; |
118 | var my_return = "<?php echo $my_return; ?>"; | |
172
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
119 | var my_name= "<?php echo $my_name; ?>"; |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
120 | var my_code= "<?php echo $my_code; ?>"; |
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
|
121 | var my_uuid= "<?php echo $my_uuid; ?>"; |
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
|
122 | var my_brewery_name = "<?php echo $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
|
123 | var my_factor_mashhop = "<?php echo $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
|
124 | var my_factor_fwh = "<?php echo $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
|
125 | var my_factor_pellet = "<?php echo $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
|
126 | var my_factor_plug = "<?php echo $my_factor_plug; ?>"; |
5b6bb99bc52a
IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents:
100
diff
changeset
|
127 | var my_ibu_method = "<?php echo $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
|
128 | var my_color_method = "<?php echo $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
|
129 | var my_brix_correction = "<?php echo $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
|
130 | var my_grain_absorbtion = "<?php echo $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
|
131 | var my_default_water = "<?php echo $my_default_water; ?>"; |
11 | 132 | </script> |
133 | <script src="js/jquery-1.11.1.min.js"></script> | |
134 | <script src="jqwidgets/jqxcore.js"></script> | |
135 | <script src="jqwidgets/jqxwindow.js"></script> | |
136 | <script src="jqwidgets/jqxmenu.js"></script> | |
50
6d94167c2697
Next steps to implement a recipe editor
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
137 | <script src="jqwidgets/jqxtabs.js"></script> |
11 | 138 | <script src="jqwidgets/jqxdata.js"></script> |
39 | 139 | <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
|
140 | <script src="jqwidgets/jqxloader.js"></script> |
11 | 141 | <script src="jqwidgets/jqxbuttons.js"></script> |
142 | <script src="jqwidgets/jqxscrollbar.js"></script> | |
143 | <script src="jqwidgets/jqxgrid.js"></script> | |
50
6d94167c2697
Next steps to implement a recipe editor
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
144 | <script src="jqwidgets/jqxgrid.grouping.js"></script> |
39 | 145 | <script src="jqwidgets/jqxgrid.edit.js"></script> |
146 | <script src="jqwidgets/jqxgrid.sort.js"></script> | |
11 | 147 | <script src="jqwidgets/jqxgrid.pager.js"></script> |
148 | <script src="jqwidgets/jqxgrid.filter.js"></script> | |
149 | <script src="jqwidgets/jqxgrid.selection.js"></script> | |
150 | <script src="jqwidgets/jqxnumberinput.js"></script> | |
151 | <script src="jqwidgets/jqxlistbox.js"></script> | |
152 | <script src="jqwidgets/jqxdropdownlist.js"></script> | |
153 | <script src="jqwidgets/jqxdropdownbutton.js"></script> | |
154 | <script src="jqwidgets/jqxinput.js"></script> | |
155 | <script src="jqwidgets/jqxeditor.js"></script> | |
156 | <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
|
157 | <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
|
158 | <script src="jqwidgets/jqxradiobutton.js"></script> |
11 | 159 | <script src="jqwidgets/jqxcheckbox.js"></script> |
160 | <script src="jqwidgets/jqxdatetimeinput.js"></script> | |
161 | <script src="jqwidgets/jqxcalendar.js"></script> | |
16 | 162 | <script src="jqwidgets/jqxgauge.js"></script> |
172
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
163 | <script src="jqwidgets/jqxchart.core.js"></script> |
684c651dd165
Added fermentation graph screen
Michiel Broek <mbroek@mbse.eu>
parents:
167
diff
changeset
|
164 | <script src="jqwidgets/jqxchart.rangeselector.js"></script> |
16 | 165 | <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
|
166 | <script src="jqwidgets/jqxprogressbar.js"></script> |
11 | 167 | <script src="jqwidgets/globalization/globalize.js"></script> |
168 | <script src="js/global.js"></script> | |
169 | <?php | |
170 | if (strlen($loadjs)) | |
171 | echo ' <script src="js/'.$loadjs.'.js"></script>'.PHP_EOL; | |
172 | ?> | |
173 | </head> | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
174 | |
11 | 175 | <body class="default"> |
176 | <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
|
177 | <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
|
178 | </div> |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
179 | |
11 | 180 | <!-- Menu --> |
181 | <div id="jqxMenu"> | |
182 | <ul> | |
15 | 183 | <li><a href="index.php">Home</a></li> |
11 | 184 | <li>Monitoren |
185 | <ul> | |
15 | 186 | <li>Systemen |
187 | <ul> | |
188 | <?php | |
48
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
189 | $connect = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); |
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
190 | $result = mysqli_query($connect, "SELECT uuid,node,online,net_address FROM mon_nodes ORDER BY node"); |
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
191 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
16 | 192 | echo ' <li><a href="mon_node.php?uuid='.$row['uuid'].'">'.$row['node'].'</a></li>'.PHP_EOL; |
15 | 193 | } |
194 | mysqli_free_result($result); | |
195 | ?> | |
196 | </ul> | |
197 | </li> | |
198 | <li>Klimaatkasten | |
199 | <ul> | |
200 | <?php | |
48
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
201 | $result = mysqli_query($connect, "SELECT uuid,node,alias,online,mode FROM mon_fermenters ORDER BY node,alias"); |
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
202 | while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { |
16 | 203 | echo ' <li><a href="mon_fermenter.php?uuid='.$row['uuid'].'">'.$row['node'].'/'.$row['alias'].'</a></li>'.PHP_EOL; |
15 | 204 | } |
205 | mysqli_free_result($result); | |
206 | ?> | |
207 | </ul> | |
208 | </li> | |
11 | 209 | </ul> |
210 | </li> | |
45
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
211 | <li>Productie |
109
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
212 | <ul> |
111
8c4ba91adf58
Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
109
diff
changeset
|
213 | <li><a href="prod_inprod.php">In bewerking</a></li> |
167
dabcd35f8f92
Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents:
139
diff
changeset
|
214 | <li><a href="prod_new.php?return=index.php">Start nieuw</a></li> |
109
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
215 | <li>Archief |
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
216 | <ul> |
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
217 | <li>Op naam</li> |
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
218 | <li>Op code</li> |
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
219 | <li>Op datum</li> |
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
220 | </ul> |
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
221 | </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
|
222 | <li>Import |
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
|
223 | <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
|
224 | <li>Brouw log</li> |
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
|
225 | <li>Etiket</li> |
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
|
226 | </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
|
227 | </li> |
109
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
228 | <li>Kalender</li> |
3c334f3ca7f9
Noted some ideas and added some in the menu.
Michiel Broek <mbroek@mbse.eu>
parents:
101
diff
changeset
|
229 | </ul> |
45
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
230 | </li> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
231 | <li>Recepten |
48
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
232 | <ul> |
67
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
233 | <li><a href="rec_main.php">Recepten</a></li> |
50
6d94167c2697
Next steps to implement a recipe editor
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
234 | <li>Import</li> |
48
bdd1ec9b9c06
Start recipes import and menus.
Michiel Broek <mbroek@mbse.eu>
parents:
46
diff
changeset
|
235 | </ul> |
45
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
236 | </li> |
11 | 237 | <li>Inventaris |
238 | <ul> | |
239 | <li><a href="inv_suppliers.php">Leveranciers</a></li> | |
15 | 240 | <li><a href="inv_fermentables.php">Vergistbare ingredienten</a></li> |
11 | 241 | <li><a href="inv_hops.php">Hoppen</a></li> |
15 | 242 | <li><a href="inv_yeasts.php">Gisten</a></li> |
243 | <li><a href="inv_miscs.php">Overige ingredienten</a></li> | |
46
ff9be9dbcac0
Renamed inevntory water sources to inventory waters
Michiel Broek <mbroek@mbse.eu>
parents:
45
diff
changeset
|
244 | <li><a href="inv_waters.php">Brouwwater</a></li> |
11 | 245 | <li><a href="inv_equipments.php">Brouw apparatuur</a></li> |
30
f5ab22446aa5
Inventory fermentables and hops to standard weight format.
Michiel Broek <mbroek@mbse.eu>
parents:
23
diff
changeset
|
246 | <li><a href="inv_instock.php">Voorraad lijst</a></li> |
11 | 247 | </ul> |
248 | </li> | |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
85
diff
changeset
|
249 | <li>Instellingen |
45
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
250 | <ul> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
251 | <li><a href="profile_water.php">Water profielen</a></li> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
252 | <li><a href="profile_mash.php">Maisch schemas</a></li> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
253 | <li><a href="profile_styles.php">Bierstijlen</a></li> |
186
a7c2c61a01ad
Added profile fermentation editor.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
254 | <li><a href="profile_fermentation.php">Vergisting profielen</a></li> |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
85
diff
changeset
|
255 | <li><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
|
256 | </ul> |
95251bedfab4
Moved three inventory tables and screens to profiles
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
257 | </li> |
11 | 258 | <li>Over |
259 | <ul> | |
67
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
52
diff
changeset
|
260 | <li><a href="gen_about.php">Informatie</a></li> |
11 | 261 | </ul> |
262 | </li> | |
263 | </ul> | |
264 | </div> <!-- End menu --> | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
265 | |
11 | 266 | <?php |
267 | } | |
268 | ||
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
269 | |
11 | 270 | function confirm_delete() { |
271 | ?> | |
272 | <div id="eventWindow"> | |
273 | <div> | |
274 | Bevestig verwijderen | |
275 | </div> | |
276 | <div> | |
277 | <div> | |
278 | Klik "OK" om dit record definitief te verwijderen.<br> | |
279 | Druk "Cancel" om te sluiten zonder dit record te verwijderen. | |
280 | </div> | |
281 | <div> | |
282 | <div style="float: right; margin-top: 15px; margin-bottom: 10px;"> | |
283 | <input type="button" id="delOk" value="OK" style="margin-right: 15px" /> | |
284 | <input type="button" id="delCancel" value="Cancel" style="margin-right: 65px" /> | |
285 | </div> | |
286 | </div> | |
287 | </div> | |
288 | </div> | |
289 | ||
290 | <?php | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
291 | } |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
292 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
293 | |
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
294 | function page_footer() { |
11 | 295 | ?> |
296 | </div> <!-- jqxWidget --> | |
297 | </body> | |
298 | </html> | |
299 | <?php | |
10
606b4af8f918
Start of the merge with another unfinished project
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
300 | } |
84
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
301 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
302 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
303 | /* ============== Translations ========================================== */ |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
304 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
305 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
306 | function added_type_names($added) { |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
307 | if ($added == "Mash") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
308 | return 'Maischen'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
309 | if ($added == "Boil") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
310 | return 'Koken'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
311 | if ($added == "Fermentation") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
312 | return 'Vergisten'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
313 | if ($added == "Lagering") |
85
ca7a37586551
Added SG/Plato formulas for PHP. Added OG calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
84
diff
changeset
|
314 | return 'Nagisten'; |
84
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
315 | if ($added == "Bottle") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
316 | return 'Bottelen'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
317 | return $added; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
318 | } |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
319 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
320 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
321 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
322 | function hop_useat_names($useat) { |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
323 | if (($useat == "Dry Hop") || ($useat == "Dry hop")) |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
324 | return "Koudhop"; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
325 | if ($useat == "Whirlpool") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
326 | return "Whirlpool"; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
327 | if ($useat == "Mash") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
328 | return "Maischen"; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
329 | if (($useat == "First Wort") || ($useat == "First wort")) |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
330 | return "First wort"; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
331 | if ($useat == "Aroma") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
332 | return "Vlamuit"; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
333 | if ($useat == "Boil") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
334 | return 'Koken'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
335 | return $useat; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
336 | } |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
337 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
338 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
339 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
340 | function hop_form_names($form) { |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
341 | if ($form == "Pellet") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
342 | return 'Pellets'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
343 | if ($form == "Plug") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
344 | return 'Plugs'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
345 | if ($form == "Leaf") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
346 | return 'Bellen'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
347 | return $form; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
348 | } |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
349 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
350 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
351 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
352 | function yeast_use_names($use) { |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
353 | if ($use == "Primary") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
354 | return 'Hoofdgist'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
355 | if ($use == "Bottle") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
356 | return 'Bottelgist'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
357 | return $use; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
358 | } |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
359 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
360 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
361 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
362 | function yeast_form_names($form) { |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
363 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
364 | if ($form == "Liquid") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
365 | return 'Vloeibaar'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
366 | if ($form == "Dry") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
367 | return 'Droog'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
368 | if ($form == "Slant") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
369 | return 'Schuine buis'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
370 | if ($form == "Culture") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
371 | return 'Slurry'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
372 | if ($form == "Frozen") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
373 | return 'Ingevroren'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
374 | if ($form == "Bottel") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
375 | return 'Depot'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
376 | return $form; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
377 | } |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
378 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
379 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
380 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
381 | function misc_type_names($type) { |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
382 | if ($type == "Water agent") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
383 | return 'Brouwzout'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
384 | if ($type == "Fining") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
385 | return 'Klaringsmiddel'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
386 | if ($type == "Spice") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
387 | return 'Specerij'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
388 | if ($type == "Herb") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
389 | return 'Kruid'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
390 | if ($type == "Flavor") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
391 | return 'Smaakstof'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
392 | if ($type == "Yeast nutrient") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
393 | return 'Gistvoeding'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
394 | return $type; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
395 | } |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
396 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
397 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
398 | |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
399 | function misc_use_names($name) { |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
400 | if ($name == "Starter") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
401 | return 'Starter'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
402 | if ($name == "Mash") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
403 | return 'Maischen'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
404 | if ($name == "Boil") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
405 | return 'Koken'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
406 | if ($name == "Primary") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
407 | return 'Hoofdvergisting'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
408 | if ($name == "Secondary") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
409 | return 'Nagisten/lagering'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
410 | if ($name == "Bottling") |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
411 | return 'Bottelen'; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
412 | return $name; |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
413 | } |
3e5e87f1818d
Added miscs ingredients to the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents:
68
diff
changeset
|
414 | |
11 | 415 | ?> |