www/import/from_brouwhulp.php

changeset 147
e6e5d007eb54
parent 143
122f64716161
child 148
c0f0bbfefd63
equal deleted inserted replaced
146:2a6c00d325b2 147:e6e5d007eb54
851 $sql .= "', est_carb='" . floatval($recipe->CARBONATION); 851 $sql .= "', est_carb='" . floatval($recipe->CARBONATION);
852 852
853 if ($recipe->STYLE) { 853 if ($recipe->STYLE) {
854 $sql .= recipe_style($recipe); 854 $sql .= recipe_style($recipe);
855 } 855 }
856 if ($recipe->CALC_ACID) {
857 ($recipe->CALC_ACID == "TRUE") ? $sql .= "', calc_acid='1" : $sql .= "', calc_acid='0";
858 }
859 if ($recipe->TARGET_PH) {
860 $sql .= "', mash_ph='" . floatval($recipe->TARGET_PH);
861 }
862 if ($recipe->SPARGE_ACID_TYPE) {
863 $sql .= "', sparge_acid_type='" . mysqli_real_escape_string($db, $recipe->SPARGE_ACID_TYPE);
864 }
865 if ($recipe->ACID_SPARGE_PERC) {
866 $sql .= "', sparge_acid_perc='" . floatval($recipe->ACID_SPARGE_PERC);
867 }
868 if ($recipe->LACTIC_SPARGE) {
869 $sql .= "', sparge_acid_amount='" . floatval($recipe->LACTIC_SPARGE);
870 }
871 if ($recipe->VOLUME_HLT) {
872 $sql .= "', sparge_volume='" . floatval($recipe->VOLUME_HLT);
873 }
856 874
857 /* 875 /*
858 * Put the fermentables in a json array 876 * Put the fermentables in a json array
859 */ 877 */
860 if ($recipe->FERMENTABLES) { 878 if ($recipe->FERMENTABLES) {
906 924
907 /* 925 /*
908 * Put the mash in a json array 926 * Put the mash in a json array
909 */ 927 */
910 if ($recipe->MASH) { 928 if ($recipe->MASH) {
911 $sql .= "',mash_sparge_temp='" . floatval($recipe->MASH->SPARGE_TEMP); 929 $sql .= "',sparge_temp='" . floatval($recipe->MASH->SPARGE_TEMP);
912 $sql .= "',mash_ph='" . floatval($recipe->MASH->PH); 930 $sql .= "',sparge_ph='" . floatval($recipe->MASH->PH);
913 if ($recipe->MASH->NAME) 931 if ($recipe->MASH->NAME)
914 $sql .= "',mash_name='" . mysqli_real_escape_string($db, $recipe->MASH->NAME); 932 $sql .= "',mash_name='" . mysqli_real_escape_string($db, $recipe->MASH->NAME);
915 933
916 if ($recipe->MASH->MASH_STEPS) { 934 if ($recipe->MASH->MASH_STEPS) {
917 $steps = recipe_mash_steps($recipe); 935 $steps = recipe_mash_steps($recipe);
1027 1045
1028 if ($recipe->STYLE) { 1046 if ($recipe->STYLE) {
1029 $rsql .= recipe_style($recipe); 1047 $rsql .= recipe_style($recipe);
1030 } 1048 }
1031 1049
1050 if ($recipe->CALC_ACID) {
1051 ($recipe->CALC_ACID == "TRUE") ? $rsql .= "', calc_acid='1" : $rsql .= "', calc_acid='0";
1052 }
1053 if ($recipe->TARGET_PH) {
1054 $rsql .= "', mash_ph='" . floatval($recipe->TARGET_PH);
1055 }
1056 if ($recipe->SPARGE_ACID_TYPE) {
1057 $rsql .= "', sparge_acid_type='" . mysqli_real_escape_string($db, $recipe->SPARGE_ACID_TYPE);
1058 }
1059 if ($recipe->ACID_SPARGE_PERC) {
1060 $rsql .= "', sparge_acid_perc='" . floatval($recipe->ACID_SPARGE_PERC);
1061 }
1062 if ($recipe->LACTIC_SPARGE) {
1063 $rsql .= "', sparge_acid_amount='" . floatval($recipe->LACTIC_SPARGE);
1064 }
1065 if ($recipe->VOLUME_HLT) {
1066 $rsql .= "', sparge_volume='" . floatval($recipe->VOLUME_HLT);
1067 }
1068
1032 /* 1069 /*
1033 * Put the fermentables in a json array 1070 * Put the fermentables in a json array
1034 */ 1071 */
1035 if ($recipe->FERMENTABLES) { 1072 if ($recipe->FERMENTABLES) {
1036 $fermentables = recipe_fermentables($recipe); 1073 $fermentables = recipe_fermentables($recipe);
1081 1118
1082 /* 1119 /*
1083 * Put the mash in a json array 1120 * Put the mash in a json array
1084 */ 1121 */
1085 if ($recipe->MASH) { 1122 if ($recipe->MASH) {
1086 $rsql .= "',mash_sparge_temp='" . floatval($recipe->MASH->SPARGE_TEMP); 1123 $rsql .= "',sparge_temp='" . floatval($recipe->MASH->SPARGE_TEMP);
1087 $rsql .= "',mash_ph='" . floatval($recipe->MASH->PH); 1124 $rsql .= "',sparge_ph='" . floatval($recipe->MASH->PH);
1088 if ($recipe->MASH->NAME) 1125 if ($recipe->MASH->NAME)
1089 $rsql .= "',mash_name='" . mysqli_real_escape_string($db, $recipe->MASH->NAME); 1126 $rsql .= "',mash_name='" . mysqli_real_escape_string($db, $recipe->MASH->NAME);
1090 1127
1091 if ($recipe->MASH->MASH_STEPS) { 1128 if ($recipe->MASH->MASH_STEPS) {
1092 $steps = recipe_mash_steps($recipe); 1129 $steps = recipe_mash_steps($recipe);

mercurial