Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require("../Global-Cms.php");
- $pagename="commande";
- require('../php/body-html.php');
- require('../php/header-menu.php');
- $do = Secu($_GET['do']);
- $etape = $_GET['etape'];
- $offre = $_GET['offre'];
- $commande_id = $_GET['commande_id'];
- $id_boutique = $_GET['id_boutique'];
- ?>
- <style>
- #page-title {
- color: #fff;
- font-size: 16px;
- margin-top: 72px;
- padding: 35px 0 45px;
- background-image: url(<?php echo $url; ?>/Structure/images/Steam.jpg);
- }
- </style>
- <body style="margin-top: -4%;">
- <div id="page-title" class="image-bg">
- <div class="container text-center">
- <div class="title-content">
- <?PHP if($etape == "") { ?>
- <h1>Etape 0/3</h1>
- <?PHP } elseif($etape == "1") { ?>
- <h1>Etape 1/3</h1>
- <?PHP } else { ?>
- <h1>Etape 3/3</h1>
- <?PHP } ?>
- <?php
- if($do == "check") {
- $email = Secu($_POST['bean_email']);
- $email_check = preg_match("/^[a-z0-9_\.-]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i", $email);
- $commande_id = Secu($_POST['bean_commande_id']);
- $id_boutique = Secu($_POST['id_boutique']);
- $offre = Secu($_POST['bean_offre']);
- if(strlen($email) < 6) {
- $message['email'] = "<div class='erreur'>Ton adresse e-mail est invalide.</div>";
- $failure = true;
- } elseif(strlen($email) < 1) {
- $message['email'] = "<div class='erreur'>Merci d'entrer une adresse e-mail</div>";
- $failure = true;
- } elseif($email_check !== 1) {
- $message['email'] = "<div class='erreur'>Ton adresse e-mail est invalide.</div>";
- $failure = true;
- }
- else {
- $_SESSION['email'] = $email;
- $_SESSION['offre'] = $offre;
- $_SESSION['commande_id'] = $commande_id;
- $_SESSION['id_boutique'] = $id_boutique;
- $_SESSION['page'] = 1;
- Redirect("".$url."/commande-1?page=".$_SESSION['page']."&etape=1&id_boutique=".$_SESSION['id_boutique']."");
- exit();
- }
- }
- ?>
- </div>
- </div>
- </div>
- <div id="workstation" class="padding">
- <div class="container">
- <div class="row text-center section-title">
- </div>
- <div class="row">
- <div id="sidebar" class="col-md-4">
- <div class="widget-area">
- <div class="widget widget_search">
- </div>
- <div class="widget">
- <h3 class="widget_title">Information commande</h3>
- <div class="latest-posts">
- <div class="media">
- <div class="media-body">
- <h4 class="entry-title"><a href="#">L'offre qui a été choisis:</a></h4>
- <span><i style="color:#39b54a;" class="fa fa-shopping-cart"></i> Offre actuel: <a href="#"><?PHP if(!empty($_SESSION['offre'])) { echo $_SESSION['offre']; } else { echo "".$offre.""; } ?></a></span>
- </div>
- </div>
- <div class="media">
- <div class="media-body">
- <h4 class="entry-title"><a href="#">ID de la commande actuel:</a></h4>
- <span><i style="color:#39b54a;" class="fa fa-ticket"></i> Commande numéro: <a href="#"><?PHP if(!empty($_SESSION['commande_id'])) { echo utf8_decode($_SESSION['commande_id']); } else { echo "".$commande_id.""; } ?></a></span>
- </div>
- </div>
- <bR>
- <div class="media">
- </div>
- </div>
- </div>
- </div>
- </div> <!--/Sidebar-->
- <?PHP if($etape == 0) { if($_SESSION['etape'] == 1) { Redirect("".$url."/commande?etape=1"); } ?>
- <div id="content" class="site-content col-md-8">
- <div class="post">
- <br>
- <div class="entry-summary">
- <?PHP if(isset($message)) { ?>
- <div class="alert alert-danger">
- <?PHP if(isset($message['email'])) { echo "".$message['email'].""; } ?>
- <?PHP if(isset($message['offre'])) { echo "".$message['offre']." ".Redirect("".$url."").""; } ?>
- <?PHP if(isset($message['commande_id'])) { echo "".$message['commande_id']." ".Redirect("".$url."").""; } ?>
- </div>
- <?PHP } ?>
- <div class="alert alert-info">
- Les <strong>clés Steam</strong> seront envoyées par email. Celle-ci doit donc être <strong>correcte</strong> !
- </div>
- <form method="post" action="?page=1&do=check" action="#">
- <div class="form-group">
- <label for="form-login-username">Indiquer votre e-mail</label>
- <input type="text" name="bean_email" maxLength="100" placeholder="exemple@exemple.com" class="form-control">
- <input type="hidden" name="bean_commande_id" maxLength="10" value="<?php echo $commande_id; ?>" hidden="hidden" readonly="readonly" class="form-control">
- <input type="hidden" name="bean_offre" maxLength="20" value="<?php echo $offre; ?>" hidden="hidden" readonly="readonly" class="form-control">
- <input type="hidden" name="id_boutique" maxLength="1" value="<?php echo $id_boutique; ?>" hidden="hidden" readonly="readonly" class="form-control">
- </div>
- <div class="form-group">
- <button type="submit" name="check" class="btn btn-success btn-animated">Continuer</button>
- </div>
- <hr>
- </form>
- </div>
- </div><!--/post-->
- </div><!--/content-->
- <?PHP } elseif($etape == 1) { ?>
- <div id="content" class="site-content col-md-8">
- <div class="post">
- <br>
- <div class="entry-summary">
- <?PHP if(isset($message)) { ?>
- <div class="alert alert-danger">
- <?PHP if(isset($message['email'])) { echo "".$message['email'].""; } ?>
- <?PHP if(isset($message['offre'])) { echo "".$message['offre']." ".Redirect("".$url."").""; } ?>
- <?PHP if(isset($message['commande_id'])) { echo "".$message['commande_id']." ".Redirect("".$url."").""; } ?>
- </div>
- <?PHP } ?>
- <div class="alert alert-info">
- <strong><i class="fa fa-info-circle"></i> Note </strong> ton code sur un bloc-note avant de le valider (si vous appelez, hésitez pas à ré-écouter).
- </div>
- <div class="alert alert-warning">
- <strong><i class="fa fa-exclamation-triangle"></i> Attention: </strong><?php echo $sitename; ?> ne pourra pas être responsable de vos erreurs de code. »
- </div>
- <?php
- $select_from = $bdd->prepare("SELECT * FROM cms_boutique WHERE id = :id");
- $select_from->execute(array(':id' => $_SESSION['id_boutique']));
- $boutique_offre = $select_from -> fetch();
- {
- $limit = "3";
- $select_from = $bdd->prepare("SELECT * FROM cms_cle_steam WHERE offre_id = :offre_id LIMIT $limit");
- $select_from->execute(array(':offre_id' => $_SESSION['id_boutique']));
- while($cle_check = $bdd->fetch())
- {
- $code = isset($_POST['code']) ? preg_replace('/[^a-zA-Z0-9]+/', '', $_POST['code']) : '';
- if( empty($code) ) {
- echo '';
- }
- else {
- $dedipass = file_get_contents('http://api.dedipass.com/v1/pay/?public_key='.$boutique_offre['key_dedipass'].'&private_key='.$boutique_offre['private_key'].'&code=' . $code);
- $dedipass = json_decode($dedipass);
- if($dedipass->status == 'success') {
- // Le transaction est validée et payée.
- $to = "".$mail_sauvegarde.", ".$_SESSION["email"]."";
- $subject = "Livraison commande ".$sitename."";
- $message = "
- <style type=\"text/css\">
- img {
- max-width: 100%;
- }
- body {
- -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em;
- }
- body {
- background-color: #f6f6f6;
- }
- @media only screen and (max-width: 640px) {
- body {
- padding: 0 !important;
- }
- h1 {
- font-weight: 800 !important; margin: 20px 0 5px !important;
- }
- h2 {
- font-weight: 800 !important; margin: 20px 0 5px !important;
- }
- h3 {
- font-weight: 800 !important; margin: 20px 0 5px !important;
- }
- h4 {
- font-weight: 800 !important; margin: 20px 0 5px !important;
- }
- h1 {
- font-size: 22px !important;
- }
- h2 {
- font-size: 18px !important;
- }
- h3 {
- font-size: 16px !important;
- }
- .container {
- padding: 0 !important; width: 100% !important;
- }
- .content {
- padding: 0 !important;
- }
- .content-wrap {
- padding: 10px !important;
- }
- .invoice {
- width: 100% !important;
- }
- }
- </style>
- </head>
- <body itemscope itemtype=\"http://schema.org/EmailMessage\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em; background-color: #f6f6f6; margin: 0;\" bgcolor=\"#f6f6f6\">
- <table class=\"body-wrap\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; background-color: #f6f6f6; margin: 0;\" bgcolor=\"#f6f6f6\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;\" valign=\"top\"></td>
- <td class=\"container\" width=\"600\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto;\" valign=\"top\">
- <div class=\"content\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;\">
- <table class=\"main\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;\" bgcolor=\"#fff\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"alert alert-warning\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 16px; vertical-align: top; color: #fff; font-weight: 500; text-align: center; border-radius: 3px 3px 0 0; background-color: #2f353f; margin: 0; padding: 20px;\" align=\"center\" bgcolor=\"#2f353f\" valign=\"top\">
- Commande ".$sitename." numéro: <b>".$_SESSION["commande_id"]."</b>
- </td>
- </tr><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"content-wrap\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 20px;\" valign=\"top\">
- <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"content-block\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;\" valign=\"top\">
- Nous t'en remercions de ton achat sur <strong style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\">".$sitename."</strong> . !
- </td>
- </tr><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"content-block\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;\" valign=\"top\">
- Ci dessous, les information d'achat.
- </td>
- </tr><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"content-block\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;\" valign=\"top\">
- <a href=\"#\" class=\"btn-primary\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: #3bafda; margin: 0; border-color: #3bafda; border-style: solid; border-width: 10px 20px;\">Ta Clé: <b>".$cle_check['cle']."</b></a>
- </td>
- </tr><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"content-block\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;\" valign=\"top\">
- <div>Ton Pack: <b>".$_SESSION["offre"]."</b></div>
- <div> </div>
- <div>Information DEDIPASS:</div>
- <div> </div>
- <div>Code utilisé: <b>".$code."</b></div>
- </td>
- </tr></table></td>
- </tr></table><div class=\"footer\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; clear: both; color: #999; margin: 0; padding: 20px;\">
- <table width=\"100%\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"aligncenter content-block\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; vertical-align: top; color: #999; text-align: center; margin: 0; padding: 0 0 20px;\" align=\"center\" valign=\"top\">Copyright 2017, <a href=\"#\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #999; text-decoration: underline; margin: 0;\">".$sitename."</a> Tous droit réversé.</td>
- </tr></table></div></div>
- </td>
- <td style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;\" valign=\"top\"></td>
- </tr></table></body>
- </html>
- ";
- // Always set content-type when sending HTML email
- $headers = "MIME-Version: 1.0" . "\r\n";
- $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
- // More headers
- $headers .= 'From: <'.$mail_newsletter.'>' . "\r\n";
- $headers .= 'Cc: '.$_SESSION["email"].'' . "\r\n";
- mail($to,$subject,$message,$headers);
- $to2 = "".$mail_sauvegarde.", ".$_SESSION["email"]."";
- $subject2 = "Livraison commande ".$sitename."";
- $message2 = "
- <style type=\"text/css\">
- img {
- max-width: 100%;
- }
- body {
- -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em;
- }
- body {
- background-color: #f6f6f6;
- }
- @media only screen and (max-width: 640px) {
- body {
- padding: 0 !important;
- }
- h1 {
- font-weight: 800 !important; margin: 20px 0 5px !important;
- }
- h2 {
- font-weight: 800 !important; margin: 20px 0 5px !important;
- }
- h3 {
- font-weight: 800 !important; margin: 20px 0 5px !important;
- }
- h4 {
- font-weight: 800 !important; margin: 20px 0 5px !important;
- }
- h1 {
- font-size: 22px !important;
- }
- h2 {
- font-size: 18px !important;
- }
- h3 {
- font-size: 16px !important;
- }
- .container {
- padding: 0 !important; width: 100% !important;
- }
- .content {
- padding: 0 !important;
- }
- .content-wrap {
- padding: 10px !important;
- }
- .invoice {
- width: 100% !important;
- }
- }
- </style>
- </head>
- <body itemscope itemtype=\"http://schema.org/EmailMessage\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em; background-color: #f6f6f6; margin: 0;\" bgcolor=\"#f6f6f6\">
- <table class=\"body-wrap\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; background-color: #f6f6f6; margin: 0;\" bgcolor=\"#f6f6f6\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;\" valign=\"top\"></td>
- <td class=\"container\" width=\"600\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; display: block !important; max-width: 600px !important; clear: both !important; margin: 0 auto;\" valign=\"top\">
- <div class=\"content\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; max-width: 600px; display: block; margin: 0 auto; padding: 20px;\">
- <table class=\"main\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; border-radius: 3px; background-color: #fff; margin: 0; border: 1px solid #e9e9e9;\" bgcolor=\"#fff\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"content-wrap aligncenter\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; text-align: center; margin: 0; padding: 20px;\" align=\"center\" valign=\"top\">
- <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"content-block\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;\" valign=\"top\">
- <h2 class=\"aligncenter\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; box-sizing: border-box; font-size: 24px; color: #000; line-height: 1.2em; font-weight: 400; text-align: center; margin: 40px 0 0;\" align=\"center\">Facture d'achat ".$sitename."</h2>
- </td>
- </tr><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"content-block aligncenter\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; text-align: center; margin: 0; padding: 0 0 20px;\" align=\"center\" valign=\"top\">
- <table class=\"invoice\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; text-align: left; width: 80%; margin: 40px auto;\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;\" valign=\"top\">".$sitename."<br style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\" />Commande #".$_SESSION["commande_id"]."<br style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\" />".FullDate('full')."</td>
- </tr><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 5px 0;\" valign=\"top\">
- <table class=\"invoice-items\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; margin: 0;\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;\" valign=\"top\">Prix dedipass</td>
- <td class=\"alignright\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; text-align: right; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;\" align=\"right\" valign=\"top\">".$boutique_offre['prix']."€</td>
- </tr><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;\" valign=\"top\">TVA</td>
- <td class=\"alignright\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; text-align: right; border-top-width: 1px; border-top-color: #eee; border-top-style: solid; margin: 0; padding: 5px 0;\" align=\"right\" valign=\"top\"> 0.50€</td>
- </tr>
- </tr><tr class=\"total\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"alignright\" width=\"80%\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; text-align: right; border-top-width: 2px; border-top-color: #333; border-top-style: solid; border-bottom-color: #333; border-bottom-width: 2px; border-bottom-style: solid; font-weight: 700; margin: 0; padding: 5px 0;\" align=\"right\" valign=\"top\">Total</td>
- <td class=\"alignright\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; text-align: right; border-top-width: 2px; border-top-color: #333; border-top-style: solid; border-bottom-color: #333; border-bottom-width: 2px; border-bottom-style: solid; font-weight: 700; margin: 0; padding: 5px 0;\" align=\"right\" valign=\"top\">2,49€</td>
- </tr></table></td>
- </tr></table></td>
- </tr></td>
- </tr></table></td>
- </tr></table><div class=\"footer\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; width: 100%; clear: both; color: #999; margin: 0; padding: 20px;\">
- <table width=\"100%\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><tr style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;\"><td class=\"aligncenter content-block\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; vertical-align: top; color: #999; text-align: center; margin: 0; padding: 0 0 20px;\" align=\"center\" valign=\"top\">Copyright 2017, <a href=\"mailto:\" style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 12px; color: #999; text-decoration: underline; margin: 0;\"><b>".$sitename."</b></a> tous droit réservée</td>
- </tr></table></div></div>
- </td>
- <td style=\"font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0;\" valign=\"top\"></td>
- </tr></table></body>
- </html>
- ";
- // Always set content-type when sending HTML email
- $headers2 = "MIME-Version: 1.0" . "\r\n";
- $headers2 .= "Content-type:text/html;charset=UTF-8" . "\r\n";
- // More headers
- $headers2 .= 'From: <'.$mail_newsletter.'>' . "\r\n";
- $headers2.= 'Cc: '.$_SESSION["email"].'' . "\r\n";
- mail($to2,$subject2,$message2,$headers2);
- if(isset($_SESSION['refer'])){
- $select_from1 = $bdd->prepare("SELECT * FROM referuser WHERE ip = :ip");
- $select_from1->execute(array(':ip' => SHA1($_SERVER['REMOTE_ADDR'])));
- $calcul_ip = $select_from1 -> rowCount();
- if ($calcul_ip != 1)
- {
- $select_from2 = $bdd->prepare("SELECT * FROM refers WHERE user = :user LIMIT 0,3");
- $select_from2->execute(array(':user' => $_SESSION['refer']));
- $calcul_utilisateur = $select_from2 -> rowCount();
- if ($calcul_utilisateur != 1)
- {
- $insert_into = $bdd->prepare('INSERT INTO refers (user, referals) VALUES(:user, :referals)');
- $insert_into->bindValue(':user', $_SESSION['refer']);
- $insert_into->bindValue(':referals', 1);
- $insert_into->execute();
- } else {
- $update_into = $bdd->prepare('UPDATE refers SET `referals`=`referals`+1 WHERE (user) VALUES (:user)');
- $update_into->bindValue(':user', $_SESSION['refer']);
- $update_into->execute();
- }
- $insert_into = $bdd->prepare('INSERT INTO referuser (referrer, referred, ip) VALUES (:referrer, :referred, :ip)');
- $insert_into->bindValue(':referrer', $_SESSION['refer']);
- $insert_into->bindValue(':referred', $_SESSION['email']);
- $insert_into->bindValue(':ip', SHA1($_SERVER['REMOTE_ADDR']));
- $insert_into->execute();
- $insert_into1 = $bdd->prepare('INSERT INTO cms_commande (id_commande, offre, ip_utilisateur, code_dedipass, email, date, cle_livrer) VALUES (:id_commande, :offre, :ip_utilisateur, :code_dedipass, :email, :date, :cle_livrer)');
- $insert_into1->bindValue(':id_commande', $_SESSION["commande_id"]);
- $insert_into1->bindValue(':offre', $_SESSION["offre"]);
- $insert_into1->bindValue(':ip_utilisateur', $_SERVER["REMOTE_ADDR"]);
- $insert_into1->bindValue(':code_dedipass', $code);
- $insert_into1->bindValue(':email', $_SESSION["email"]);
- $insert_into1->bindValue(':date', FullDate('full'));
- $insert_into1->bindValue(':cle_livrer', $cle_check['cle']);
- $insert_into1->execute();
- $insert_into2 = $bdd->prepare('INSERT INTO cms_satisfait (user_ip,email) VALUES (:user_ip, :email)');
- $insert_into2->bindValue(':user_ip', $_SERVER["REMOTE_ADDR"]);
- $insert_into2->bindValue(':email', $_SESSION["email"]);
- $insert_into2->execute();
- $update_into = 'UPDATE users SET solde = solde + 1 WHERE ( username = :username )';
- $actualise = $bdd->prepare( $update_into );
- $actualise->execute(array(':username' => $_SESSION['refer']));
- $update_into = 'UPDATE cms_cle_stock SET nombremax = nombremax - 3 WHERE ( id = :id )';
- $actualise = $bdd->prepare( $update_into );
- $actualise->execute(array(':id' => $_SESSION['id_boutique']));
- $delete_from = $bdd->exec("DELETE FROM cms_cle_steam WHERE cle = '".$cle_check['cle']."' ");
- Redirect("".$url."/livraison?livraison=ok&email=".$_SESSION['email']."");
- exit();
- }
- session_unset($_SESSION['refer']);
- }
- $insert_into1 = $bdd->prepare('INSERT INTO cms_commande (id_commande, offre, ip_utilisateur, code_dedipass, email, date, cle_livrer) VALUES (:id_commande, :offre, :ip_utilisateur, :code_dedipass, :email, :date, :cle_livrer)');
- $insert_into1->bindValue(':id_commande', $_SESSION["commande_id"], PDO::PARAM_INT);
- $insert_into1->bindValue(':offre', $_SESSION["offre"]);
- $insert_into1->bindValue(':ip_utilisateur', $_SERVER["REMOTE_ADDR"]);
- $insert_into1->bindValue(':code_dedipass', $code);
- $insert_into1->bindValue(':email', $_SESSION["email"]);
- $insert_into1->bindValue(':date', FullDate('full'));
- $insert_into1->bindValue(':cle_livrer', $cle_check['cle']);
- $insert_into1->execute();
- $insert_into2 = $bdd->prepare('INSERT INTO cms_satisfait (user_ip,email) VALUES (:user_ip, :email)');
- $insert_into2->bindValue(':user_ip', $_SERVER["REMOTE_ADDR"]);
- $insert_into2->bindValue(':email', $_SESSION["email"]);
- $insert_into2->execute();
- $update_into = 'UPDATE cms_cle_stock SET nombremax = nombremax - 3 WHERE ( id = :id )';
- $actualise = $bdd->prepare( $update_into );
- $actualise->execute(array(':id' => $_SESSION['id_boutique']));
- $delete_from = $bdd->exec("DELETE FROM cms_cle_steam WHERE cle = '".$cle_check['cle']."'");
- Redirect("".$url."/livraison?livraison=ok&email=".$_SESSION['email']."");
- session_destroy();
- } else {
- // Le code est invalide
- echo 'Le code '.$code.' est invalide';
- }
- }
- } }
- ?>
- <script src="//api.dedipass.com/v1/pay.js"></script>
- <?php
- $select_from = $bdd->prepare("SELECT * FROM cms_boutique WHERE id = :id LIMIT 0,1");
- $select_from->execute(array(':id' => $_SESSION['id_boutique']));
- $script_achat = $select_from -> fetch(); {
- ?>
- <div data-dedipass="<?php echo $script_achat['key_dedipass']; ?>" data-dedipass-custom=""></div>
- <?php } ?>
- </div>
- </div><!--/post-->
- <div class="form-group">
- <a href="<?php echo $url; ?>/commande-1?etape=back" class="btn btn-danger btn-animated">Annulée ma commande</a>
- </div>
- </div><!--/content-->
- <?PHP } elseif($etape == "bac") { session_destroy(); Redirect("".$url.""); } ?>
- <?php
- if($etape == "back") {
- session_destroy(); Redirect("".$url."");
- }
- ?>
- </div>
- </div>
- </div>
- <div id="promotion" class="padding">
- <div class="container text-center">
- <div class="container">
- <div class="row">
- <div class="text-center section-title">
- <h2 style="background-color: white;color: #39b54a;width: 30.5%;left: 0;right: 0;margin-left: 35%;border-radius: 5px;"> PARTENAIRES</h2>
- </div>
- </div>
- <div class="clients text-center">
- <ul class="list-inline">
- <li><a href="#"><img style="background-color: white;color: #39b54a;border-radius: 5px;" class="img-responsive" src="<?php echo $url; ?>/Structure/images/client1.png" alt=""></a></li>
- <li><a href="#"><img style="background-color: white;color: #39b54a;border-radius: 5px;" class="img-responsive" src="<?php echo $url; ?>/Structure/images/client2.png" alt=""></a></li>
- <li><a href="#"><img style="background-color: white;color: #39b54a;border-radius: 5px;" class="img-responsive" src="<?php echo $url; ?>/Structure/images/client3.png" alt=""></a></li>
- <li><a href="#"><img style="background-color: white;color: #39b54a;border-radius: 5px;" class="img-responsive" src="<?php echo $url; ?>/Structure/images/client4.png" alt=""></a></li>
- </ul>
- </div>
- </div>
- </div>
- </div><!--/Promotion-->
- <script type="text/javascript">
- L10N.put("identity.register.overlay.loading.text", 'Chargement...');
- document.observe("dom:loaded", function() {
- QuickRegister.initAgeGate(true);
- });
- </script>
- <script type="text/javascript">
- document.observe("dom:loaded", function() {
- Event.observe($("back-link"), "click", function() {
- Overlay.show(null,'Chargement...');
- });
- Event.observe($("proceed-button"), "click", function() {
- Overlay.show(null,'Chargement...');
- $("quickregister-form").submit();
- });
- $("email-address").focus();
- });
- </script>
- <?php
- require('../php/footer.php');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement