$val) { if ($val['0'] == $id) { return $key; } } return null; } function wildcard_in_array ($string, $array = array ()){ foreach ($array as $key => $value) { unset ($array[$key]); if (strpos($value, $string) !== false) { $array[$key] = $value; } } return $array; } function keyforAllergen($id, $array, $allergenposition) { foreach ($array as $key => $val) { if ($val['0'] == $id) { return $val[$allergenposition]; } } return null; } # $Allergenid = searchforAllergen($IngredientFieldName, $AllergensListName); } ?>
Packaging 1Packaging Name: ".$Packaging1_FreeText."
Packaging Material: ".$ClosureCommonName1."Manufactured by: ".$PackagingManufacturer1.", ".$PackagingAddress1."
".$PackagingPhrase1.""; } if ($Closure1_Material){ $FinalPackaging=$FinalPackaging."Closure Type & Colour: ".$Closure1_FreeText."
Closure Material: ".$ClosureCommonName1."Manufactured by: ".$ClosureManufacturer1.", ".$ClosureAddress1."
".$ClosurePhrase1.""; } if ($Packaging2){ $FinalPackaging=$FinalPackaging."".$ProductName." is also packaged in...
Packaging Type & Colour: ".$PackagingType2.", ".$PackagingColour2."
Manufactured by: ".$PackagingManufacturer2.", ".$PackagingAddress2."
".$PackagingData2.""; } if ($Closure2){ $FinalPackaging=$FinalPackaging."Closure Type & Colour: ".$ClosureType2.", ".$ClosureColour1."
Manufactured by: ".$ClosureManufacturer2.", ".$ClosureAddress2."
".$ClosureData2.""; } if ($Packaging3){ $FinalPackaging=$FinalPackaging."".$ProductName." is also packaged in...
Packaging Type & Colour: ".$PackagingType3.", ".$PackagingColour2."
Manufactured by: ".$PackagingManufacturer3.", ".$PackagingAddress3."
".$PackagingData3.""; } if ($Closure3){ $FinalPackaging=$FinalPackaging."Closure Type & Colour: ".$ClosureType3.", ".$ClosureColour1."
Manufactured by: ".$ClosureManufacturer3.", ".$ClosureAddress3."
".$ClosureData3.""; } if ($Packaging4){ $FinalPackaging=$FinalPackaging."".$ProductName." is also packaged in...
Packaging Type & Colour: ".$PackagingType3.", ".$PackagingColour2."
Manufactured by: ".$PackagingManufacturer4.", ".$PackagingAddress4."
".$PackagingData4.""; } if ($Closure4){ $FinalPackaging=$FinalPackaging."Closure Type & Colour: ".$ClosureType4.", ".$ClosureColour1."
Manufactured by: ".$ClosureManufacturer4.", ".$ClosureAddress4."
".$ClosureData4.""; } if ($Packaging5){ $FinalPackaging=$FinalPackaging."".$ProductName." is also packaged in...
Packaging Type & Colour: ".$PackagingType3.", ".$PackagingColour2."
Manufactured by: ".$PackagingManufacturer5.", ".$PackagingAddress5."
".$PackagingData5.""; } if ($Closure5){ $FinalPackaging=$FinalPackaging."Closure Type & Colour: ".$ClosureType5.", ".$ClosureColour1."
Manufactured by: ".$ClosureManufacturer5.", ".$ClosureAddress5."
".$ClosureData5.""; } # GET THE STABILITY RESULS $StabilityTest="SELECT * FROM StabilityTest WHERE ProductBarcode LIKE $pb"; $StabilityTestResult=mysql_query($StabilityTest); $StabilityTestResultNum=mysql_numrows($StabilityTestResult); $StabilityTestResultRow = mysql_fetch_row($StabilityTestResult); if ($StabilityTestResultNum > 0){ $TestResultPhrase=mysql_result($StabilityTestResult,0,"TestResultPhrase"); $StabilityTestResultQuantity=mysql_result($StabilityTestResult,0,"AmountTested"); } $StabilityTestResult= $TestResultPhrase; # GET THE MICRO RESULS $MicroTest="SELECT * FROM MicrobiologicalTest WHERE ProductBarcode LIKE $pb"; $MicroTestTestResult=mysql_query($MicroTest); $MicroTestTestResultNum=mysql_numrows($MicroTestTestResult); $MicroTestTestResultRow = mysql_fetch_row($MicroTestTestResult); if ($MicroTestTestResultNum > 0){ $MicroResultPhrase=mysql_result($MicroTestTestResult,0,"MicroResultPhrase"); $A2dResult=mysql_result($MicroTestTestResult,0,"2dResult"); $A7dResult=mysql_result($MicroTestTestResult,0,"7dResult"); $A14dResult=mysql_result($MicroTestTestResult,0,"14dResult"); $A28dResult=mysql_result($MicroTestTestResult,0,"28dResult"); } $MicroTestTable=""; $MicroTestResult= $MicroResultPhrase; # IF THE ADDRESS FOR THE PRODUCT IS EMPTY, THEN POPULATE WITH NATURALLYTHINKING DETAILS if (!$ProductAddress){ $ProductAddress="Danny Stanzl
Naturallythinking
The Tramsheds
Coomber Way
Croydon
Surrey
CR0 4TQ
Tel: 020 8689 6489
Web: www.naturallythinking.com
Email: support@naturallythinking.eu
Inci | Trade Name | Cas | Einecs | Function | Concentration |
---|
Inci | Cas | Einecs | Molecular Formula | Molecular Weight (Daltons) | Function |
---|
Inci | Function | Conc(% w/w) | Relevant Data |
---|
Inci | Estimated Daily Exposure mg/kg bw/day | Conc(% w/w) | Dermal Absorbption (DAp)% | Systematic Exposure Dosage (SED) mg/kg bw/day | NOAEL mg/kg bw/day | Margin of Safety (MoS) |
---|---|---|---|---|---|---|
".$IngredientTechnicalInci." | ".$IngredientTechnicalInci." | ".$IngredientTechnicalCas." | ".$IngredientTechnicalEinecs." | ".$IngredientTechnicalFunction." | ".$IngredientTechnicalQuantity." | |
".$IngredientTechnicalInci." | ".$IngredientTechnicalCas." | ".$IngredientTechnicalEinecs." | ".${ITMolecularFormula.$IngredientCompositioni}." | ".${ITMolecularWeight.$IngredientCompositioni}." | ".$IngredientTechnicalFunction." | |
".$IngredientTechnicalInci." | ".$IngredientTechnicalFunction." | ".$IngredientTechnicalQuantity." | ".${ITRelevantData.$IngredientCompositioni}." |
IngredientFinalArrayInci '; # print_r ($IngredientFinalInci); # echo ''; # echo '
'; # print_r ($IngredientArray); # echo ''; $i++; } # PRODUCE ALLERGEN ARRAY $Allergens="SELECT * FROM Allergens"; $AllergensResult=mysql_query($Allergens); $AllergensNum=mysql_numrows($AllergensResult); $AllergensI=0; while ($AllergensI < $AllergensNum) { $AllergensRow = mysql_fetch_row($AllergensResult); $AllergensList[] = $AllergensRow; // Inside while loop $AllergensListName[$AllergensRow[0]] = $AllergensRow; // Inside while loop $AllergensI++; } # echo '
'; # print_r ($AllergensListName); # echo ''; # CHECK EACH INGREDIENT AGAINST OUR ALLERGEN TABLE - IF THE INGREDIENT EXISTS, THEN BULD UP A NEW ARRAY WITH ALLERGENS AND QUANTITIES $IngredientBatchesi=0; while ($IngredientBatchesi < 21) { if (${RawIngredientBatch.$IngredientBatchesi}){ $CurrentBatch=${RawIngredientBatch.$IngredientBatchesi}; $CurrentIngredient=${RawIngredientBarcode.$IngredientBatchesi}; $CurrentCas=${ITCas.$IngredientBatchesi}; #echo "CurrentCas: ".$CurrentCas."
Physiochemical Properties:
"; # START THE PHYSIOCHEMICAL PROPERTIES TO SEE WHICH FIELDS ARE APPLICABLE TO THE INGREDIENT USED if (${$ITBATradeName.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."TradeName: ".${$ITBATradeName.$IngredientBatchesi}."
"; } if (${ITBotanicalName.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Botanical Name: ".${ITBotanicalName.$IngredientBatchesi}."
"; } if (${ITBotanicalFamily.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Botanical Family: ".${ITBotanicalFamily.$IngredientBatchesi}."
"; } if (${ITBAInci.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Inci: ".${ITBAInci.$IngredientBatchesi}."
"; } if (${ITBASupplier.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Supplier: ".${ITBASupplier.$IngredientBatchesi}."
"; } if (${ITBADescription.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Description: ".${ITBADescription.$IngredientBatchesi}."
"; } if (${ITBAAppearance.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Appearance: ".${ITBAAppearance.$IngredientBatchesi}."
"; } if (${ITBABoilingPoint.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Boiling Point: ".${ITBABoilingPoint.$IngredientBatchesi}."
"; } $IngredientListLayout=$IngredientListLayout."Taste & Smell: Typical
"; if (${ITBADensity.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Density: ".${ITBADensity.$IngredientBatchesi}."
"; } if (${ITBAViscosity.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Viscosity: ".${ITBAViscosity.$IngredientBatchesi}."
"; } if (${ITBAPka.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Pka: ".${ITBAPka.$IngredientBatchesi}."
"; } if (${ITBAScent.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Odour: ".${ITBAScent.$IngredientBatchesi}."
"; } if (${ITBAPartitionCoefficient.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Partition Coefficient: ".${ITBAPartitionCoefficient.$IngredientBatchesi}."
"; } if (${ITBABoilingPoint.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Boiling Point: ".${ITBABoilingPoint.$IngredientBatchesi}."
"; } if (${ITBASolubilityInWater.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Solubility in Water: ".${ITBASolubilityInWater.$IngredientBatchesi}."
"; } if (${ITBASolubilityInAlcohol.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Solubility in Alcohol: ".${ITBASolubilityInAlcohol.$IngredientBatchesi}."
"; } if (${ITBASolubilityInOil.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Solubility in Oil: ".${ITBASolubilityInOil.$IngredientBatchesi}."
"; } if (${ITBAPartUsed.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Part Used: ".${ITBAPartUsed.$IngredientBatchesi}."
"; } if (${ITBAPh.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."pH: ".${ITBAPh.$IngredientBatchesi}."
"; } if (${ITBASpecificGravity.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Specific Gravity: ".${ITBASpecificGravity.$IngredientBatchesi}."
"; } if (${ITBARefractiveIndex.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Refractive Index ".${ITBARefractiveIndex.$IngredientBatchesi}."
"; } if (${ITBAAcidValue.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Acid Value ".${ITBAAcidValue.$IngredientBatchesi}."
"; } if (${ITBAIodineValue.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Iodine Value ".${ITBAIodineValue.$IngredientBatchesi}."
"; } # COMPOSITION BOX - Is going to take what is written in the composition box, then if nec.. have a look at the allergens boxes and highlight them if need be if (${ITBAComposition.$IngredientBatchesi}) { $IngredientListLayout=$IngredientListLayout."Composition".${ITBAComposition.$IngredientBatchesi}."
"; $compositiontitle="true"; } if ((${ITBAAmylCinnamal.$IngredientBatchesi})||(${ITBABenzylAlcohol.$IngredientBatchesi})||(${ITBACinnamylAlcohol.$IngredientBatchesi})||(${ITBACitral.$IngredientBatchesi})||(${ITBAEugenol.$IngredientBatchesi})||(${ITBAHydroxyCitronellal.$IngredientBatchesi})||(${ITBAIsoeugenol.$IngredientBatchesi})||(${ITBAAmylCinnamylAlcohol.$IngredientBatchesi})||(${ITBABenzylSalicylate.$IngredientBatchesi})||(${ITBACinnamal.$IngredientBatchesi})||(${ITBACourmain.$IngredientBatchesi})||(${ITBAGeraniol.$IngredientBatchesi})||(${ITBABenzylCinnamate.$IngredientBatchesi})||(${ITBAFarnesol.$IngredientBatchesi})||(${ITBAButylPhenylMethylpropional.$IngredientBatchesi})||(${ITBALinalool.$IngredientBatchesi})||(${ITBABenzylBenzoate.$IngredientBatchesi})||(${ITBACitronellol.$IngredientBatchesi})||(${ITBAHexylCinnamal.$IngredientBatchesi})||(${ITBALimonene.$IngredientBatchesi})||(${ITBAMethy.$IngredientBatchesi})||(${ITBAAlpha.$IngredientBatchesi})||(${ITBAEverniaPrunastri.$IngredientBatchesi})||(${ITBAEverniaFufuracea.$IngredientBatchesi})) { #echo ${ITBAInci.$IngredientBatchesi}; $AdditionalAllergensStatement="This product contains some substances listed as allergens which must comply with the applicable IFRA restrictions / recommendations."; if ($compositiontitle !="true"){ $IngredientListLayout=$IngredientListLayout."Composition
"; } $compositiontitle="false"; $IngredientListLayout=$IngredientListLayout."Declaration of allergens
"; $IngredientListLayout=$IngredientListLayout."Microbiological Characteristics
".${ITBAMicrobiologicalCharacteristic.$IngredientBatchesi}."
"; } # END THE INSET FORMATTING $IngredientListLayout=$IngredientListLayout."Inci / Botanical: ".${ITInciExtra.$IngredientBatchesi}."
"; } if (${ITAcuteDermalToxicity.$IngredientBatchesi}) { $ToxicologicalListLayout=$ToxicologicalListLayout."Relevant Data: ".${ITRelevantData.$IngredientBatchesi}."
"; #} if (${ITAdditionalData.$IngredientBatchesi}) { $ToxicologicalListLayout=$ToxicologicalListLayout."".$Allergenid."
"."Max. Allowed concentration in Category ".$ProductCategory." products: ".$Allergenid1."%
"; $AllergensText=$AllergensText."This product is compliant with the IFRA restriction established for it, as the maximum concentration of ".$Allergenid." in the final product would be ".${$Allergenidx.$Allergenid}."
"; $Allergens12Text=$Allergens12Text."This product is compliant with the IFRA restriction established for it, as the maximum concentration of ".$Allergenid." in the final product would be ".${$Allergenidx.$Allergenid}."
"; } if ($Allergenid1 ==100){ $AllergensText=$AllergensText."".$Allergenid."
"."According to IFRA ".$Allergenid." and natural products containing substantional amounts of it, should only be used when the level of peroxides is kept to the lowest practical level. Such products should have a peroxide value of less than 20 millimoles peroxides per litre. The recommendation is to contain an anti-oxidant, example: Tocopheryl actetae or Tocopherol.
"; $Allergens12Text=$Allergens12Text."".$Allergenid."
"."According to IFRA ".$Allergenid." and natural products containing substantional amounts of it, should only be used when the level of peroxides is kept to the lowest practical level. Such products should have a peroxide value of less than 20 millimoles peroxides per litre
"; } } else { #echo "ALLERGEN TEST FAILURE"; $warning=$warning."'; #print_r ($AllergensList); #echo ''; $IngredientFieldNumi++; } } # Calculate the Margins of Safety if ((!${ITNoael.$IngredientBatchesi})&&(${ITInci.$IngredientBatchesi})){ $MarginRequired="No"; #echo "MarginRequired:".$MarginRequired."
The ingredients may remain in contact with the skin for some time altough they product is rinsed off
The frequency of application for this product is ".$ExposureApplicationFrequency.". Although it is used on a regular and repeated basis, it is not expected to cause any acture or chronic toxicity symptoms."; } if ($LeaveOn){ $durationtext="
The ingredients may remain in contact with the skin for some time as this product is a leave on product.
The frequency of application for this product is ".$ExposureApplicationFrequency.". Although it is used on a regular and repeated basis, it is not expected to cause any acture or chronic toxicity symptoms."; } # Work out the Text for the Oral Consumption if (($ProductCategory!=1)&&($ProductCategory!=6)&&($ProductCategory!=7)){ $oraltext="
The reasonably foreseeable route of exposure to this product is through dermal absorption
"; } else { $oraltext="Need text from Maria
"; } # Work out whether the product is for hair or skin if (($ProductCategory!=1)&&($ProductCategory!=6)&&($ProductCategory!=8)&&($ProductCategory!=9)&&($ProductCategory!=10)&&($ProductCategory!=11)){ $targettext="skin"; $secondarytext="The possibility of secondary exposure by routes other than dermal absorption resulting from direct application on the skin is unlikely. If the product comes in contact with eyes rinse thoroughly.
"; } if (($ProductCategory==8)||($ProductCategory==9)){ $targettext="hair"; $secondarytext="The possibility of secondary exposure by routes other than dermal absorption resulting from direct application on the skin is unlikely. If the product comes in contact with eyes rinse thoroughly.
"; } if ($ProductCategory==1){ $targettext="lips"; $secondarytext="The possibility of secondary exposure by routes other than dermal absorption resulting from direct application on the skin is possible through oral consumption. If the product is internally ingested drink plenty of water and do not induce vomitting. If symptoms persist, contact a doctor. If the product comes in contact with eyes rinse thoroughly.
"; } if ($ProductCategory==6){ $targettext="mouth"; $secondarytext="The possibility of secondary exposure by routes other than dermal absorption resulting from direct application on the skin is possible through oral consumption. If the product is internally ingested drink plenty of water and do not induce vomitting. If symptoms persist, contact a doctor. If the product comes in contact with eyes rinse thoroughly.
"; } if ($ProductCategory==10){ $targettext="surface"; $secondarytext="The possibility of secondary exposure by routes other than dermal absorption resulting from direct application on the skin is unlikely. If the product comes in contact with eyes rinse thoroughly.
"; } $ProductExposureData=$ProductExposureData."Sites of application
It is expected to be applied on the ".$ExposureProductArea.""; $ProductExposureData=$ProductExposureData."Surface area of application
The skin surface area involved for this product is ".$ExposureRVIM_SurfaceArea."cm
Typical amount of product applied
The estimated daily amount of product applied is ".$ExposureEstimatedDailyAmount."g, being the retention factor ".$ExposureRetentionFactor." and the calculated relative daily exposure ".$ExposureCalculatedDailyExposure."mg/kg bw/day
"; $ProductExposureData=$ProductExposureData."Duration & Frequency of Use
".$durationtext; $ProductExposureData=$ProductExposureData."Normal and reasonably forseeable exposure route
".$oraltext; if ($ProductCategory!=11){ #Not for Candles $ProductExposureData=$ProductExposureData."Targeted and or/or exposed population(s)
This product is suitable of use on all ".$targettext." types."; } $ProductExposureData=$ProductExposureData."
Potential Secondary Exposure
".$secondarytext; #Do Some Final Loooking at Fields and Default Populating them with default data if it finds no content or certain conditions # The Following Populates the Toxicologal Data for Testing if there is none if (!$ProductToxicologicalData) { $ProductToxicologicalDataPart2="Yes"; $ProductToxicologicalData = "No data available
No data available
No data available
None available.
"; } # The following setups up me (Danny) to be the responsible person and address if there is none if (!$ResponsiblePerson){ $ResponsiblePerson="Danny Stanzl"; } if (!$ResonsibleAddress){ $ResponsibleAddress="Naturallythinking
The Tramsheds
Coomber Way
Croydon
Surrey
CR0 4TQ