www/prod_duplicate.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 742
3c8928d956cd
permissions
-rw-r--r--

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

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:
diff changeset
1 <?php
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:
diff changeset
2 require_once('config.php');
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:
diff changeset
3
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:
diff changeset
4 $link = mysqli_connect(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME);
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:
diff changeset
5 if (! $link) {
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:
diff changeset
6 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());
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:
diff changeset
7 }
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:
diff changeset
8 if (! mysqli_set_charset($link, "utf8" )) {
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:
diff changeset
9 echo "error";
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:
diff changeset
10 return 1;
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:
diff changeset
11 }
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:
diff changeset
12
305
bb55e065888a Fix escape single quotes
Michiel Broek <mbroek@mbse.eu>
parents: 303
diff changeset
13 $rescapers = array("'");
bb55e065888a Fix escape single quotes
Michiel Broek <mbroek@mbse.eu>
parents: 303
diff changeset
14 $rreplacements = array("\\'");
bb55e065888a Fix escape single quotes
Michiel Broek <mbroek@mbse.eu>
parents: 303
diff changeset
15
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:
diff changeset
16 date_default_timezone_set('Europe/Amsterdam');
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:
diff changeset
17 if (isset($_GET["record"]))
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:
diff changeset
18 $record = $_GET["record"];
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:
diff changeset
19 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:
diff changeset
20 $record = 78;
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:
diff changeset
21 $result = mysqli_query($link, "SELECT * FROM products WHERE record='".$record."'");
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:
diff changeset
22 $row = mysqli_fetch_array($result);
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:
diff changeset
23
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:
diff changeset
24 /*
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:
diff changeset
25 * Make this duplicate a fresh product.
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:
diff changeset
26 */
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:
diff changeset
27 $sql = "INSERT INTO `products` SET ";
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:
diff changeset
28 $sql .= "name='" . mysqli_real_escape_string($link, $row['name']) . ' [duplicate]';
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:
diff changeset
29 $sql .= "', uuid='" . str_replace("\n", "", file_get_contents('/proc/sys/kernel/random/uuid'));
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:
diff changeset
30 $sql .= "', code='" . mysqli_real_escape_string($link, $row['code']) . '-DuP';
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:
diff changeset
31 $sql .= "', birth='" . date("Y-m-d");
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:
diff changeset
32 $sql .= "', stage='1";
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:
diff changeset
33 $sql .= "', notes='" . mysqli_real_escape_string($link, $row['notes']);
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:
diff changeset
34 $sql .= "', log_brew='0";
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:
diff changeset
35 $sql .= "', log_fermentation='0";
602
10b61aacb1c1 New products field log_ispindel. Add check for ispindel log to crontasks.php Added log_ispindel to prod_edit, pprod_divide, prod_new and prod_duplicate. Renamed some log_fermentation vergisting names into klimaatkast.
Michiel Broek <mbroek@mbse.eu>
parents: 460
diff changeset
36 $sql .= "', log_ispindel='0";
615
9034e65b0d7a Added CO2 carbonation log to the products database. Added button in the packaging tab.
Michiel Broek <mbroek@mbse.eu>
parents: 602
diff changeset
37 $sql .= "', log_co2pressure='0";
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:
diff changeset
38 $sql .= "', inventory_reduced='0";
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:
diff changeset
39 $sql .= "', locked='0";
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:
diff changeset
40 // Equipment
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:
diff changeset
41 $sql .= "', eq_name='" . mysqli_real_escape_string($link, $row['eq_name']);
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:
diff changeset
42 $sql .= "', eq_boil_size='" . $row['eq_boil_size'];
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:
diff changeset
43 $sql .= "', eq_batch_size='" . $row['eq_batch_size'];
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:
diff changeset
44 $sql .= "', eq_tun_volume='" . $row['eq_tun_volume'];
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:
diff changeset
45 $sql .= "', eq_tun_weight='" . $row['eq_tun_weight'];
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:
diff changeset
46 $sql .= "', eq_tun_specific_heat='" . $row['eq_tun_specific_heat'];
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:
diff changeset
47 $sql .= "', eq_tun_material='" . $row['eq_tun_material'];
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:
diff changeset
48 $sql .= "', eq_tun_height='" . $row['eq_tun_height'];
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:
diff changeset
49 $sql .= "', eq_top_up_water='" . $row['eq_top_up_water'];
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:
diff changeset
50 $sql .= "', eq_trub_chiller_loss='" . $row['eq_trub_chiller_loss'];
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:
diff changeset
51 $sql .= "', eq_evap_rate='" . $row['eq_evap_rate'];
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:
diff changeset
52 $sql .= "', eq_boil_time='" . $row['eq_boil_time'];
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:
diff changeset
53 $sql .= "', eq_calc_boil_volume='" . $row['eq_calc_boil_volume'];
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:
diff changeset
54 $sql .= "', eq_top_up_kettle='" . $row['eq_top_up_kettle'];
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:
diff changeset
55 $sql .= "', eq_hop_utilization='" . $row['eq_hop_utilization'];
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:
diff changeset
56 $sql .= "', eq_notes='" . mysqli_real_escape_string($link, $row['eq_notes']);
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:
diff changeset
57 $sql .= "', eq_lauter_volume='" . $row['eq_lauter_volume'];
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:
diff changeset
58 $sql .= "', eq_lauter_height='" . $row['eq_lauter_height'];
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:
diff changeset
59 $sql .= "', eq_lauter_deadspace='" . $row['eq_lauter_deadspace'];
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:
diff changeset
60 $sql .= "', eq_kettle_volume='" . $row['eq_kettle_volume'];
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:
diff changeset
61 $sql .= "', eq_kettle_height='" . $row['eq_kettle_height'];
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:
diff changeset
62 $sql .= "', eq_mash_volume='" . $row['eq_mash_volume'];
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:
diff changeset
63 $sql .= "', eq_mash_max='" . $row['eq_mash_max'];
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:
diff changeset
64 $sql .= "', eq_efficiency='" . $row['eq_efficiency'];
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:
diff changeset
65 // brewdate
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:
diff changeset
66 $sql .= "', brew_date_start=NULL";
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:
diff changeset
67 $sql .= ", brew_mash_ph='0.0";
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:
diff changeset
68 $sql .= "', brew_mash_sg='1.000";
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:
diff changeset
69 $sql .= "', brew_sparge_ph='" . $row['brew_sparge_ph'];
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:
diff changeset
70 $sql .= "', brew_preboil_volume='0";
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:
diff changeset
71 $sql .= "', brew_preboil_sg='0";
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:
diff changeset
72 $sql .= "', brew_preboil_ph='0.0";
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:
diff changeset
73 $sql .= "', brew_aboil_volume='0";
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:
diff changeset
74 $sql .= "', brew_aboil_sg='0";
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:
diff changeset
75 $sql .= "', brew_aboil_ph='0.0";
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:
diff changeset
76 $sql .= "', brew_aboil_efficiency='0";
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:
diff changeset
77 $sql .= "', brew_cooling_method='" . $row['brew_cooling_method'];
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:
diff changeset
78 $sql .= "', brew_cooling_time='0";
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:
diff changeset
79 $sql .= "', brew_cooling_to='" . $row['brew_cooling_to'];
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:
diff changeset
80 $sql .= "', brew_whirlpool9='" . $row['brew_whirlpool9'];
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:
diff changeset
81 $sql .= "', brew_whirlpool7='" . $row['brew_whirlpool7'];
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:
diff changeset
82 $sql .= "', brew_whirlpool6='" . $row['brew_whirlpool6'];
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:
diff changeset
83 $sql .= "', brew_whirlpool2='" . $row['brew_whirlpool2'];
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:
diff changeset
84 $sql .= "', brew_aeration_time='" . $row['brew_aeration_time'];
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:
diff changeset
85 $sql .= "', brew_aeration_speed='" . $row['brew_aeration_speed'];
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:
diff changeset
86 $sql .= "', brew_aeration_type='" . $row['brew_aeration_type'];
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:
diff changeset
87 $sql .= "', brew_fermenter_volume='" . $row['brew_fermenter_volume'];
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:
diff changeset
88 $sql .= "', brew_fermenter_extrawater='" . $row['brew_fermenter_extrawater'];
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:
diff changeset
89 $sql .= "', brew_fermenter_tcloss='" . $row['brew_fermenter_tcloss'];
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:
diff changeset
90 $sql .= "', brew_fermenter_sg='0";
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:
diff changeset
91 $sql .= "', brew_fermenter_ibu='0";
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:
diff changeset
92 $sql .= "', brew_fermenter_color='0";
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:
diff changeset
93 $sql .= "', brew_date_end=NULL";
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:
diff changeset
94 $sql .= ", og='0";
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:
diff changeset
95 $sql .= "', fg='0";
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:
diff changeset
96 $sql .= "', primary_start_temp='0";
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:
diff changeset
97 $sql .= "', primary_max_temp='0";
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:
diff changeset
98 $sql .= "', primary_end_temp='0";
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:
diff changeset
99 $sql .= "', primary_end_date=NULL";
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:
diff changeset
100 $sql .= ", primary_end_sg='0";
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:
diff changeset
101 $sql .= "', secondary_temp='0";
460
046ff5fdc96c Implemented products.secondary_end_sg field. The missing values are updated by the crontask.
Michiel Broek <mbroek@mbse.eu>
parents: 458
diff changeset
102 $sql .= "', secondary_end_sg='0";
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:
diff changeset
103 $sql .= "', secondary_end_date=NULL";
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:
diff changeset
104 $sql .= ", tertiary_temp='0";
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:
diff changeset
105 $sql .= "', package_date=NULL";
458
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
106 $sql .= ", package_volume='" . $row['package_volume'];
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
107 $sql .= "', package_infuse_amount='" . $row['package_infuse_amount'];
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
108 $sql .= "', package_infuse_abv='" . $row['package_infuse_abv'];
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
109 $sql .= "', package_infuse_notes='" . mysqli_real_escape_string($link, $row['package_infuse_notes']);
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
110 $sql .= "', package_abv='0";
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
111 $sql .= "', package_ph='0";
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
112 $sql .= "', bottle_amount='0";
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:
diff changeset
113 $sql .= "', bottle_carbonation='" . $row['bottle_carbonation'];
458
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
114 $sql .= "', bottle_priming_water='" . $row['bottle_priming_water'];
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:
diff changeset
115 $sql .= "', bottle_priming_amount='0";
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:
diff changeset
116 $sql .= "', bottle_carbonation_temp='" . $row['bottle_carbonation_temp'];
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:
diff changeset
117 $sql .= "', keg_amount='0";
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:
diff changeset
118 $sql .= "', keg_carbonation='" . $row['keg_carbonation'];
458
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
119 $sql .= "', keg_priming_water='" . $row['keg_priming_water'];
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:
diff changeset
120 $sql .= "', keg_priming_amount='0";
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:
diff changeset
121 $sql .= "', keg_carbonation_temp='" . $row['keg_carbonation_temp'];
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:
diff changeset
122 $sql .= "', keg_forced_carb='" . $row['keg_forced_carb'];
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:
diff changeset
123 $sql .= "', keg_pressure='" . $row['keg_pressure'];
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:
diff changeset
124 $sql .= "', taste_notes='";
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:
diff changeset
125 $sql .= "', taste_rate='0";
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:
diff changeset
126 $sql .= "', taste_date=NULL";
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:
diff changeset
127 $sql .= ", taste_color='";
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:
diff changeset
128 $sql .= "', taste_transparency='";
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:
diff changeset
129 $sql .= "', taste_head='";
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:
diff changeset
130 $sql .= "', taste_aroma='";
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:
diff changeset
131 $sql .= "', taste_taste='";
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:
diff changeset
132 $sql .= "', taste_mouthfeel='";
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:
diff changeset
133 $sql .= "', taste_aftertaste='";
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:
diff changeset
134 // Style
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:
diff changeset
135 $sql .= "', st_name='" . mysqli_real_escape_string($link, $row['st_name']);
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:
diff changeset
136 $sql .= "', st_letter='" . mysqli_real_escape_string($link, $row['st_letter']);
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:
diff changeset
137 $sql .= "', st_guide='" . mysqli_real_escape_string($link, $row['st_guide']);
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:
diff changeset
138 $sql .= "', st_type='" . $row['st_type'];
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:
diff changeset
139 $sql .= "', st_category='" . mysqli_real_escape_string($link, $row['st_category']);
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:
diff changeset
140 $sql .= "', st_category_number='" . $row['st_category_number'];
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:
diff changeset
141 $sql .= "', st_og_min='" . $row['st_og_min'];
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:
diff changeset
142 $sql .= "', st_og_max='" . $row['st_og_max'];
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:
diff changeset
143 $sql .= "', st_fg_min='" . $row['st_fg_min'];
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:
diff changeset
144 $sql .= "', st_fg_max='" . $row['st_fg_max'];
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:
diff changeset
145 $sql .= "', st_ibu_min='" . $row['st_ibu_min'];
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:
diff changeset
146 $sql .= "', st_ibu_max='" . $row['st_ibu_max'];
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:
diff changeset
147 $sql .= "', st_color_min='" . $row['st_color_min'];
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:
diff changeset
148 $sql .= "', st_color_max='" . $row['st_color_max'];
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:
diff changeset
149 $sql .= "', st_carb_min='" . $row['st_carb_min'];
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:
diff changeset
150 $sql .= "', st_carb_max='" . $row['st_carb_max'];
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:
diff changeset
151 $sql .= "', st_abv_min='" . $row['st_abv_min'];
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:
diff changeset
152 $sql .= "', st_abv_max='" . $row['st_abv_max'];
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:
diff changeset
153 $sql .= "', type='" . $row['type'];
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:
diff changeset
154 $sql .= "', batch_size='" . $row['batch_size'];
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:
diff changeset
155 $sql .= "', boil_size='" . $row['boil_size'];
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:
diff changeset
156 $sql .= "', boil_time='" . $row['boil_time'];
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:
diff changeset
157 $sql .= "', efficiency='" . $row['efficiency'];
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:
diff changeset
158 $sql .= "', est_og='0.000";
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:
diff changeset
159 $sql .= "', est_fg='0.000";
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:
diff changeset
160 $sql .= "', est_abv='0.0";
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:
diff changeset
161 $sql .= "', est_carb='0";
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:
diff changeset
162 $sql .= "', est_color='0";
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:
diff changeset
163 $sql .= "', color_method='" . $row['color_method'];
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:
diff changeset
164 $sql .= "', est_ibu='0";
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:
diff changeset
165 $sql .= "', ibu_method='" . $row['ibu_method'];
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:
diff changeset
166 $sql .= "', sparge_temp='" . $row['sparge_temp'];
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:
diff changeset
167 $sql .= "', sparge_ph='" . $row['sparge_ph'];
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:
diff changeset
168 $sql .= "', sparge_volume='" . $row['sparge_volume'];
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:
diff changeset
169 $sql .= "', sparge_source='" . $row['sparge_source'];
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:
diff changeset
170 $sql .= "', sparge_acid_type='" . $row['sparge_acid_type'];
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:
diff changeset
171 $sql .= "', sparge_acid_perc='" . $row['sparge_acid_perc'];
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:
diff changeset
172 $sql .= "', sparge_acid_amount='0";
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:
diff changeset
173 $sql .= "', mash_ph='" . $row['mash_ph'];
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:
diff changeset
174 $sql .= "', mash_name='" . $row['mash_name'];
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:
diff changeset
175 $sql .= "', calc_acid='" . $row['calc_acid'];
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:
diff changeset
176 $sql .= "', w1_name='" . mysqli_real_escape_string($link, $row['w1_name']);
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:
diff changeset
177 $sql .= "', w1_amount='" . $row['w1_amount'];
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:
diff changeset
178 $sql .= "', w1_calcium='" . $row['w1_calcium'];
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:
diff changeset
179 $sql .= "', w1_sulfate='" . $row['w1_sulfate'];
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:
diff changeset
180 $sql .= "', w1_chloride='" . $row['w1_chloride'];
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:
diff changeset
181 $sql .= "', w1_sodium='" . $row['w1_sodium'];
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:
diff changeset
182 $sql .= "', w1_magnesium='" . $row['w1_magnesium'];
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:
diff changeset
183 $sql .= "', w1_total_alkalinity='" . $row['w1_total_alkalinity'];
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:
diff changeset
184 $sql .= "', w1_ph='" . $row['w1_ph'];
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:
diff changeset
185 $sql .= "', w1_cost='" . $row['w1_cost'];
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:
diff changeset
186 $sql .= "', w2_name='" . mysqli_real_escape_string($link, $row['w2_name']);
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:
diff changeset
187 $sql .= "', w2_amount='" . $row['w2_amount'];
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:
diff changeset
188 $sql .= "', w2_calcium='" . $row['w2_calcium'];
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:
diff changeset
189 $sql .= "', w2_sulfate='" . $row['w2_sulfate'];
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:
diff changeset
190 $sql .= "', w2_chloride='" . $row['w2_chloride'];
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:
diff changeset
191 $sql .= "', w2_sodium='" . $row['w2_sodium'];
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:
diff changeset
192 $sql .= "', w2_magnesium='" . $row['w2_magnesium'];
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:
diff changeset
193 $sql .= "', w2_total_alkalinity='" . $row['w2_total_alkalinity'];
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:
diff changeset
194 $sql .= "', w2_ph='" . $row['w2_ph'];
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:
diff changeset
195 $sql .= "', w2_cost='" . $row['w2_cost'];
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:
diff changeset
196 $sql .= "', wa_acid_name='" . $row['wa_acid_name'];
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:
diff changeset
197 $sql .= "', wa_acid_perc='" . $row['wa_acid_perc'];
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:
diff changeset
198 $sql .= "', wa_base_name='" . $row['wa_base_name'];
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:
diff changeset
199 $sql .= "', starter_enable='" . $row['starter_enable'];
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:
diff changeset
200 $sql .= "', starter_type='" . $row['starter_type'];
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:
diff changeset
201 $sql .= "', starter_sg='" . $row['starter_sg'];
458
47b592993dd5 Version 0.3.15. Implemented final pH during packaging. Updated prod_new, prod_duplicate, prod_edit, rec_toproduct for this new field and several other fields added in previous versions.
Michiel Broek <mbroek@mbse.eu>
parents: 432
diff changeset
202 $sql .= "', starter_viability='97";
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:
diff changeset
203 $sql .= "', prop1_type='" . $row['prop1_type'];
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:
diff changeset
204 $sql .= "', prop1_volume='" . $row['prop1_volume'];
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:
diff changeset
205 $sql .= "', prop2_type='" . $row['prop2_type'];
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:
diff changeset
206 $sql .= "', prop2_volume='" . $row['prop2_volume'];
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:
diff changeset
207 $sql .= "', prop3_type='" . $row['prop3_type'];
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:
diff changeset
208 $sql .= "', prop3_volume='" . $row['prop3_volume'];
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:
diff changeset
209 $sql .= "', prop4_type='" . $row['prop4_type'];
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:
diff changeset
210 $sql .= "', prop4_volume='" . $row['prop4_volume'];
305
bb55e065888a Fix escape single quotes
Michiel Broek <mbroek@mbse.eu>
parents: 303
diff changeset
211 $sql .= "', json_fermentables='" . str_replace($rescapers,$rreplacements,$row['json_fermentables']);
bb55e065888a Fix escape single quotes
Michiel Broek <mbroek@mbse.eu>
parents: 303
diff changeset
212 $sql .= "', json_hops='" . str_replace($rescapers,$rreplacements,$row['json_hops']);
bb55e065888a Fix escape single quotes
Michiel Broek <mbroek@mbse.eu>
parents: 303
diff changeset
213 $sql .= "', json_miscs='" . str_replace($rescapers,$rreplacements,$row['json_miscs']);
bb55e065888a Fix escape single quotes
Michiel Broek <mbroek@mbse.eu>
parents: 303
diff changeset
214 $sql .= "', json_yeasts='" . str_replace($rescapers,$rreplacements,$row['json_yeasts']);
bb55e065888a Fix escape single quotes
Michiel Broek <mbroek@mbse.eu>
parents: 303
diff changeset
215 $sql .= "', json_mashs='" . str_replace($rescapers,$rreplacements,$row['json_mashs']);
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:
diff changeset
216 $sql .= "';";
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:
diff changeset
217
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:
diff changeset
218 $result = mysqli_query($link, $sql);
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:
diff changeset
219 if (! $result) {
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:
diff changeset
220 syslog(LOG_NOTICE, "db_product: result: ".mysqli_error($link));
742
3c8928d956cd Prevent oversized log message when there is no error.
Michiel Broek <mbroek@mbse.eu>
parents: 615
diff changeset
221 syslog(LOG_NOTICE, $sql);
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:
diff changeset
222 } 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:
diff changeset
223 $lastid = mysqli_insert_id($link);
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:
diff changeset
224 syslog(LOG_NOTICE, "db_product: inserted record ".$lastid);
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:
diff changeset
225 }
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:
diff changeset
226 echo "<script>window.close();</script>";
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:
diff changeset
227 exit;

mercurial