<?php
    // if(isset($_COOKIE["ordered"])) {
    //     header("Location: thank2.html");
    //     die();
    // }
    if(isset($_POST['Phone']))
    {
        $sheetUrl = 'https://script.google.com/macros/s/AKfycbwizJFzQPbOBjLLJTE9UXsv0GTAYlc70B-3CEj6sBhkVwRpnRkIYF0H9vpxcMBbvSwo/exec';
        $encodedData = http_build_query($_POST);
        $options = [
            CURLOPT_URL => $sheetUrl,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => $encodedData,
            CURLOPT_RETURNTRANSFER => true,
        ];
        $curl = curl_init();
        curl_setopt_array($curl, $options);
        $response = curl_exec($curl);
        curl_close($curl);
        if ($response !== false) {
            // setcookie("ordered", "yep", time() + (86400));
            echo 'Success';die();
        } else {
            echo 'Error';die();
        }
    }

?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
	<link rel="stylesheet" type="text/css" href="css/style.css?v=2.6">
	<title>Deboucheur Nettoyant Puissant pour Éviers et Canalisations</title>
    <script type="text/javascript">
        var product_id = "Deboucheur Nettoyant Puissant pour Éviers et Canalisations";
    </script>
</head>
<body>
	<div class="container mx-auto">
		<img alt="Flash sale" width="100%" onclick="scrollToForm()" src="img/1.webp">
		<div class="box-form dv_checkout">
			<form id="frm_post" method="POST" onsubmit="setOrder(event)">
			    <h3 class="fw-bold text-center mt-0"> 
				Pour commander, choisissez une offre et remplissez le formulaire ci-dessous đź‘‡</h3>
				<div class="form-row flex-center">
					<input old-price="790000" new-price="190000" type="radio" name="offer" id="1_unit" value="1" class="form-input qty-1" checked>
					<label for="1_unit" class="form-label w-100 d-flex justify-content-between align-items-center">
						<span class="fw-bold">Acheter 1 + 1 GRATUITS</span>
						<span class="fw-bold">190000 GNF</span>
					</label>
				</div>
				<div class="form-row flex-center mt-3">
					<input old-price="890000" new-price="390000" type="radio" name="offer" id="2_unit" value="2" class="form-input qty-2">
					<label for="2_unit" class="form-label w-100 d-flex justify-content-between align-items-center">
						<span class="fw-bold d-grid">Acheter 2 + 2 GRATUITS<span class="badge-corner">Vente Flash</span></span>
						<span class="fw-bold">290000 GNF</span>
					</label>
				</div>
				<div class="form-row flex-center mt-3">
					<input old-price="990000" new-price="490000" type="radio" name="offer" id="3_unit" value="3" class="form-input qty-3">
					<label for="3_unit" class="form-label w-100 d-flex justify-content-between align-items-center">
						<span class="fw-bold d-grid">Acheter 3 + 3 GRATUITS<span class="badge-corner">Meilleur Offre</span></span>
						<span class="fw-bold">390000 GNF</span>
					</label>
				</div>
				<h3 class="fw-bold mb-1">Mode de livraison :</h3>
				<div class="form-row2 flex-center2">
					<input type="radio" checked id="delivery_mode" class="form-input2">
					<label for="delivery_mode" class="form-label w-100 d-flex justify-content-between align-items-center">
						<span>Livraison gratuite</span>
						<span class="fw-bold">Gratuit</span>
					</label>
				</div>
                </br>
				<div class="input-group input-group-lg">
				  	<div class="input-group-prepend">
				    	<span class="input-group-text" id="name"><svg class="svg-input" viewBox="0 0 24 24" fill="none"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <circle cx="12" cy="6" r="4" fill="#fff"></circle> <path d="M20 17.5C20 19.9853 20 22 12 22C4 22 4 19.9853 4 17.5C4 15.0147 7.58172 13 12 13C16.4183 13 20 15.0147 20 17.5Z" fill="#fff"></path> </g></svg></span>
				  	</div>
				  	<input autocomplete="name" name="Name" oninvalid="this.setCustomValidity('Veuillez entrez votre nom')" oninput="this.setCustomValidity('')" required="" id="customer_name" type="text" class="form-control" placeholder="Entrez votre Nom ici" aria-label="Nom" aria-describedby="name">
				</div>
				</br>
				<div class="input-group input-group-lg">
				  	<div class="input-group-prepend">
				    	<span class="input-group-text" id="phone"><svg class="svg-input" viewBox="0 0 24 24" fill="none"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M16.5562 12.9062L16.1007 13.359C16.1007 13.359 15.0181 14.4355 12.0631 11.4972C9.10812 8.55901 10.1907 7.48257 10.1907 7.48257L10.4775 7.19738C11.1841 6.49484 11.2507 5.36691 10.6342 4.54348L9.37326 2.85908C8.61028 1.83992 7.13596 1.70529 6.26145 2.57483L4.69185 4.13552C4.25823 4.56668 3.96765 5.12559 4.00289 5.74561C4.09304 7.33182 4.81071 10.7447 8.81536 14.7266C13.0621 18.9492 17.0468 19.117 18.6763 18.9651C19.1917 18.9171 19.6399 18.6546 20.0011 18.2954L21.4217 16.883C22.3806 15.9295 22.1102 14.2949 20.8833 13.628L18.9728 12.5894C18.1672 12.1515 17.1858 12.2801 16.5562 12.9062Z" fill="#fff"></path> </g></svg></span>
				  	</div>
				  	<input name="Phone" oninput="validatePhone(this)" oninvalid="this.setCustomValidity('Veuillez entrez votre tĂ©lĂ©phone')"  required="" id="customer_phone" type="tel" class="form-control" placeholder="Votre NumĂ©ro de TĂ©lĂ©phone" aria-label="TĂ©lĂ©phone" aria-describedby="phone" autocomplete="tel-national">
				</div>
				</br>
				<div class="input-group input-group-lg">
				  	<div class="input-group-prepend">
				    	<span class="input-group-text" id="address"><svg class="svg-input" fill="#fff" viewBox="0 0 24 24" data-name="Layer 1" id="Layer_1"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><title></title><path d="M12,2a8,8,0,0,0-8,8c0,5.4,7,11.5,7.35,11.76l.65.56.65-.56C13,21.5,20,15.4,20,10A8,8,0,0,0,12,2Zm0,12a4,4,0,1,1,4-4A4,4,0,0,1,12,14Z"></path><circle cx="12" cy="10" r="2"></circle></g></svg></span>
				  	</div>
				  	<input autocomplete="street-address" name="Address" oninvalid="this.setCustomValidity('Veuillez entrez votre adresse')" oninput="this.setCustomValidity('')" required="" id="customer_address" type="text" class="form-control" placeholder="Votre Adresse" aria-label="Adresse / Ville" aria-describedby="address">
				</div>

				<button id="btn-buy" class="btn-buy btn btn-animation mx-auto">
					<svg viewBox="0 0 30 24" fill="none" class="svg-shop"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path fill-rule="evenodd" clip-rule="evenodd" d="M9.61132 13C9.24662 13 8.91085 13.1985 8.7351 13.5181C8.36855 14.1845 8.85071 15 9.61131 15H18.92C19.4723 15 19.92 15.4477 19.92 16C19.92 16.5523 19.4723 17 18.92 17H17.93H7.92999H7.92004C6.40004 17 5.44004 15.37 6.17004 14.03L7.02318 12.488C7.33509 11.9243 7.35632 11.2448 7.08022 10.6627L4.25211 4.70011C4.04931 4.27254 3.6184 4 3.14518 4H2.92004C2.36776 4 1.92004 3.55228 1.92004 3C1.92004 2.44772 2.36776 2 2.92004 2H3.92398C4.69708 2 5.40095 2.44557 5.7317 3.14435L5.90228 3.50471C5.93443 3.5016 5.96703 3.5 6 3.5H21C21.5523 3.5 22 3.94772 22 4.5C22 4.77321 21.8904 5.02082 21.7129 5.20131C21.7448 5.41025 21.7106 5.63097 21.6008 5.83041L18.22 11.97C17.88 12.59 17.22 13 16.47 13H9.61132ZM7.92999 17C9.03456 17 9.92999 17.8954 9.92999 19C9.92999 20.1046 9.03456 21 7.92999 21C6.82542 21 5.92999 20.1046 5.92999 19C5.92999 17.8954 6.82542 17 7.92999 17ZM17.93 17C16.8254 17 15.93 17.8954 15.93 19C15.93 20.1046 16.8254 21 17.93 21C19.0346 21 19.93 20.1046 19.93 19C19.93 17.8954 19.0346 17 17.93 17ZM19.5108 5.5L17.0408 9.96767C16.6886 10.6046 16.0183 11 15.2905 11H10.7161C9.94301 11 9.23914 10.5544 8.90839 9.85565L6.84671 5.5H19.5108Z" fill="#ffffff"></path> <path d="M7.92999 20C8.48228 20 8.92999 19.5523 8.92999 19C8.92999 18.4477 8.48228 18 7.92999 18C7.37771 18 6.92999 18.4477 6.92999 19C6.92999 19.5523 7.37771 20 7.92999 20Z" fill="#ffffff"></path> <path d="M18.93 19C18.93 19.5523 18.4823 20 17.93 20C17.3777 20 16.93 19.5523 16.93 19C16.93 18.4477 17.3777 18 17.93 18C18.4823 18 18.93 18.4477 18.93 19Z" fill="#ffffff"></path> </g></svg><span>- Cliquez ici pour Commander -<br></span>
					<span class="spn-pm">Paiement Ă  la Livraison</span>
				</button>
                <svg class="load" xmlns="http://www.w3.org/2000/svg" width="135" height="140" viewBox="0 0 135 140" fill="#259bea" style="width: 78px;margin: auto;display: none">
                    <rect y="10" width="15" height="120" rx="6">
                        <animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/>
                        <animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/>
                    </rect>
                    <rect x="30" y="10" width="15" height="120" rx="6">
                        <animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/>
                        <animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/>
                    </rect>
                    <rect x="60" width="15" height="140" rx="6">
                        <animate attributeName="height" begin="0s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/>
                        <animate attributeName="y" begin="0s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/>
                    </rect>
                    <rect x="90" y="10" width="15" height="120" rx="6">
                        <animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/>
                        <animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/>
                    </rect>
                    <rect x="120" y="10" width="15" height="120" rx="6">
                        <animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"/>
                        <animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/>
                    </rect>
                </svg>
			</form>
			<img alt="Shop Now" width="100%" loading="lazy" src="img/assets/our_advantage.webp">
		</div>
        <img alt="BALDMART EXPRESS" onclick="scrollToForm()" width="100%" loading="lazy" src="img/2.webp" />
        <div id="div-sticky" style="display: none;">
            <button onclick="scrollToForm()" id="btn-cmd" class="btn-cmd btn btn-animation-shake mx-auto btn-sticky">
                <svg viewBox="0 0 30 24" fill="none" class="svg-shop"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path fill-rule="evenodd" clip-rule="evenodd" d="M9.61132 13C9.24662 13 8.91085 13.1985 8.7351 13.5181C8.36855 14.1845 8.85071 15 9.61131 15H18.92C19.4723 15 19.92 15.4477 19.92 16C19.92 16.5523 19.4723 17 18.92 17H17.93H7.92999H7.92004C6.40004 17 5.44004 15.37 6.17004 14.03L7.02318 12.488C7.33509 11.9243 7.35632 11.2448 7.08022 10.6627L4.25211 4.70011C4.04931 4.27254 3.6184 4 3.14518 4H2.92004C2.36776 4 1.92004 3.55228 1.92004 3C1.92004 2.44772 2.36776 2 2.92004 2H3.92398C4.69708 2 5.40095 2.44557 5.7317 3.14435L5.90228 3.50471C5.93443 3.5016 5.96703 3.5 6 3.5H21C21.5523 3.5 22 3.94772 22 4.5C22 4.77321 21.8904 5.02082 21.7129 5.20131C21.7448 5.41025 21.7106 5.63097 21.6008 5.83041L18.22 11.97C17.88 12.59 17.22 13 16.47 13H9.61132ZM7.92999 17C9.03456 17 9.92999 17.8954 9.92999 19C9.92999 20.1046 9.03456 21 7.92999 21C6.82542 21 5.92999 20.1046 5.92999 19C5.92999 17.8954 6.82542 17 7.92999 17ZM17.93 17C16.8254 17 15.93 17.8954 15.93 19C15.93 20.1046 16.8254 21 17.93 21C19.0346 21 19.93 20.1046 19.93 19C19.93 17.8954 19.0346 17 17.93 17ZM19.5108 5.5L17.0408 9.96767C16.6886 10.6046 16.0183 11 15.2905 11H10.7161C9.94301 11 9.23914 10.5544 8.90839 9.85565L6.84671 5.5H19.5108Z" fill="#ffffff"></path> <path d="M7.92999 20C8.48228 20 8.92999 19.5523 8.92999 19C8.92999 18.4477 8.48228 18 7.92999 18C7.37771 18 6.92999 18.4477 6.92999 19C6.92999 19.5523 7.37771 20 7.92999 20Z" fill="#ffffff"></path> <path d="M18.93 19C18.93 19.5523 18.4823 20 17.93 20C17.3777 20 16.93 19.5523 16.93 19C16.93 18.4477 17.3777 18 17.93 18C18.4823 18 18.93 18.4477 18.93 19Z" fill="#ffffff"></path> </g></svg><span>-  Cliquez ici pour Commander  -<br><span class="spn-pm">Paiement Ă  la Livraison</span></span>
            </button>
        </div>
	</div>
    <script type="text/javascript" src="js/main.min.js?v=1.1"></script>
</body>
</html>