<?php
include("conexao.php");
include_once("functions.php");
include_once(Idioma(1));
global $_TRA;
$idioma = empty($_COOKIE['idioma']) ? "br" : $_COOKIE['idioma'];

$VerificarInfoSite = VerificarInfoSite();
?>
<!DOCTYPE html>
<html lang="<?php echo $idioma; ?>" class="body-full-height">
    <head>        
        <!-- META SECTION -->
        <title><?php echo $VerificarInfoSite[0]. " - " .$_TRA['Entrar']; ?></title>            
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        
        <link rel="icon" href="favicon.ico" type="image/x-icon" />
        <!-- END META SECTION -->
        
        <!-- CSS INCLUDE -->        
        <link rel="stylesheet" type="text/css" id="theme" href="css/<?php echo $VerificarInfoSite[2]; ?>.css"/>
        <!-- EOF CSS INCLUDE -->                                     
    </head>
    <body>

        <div class="login-container">
        
            <div class="login-box animated fadeInDown">
                <div class="login-logo"><?php echo $VerificarInfoSite[0]; ?></div>
				<div class="login-legenda"><?php echo $VerificarInfoSite[1]; ?></div>
                <div class="login-body">
                    <div class="login-title"><strong><?php echo $_TRA['SBV']; ?></strong>, <?php echo $_TRA['Entrar']; ?></div>
                    <form id="FormLogin" name="FormLogin" class="FormLogin form-horizontal" method="POST" action="javascript:FormLogin()">
                    <div class="form-group">
                        <div class="col-md-12">
                            <input type="password" name="senha" id="senha" class="form-control" placeholder="<?php echo $_TRA['Senha']; ?>"/>
                        </div>
                    </div>
                    <div class="form-group">
                   	    <div id="StatusLogin"></div>
                    	<div class="col-md-12">
                            <button onClick="FazerLoginIPTV()" class="btn btn-info btn-block"><?php echo $_TRA['Entrar']; ?></button>
                        </div>
                    </div>
                    
                    </form>
                </div>
                <div class="login-footer">
                    <div class="pull-left">
                        &copy; 2019 BPlus <?php echo $VerificarInfoSite[0]; ?>
                    </div>
                </div>
            </div>
            
        </div>

<script type="text/javascript" src="js/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript" src="js/plugins.js"></script>  
<script type="text/javascript" src="js/actions.js"></script>

<script>
	
function FazerLoginIPTV(){
 
	    var Data = $(".FormLogin").serialize();
		 
		panel_refresh($(".login-container"));
				
		$.post('validar-pin.php', Data, function(resposta) {
			
				setTimeout(panel_refresh($(".login-container")),500);
			
				$("#StatusGeral").html('');
				$("#StatusGeral").append(resposta);
		});
}
</script>

<div id="StatusGeral"></div>

    </body>
</html>






