<?php
            if (!isset($_GET['linktype']))
            {
                $linkType = "pip";
            }
            else
            {
                # if linktype does exist, set it to the value of the query parameter
                $linkType = $_GET['linktype'];
                # remove the gs1: prefix from the linktype and convert to lowercase for easier matching later
                $linkType = strtolower(str_replace("gs1:", "", $linkType));
            }

            if (!isset($_GET['lot']))
            {
                # if 'lot' does not exist, set $lot to value ''
                $lot = '';
            }
            else
            {
                # if 'lot' does exist, set $lot to the value of the query parameter
                $lot = $_GET['lot'];
            }
?>
<!DOCTYPE html>
<html lang="en-GB">
<head>
    <meta charset='utf-8'>
    <meta name="viewport" content="width=device-width">
    <link rel="stylesheet" href="../dgstyle.css" type="text/css"/>
    <title>Dal Giardino Extra Virgin Olive Oil Exclusive Selection 1L</title>
    <script type="application/ld+json">
        {
            "@context": {
                "gs1": "http://gs1.org/voc/",
                "xsd": "http://www.w3.org/2001/XMLSchema#",
                "@vocab": "http://gs1.org/voc/"
            },
            "@type": "gs1:Offer",
            "itemOffered": {
                "@type": "gs1:FoodBeverageTobaccoProduct",
                "productName": [
                    {
                        "@value": "Rice with Mushrooms",
                        "@language": "en"
                    },
                    {
                        "@value": "Ris med svamp",
                        "@language": "sv"
                    }
                ],
                "brandOwner": {
                    "@id": "Dal Giardino Foods"
                },
                "brand": {
                    "brandName": [
                        {
                            "@value": "Dal Giardino",
                            "@language": "en"
                        },
                        {
                            "@value": "Dal Giardino",
                            "@language": "sv"
                        }
                    ],
                    "subBrandName": [
                        {
                            "@value": "Risotto",
                            "@language": "en"
                        },
                        {
                            "@value": "Risotto",
                            "@language": "sv"
                        }
                    ],
                    "@type": "gs1:Brand"
                },
                "image": {
                    "filePixelWidth": {
                        "@value": "260",
                        "@type": "xsd:integer"
                    },
                    "filePixelHeight": {
                        "@value": "260",
                        "@type": "xsd:integer"
                    },
                    "referencedFileURL": {
                        "@id": "https://dalgiardino.com/risotto-rice-with-mushrooms/Dal_Giardino_Risotto_Rice_With_Nett_260.png"
                    }
                },
                "netWeight": {
                    "value": {
                        "@value": "411",
                        "@type": "xsd:float"
                    },
                    "unitCode": "GRM",
                    "@type": "gs1:QuantitativeValue"
                },
                "grossWeight": {
                    "value": {
                        "@value": "500",
                        "@type": "xsd:float"
                    },
                    "unitCode": "GRM",
                    "@type": "gs1:QuantitativeValue"
                },
                "inPackageHeight": {
                    "value": {
                        "@value": "40",
                        "@type": "xsd:float"
                    },
                    "unitCode": "CMT",
                    "@type": "gs1:QuantitativeValue"
                },
                "inPackageWidth": {
                    "value": {
                        "@value": "30",
                        "@type": "xsd:float"
                    },
                    "unitCode": "CMT",
                    "@type": "gs1:QuantitativeValue"
                },
                "inPackageDepth": {
                    "value": {
                        "@value": "10",
                        "@type": "xsd:float"
                    },
                    "unitCode": "CMT",
                    "@type": "gs1:QuantitativeValue"
                },
                "descriptiveSize": [
                    {
                        "@value": "Large",
                        "@language": "en"
                    },
                    {
                        "@value": "Stor",
                        "@language": "sv"
                    }
                ],
                "countryOfOriginStatement": [
                    {
                        "@value": "Italy",
                        "@language": "en"
                    },
                    {
                        "@value": "Italien",
                        "@language": "sv"
                    }
                ],
                "countryOfOrigin": [
                    {
                        "@type": "gs1:Country",
                        "countryCode": "IT"
                    }
                ],
                "packagingMarkedLabelAccreditation": [
                    {
                        "@type": "gs1:PackagingMarkedLabelAccreditationCode",
                        "countryCode": "SVANEN"
                    }
                ]
            }
        }
    </script>
    <style>
        section#product p.description {
            top: 6em;
        }

        section#product p.goodStuff {
            top: 8em;
        }

        section#product p.linkGraphic {
            top: 12em;
        }

        section#product p#romance {
            top: 17em;
        }

        section#product {
            height: 680px;
        }

    </style>
</head>
<body>
<header>
    <a href="../"><img src="../dglogo.png" alt="Dal Giardino logo" id="logo"/></a>
    <!--  <img src="MadeInItaly.jpg" alt="The words Made in Italy styled into a rosette in Italian flag colours" id="mii"/> -->

    <figure id="trueTaste">
        <img src="https://www.w3.org/2013/share-psi/bp/Flag_of_Italy.svg" alt="The Italian flag"/>
        <figcaption>The true taste of Italy!</figcaption>
    </figure>
    <p class="nav"><a href="../risotto-rice-with-mushrooms/">Products</a> | <a href="../mushroom-squash-risotto/">Recipes</a>
        | <a href="../about/">About Dal Giardino</a> | <a href="../where-to-buy/">Where to Buy</a></p>
</header>

<section id="product">

    <figure>
        <img src="OilPackShot.png" alt="Packshot of Dal Giardino Extra Virgin Olive Oil" style="width:170px"/>
    </figure>

    <div id="productText">
        <p class="title">Dal Giardino Extra Virgin Olive Oil Exclusive Selection<span id="titleNetWeight"> 1L</span></p>
        <?php
        if($linkType == 'recallstatus')
        {
            echo '<p class="description">Recall status</p>';
            if ($lot == '12345')
            {
                # if lot has value '12345', display text 'URGENT: RECALL NOTICE' in H3 with colour red:
                echo '<h3 class="title" style="color:red">URGENT: RECALL NOTICE</h3>';
                echo '<p>Lot number ' . $lot . ' is subject to a recall notice. Please contact your wholesaler for return instructions.<br>DO NOT PLACE ON SALE ANY BOTTLES WITH THIS LOT NUMBER.</p>';
            }
            else if($lot != '')
            {
                echo '<h3 class="title" style="color:green">NO RECALL NOTICE</h3>';
                echo '<p>Lot number ' . $lot . ' is not subject to a recall notice, so you may proceed to place this product on sale</p>';
            }
            else
            {
                # if not, display the link without the lot number
                echo '<h3 class="title" style="color:goldenrod">RECALL NOTICE STATUS UKNOWN</h3>';
                echo '<p>No Lot number was included in the request, so we cannot help check if there is a recall notice.</p>';
            }
        }
        else
        {
            if ($lot == '12345')
            {
                # if lot has value '12345', display text 'URGENT: RECALL NOTICE' in H3 with colour red:
                echo '<h3 class="title" style="color:red">URGENT: RECALL NOTICE</h3>';
                echo '<p>Lot number ' . $lot . ' is subject to a recall notice. Please return this bottle for a refund.<br>DO NOT CONSUME THE CONTENTS! If you have ingested any contents please contact your doctor immediately.</p>';
            }
            else
            {
                echo '<p class="description">Cold extraction</p>';
                echo '<p class="goodStuff"><span id="gluten">Gluten free</span> <span id="vegetarian">Vegetarian</span> <span id="vegan">Vegan</span></p>';
                echo '<p class="linkGraphic"><span id="recipes">RECIPES</span> <span id="howToCook">HOW TO COOK</span> <span id="smartLabel">SmartLabel&trade;</span></p>';
                echo '<p id="romance">No Italian meal is complete without a generous dash of extra virgin olive oil. Part of our <em>exclusive range</em>, this cold extraction extra virgin olive oil is the finest in our range and the very essence of a memorable Italian experience.</p>';
            }
        }
 

        
        
        echo '<p class="link"><a href="../how-to-cook/">How to Cook</a></p>';
    ?>


        <div class="gda" id="regInfo"><span class="title">Per 125g serving</span>
            <ul>
                <li class="gda-item">
                    <div class="top"><span class="title" style="font-size:10px">Energy</span><span class="value energy">703 kJ 167 kcal</span>
                    </div>
                    <div class="bottom -"><span class="value">8.0%</span></div>
                </li>
                <li class="gda-item">
                    <div class="top"><span class="title" style="font-size:10px">Fat</span><span
                                class="value">3.8g</span></div>
                    <div class="bottom low"><span class="value">5.0%</span></div>
                </li>
                <li class="gda-item">
                    <div class="top"><span class="title" style="font-size:10px">Saturates</span><span
                                class="value">2.4g</span></div>
                    <div class="bottom medium"><span class="value">12.0%</span></div>
                </li>
                <li class="gda-item">
                    <div class="top"><span class="title" style="font-size:10px">Sugars</span><span
                                class="value">0.8g</span></div>
                    <div class="bottom low"><span class="value">&lt;1.0%</span></div>
                </li>
                <li class="gda-item">
                    <div class="top"><span class="title" style="font-size:10px">Salt</span><span
                                class="value">0.38g</span></div>
                    <div class="bottom low"><span class="value">6.0%</span></div>
                </li>
            </ul>
            <p class="reference">Typical values per 100g: Energy 560kJ/133kcal </p></div>

    </div>


</section>

</html>

