<?php
	//Inicializado primeira a sessão para posteriormente recuperar valores das variáveis globais. 
    session_start();
?>
<!DOCTYPE html>
<html lang="pt-br">
    <head>
        <meta charset="utf-8">
        <meta name="author" content="">
        <title>Central de Atendimento</title>
		<link href="css/plugins/pace/pace.css" rel="stylesheet">
		<link href="css/application.min.css" rel="stylesheet">
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link href="css/fonts/font-awesome/css/font-awesome.min.css" rel="stylesheet">
		<link href="css/style.css" rel="stylesheet">
    </head>
	<body>
		<div class="single-widget-container">
			<section class="widget login-widget">
				<header class="text-align-center">
					<img src="img/adapter_bco.svg" style="max-width:250px; max-height:120px; width: auto; height: auto;">
				</header>
				<div class="body">
					<!--<form id="form" role="form" method="post" onsubmit="return confirmaLogin()">-->
					<form class="no-margin" action="config/valida.php" method="post">
						<fieldset>
							<div class="form-group">
								<label for="usuario">Usuário</label>
								<div class="input-group">
									<span class="input-group-addon">
										<i class="fa fa-user"></i>
									</span>
									<input id="usuario" name="usuario" type="text" class="form-control input-lg input-transparent" placeholder="Nome de Usuário">
								</div>
							</div>
							<div class="form-group">
								<label for="password">Senha</label>
								<div class="input-group input-group-lg">
									<span class="input-group-addon">
										<i class="fa fa-lock"></i>
									</span>
									<input id="senha" name="senha" type="password" class="form-control input-lg input-transparent" placeholder="Sua Senha">
								</div>
							</div>
						</fieldset>
						<div class="form-actions">
							<button type="submit" class="btn btn-block btn-lg btn-danger">
								<span class="small-circle"><i class="fa fa-caret-right"></i></span>
								<small>Entrar</small>
							</button>
						<!--	<a href="#" class="forgot" data-toggle="modal" data-target="#Recovery" style="text-decoration:none;">Esqueci Minha Senha</a> -->
<br>
						</div>
					</form>
					<p>
						<?php 
						//Recuperando o valor da variável global, os erro de login.
						if(isset($_SESSION['loginErro'])){
							echo $_SESSION['loginErro'];
							unset($_SESSION['loginErro']);
						}?>
					</p>
					<p>
						<?php 
						//Recuperando o valor da variável global, deslogado com sucesso.
						if(isset($_SESSION['logindeslogado'])){
							echo $_SESSION['logindeslogado'];
							unset($_SESSION['logindeslogado']);
						}
						?>
					</p>		
				</div>
			</section>
		</div>
		<!-- /#wrapper -->
		<form role="form" action="Funcoes.php?Function=1" method="POST">
			<div class="modal modal-flex fade" id="Recovery" tabindex="-1" role="dialog" aria-labelledby="flexModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
							<h4 class="modal-title" id="flexModalLabel" style="color:white;">Recuperar senha</h4>
						</div>
						<div class="modal-body">
							<div id="basicFormExample" class="panel-collapse collapse in">
								<div class="portlet-body">
									<p>
										<b>
											<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> ATENÇÃO!
										</b> 
										Será enviado im email com informações de como proceder com a recuperação de senha. 
										Preencha os dados abeixo para prosseguir com o processo.
									</p>
									<div class="form-group">
										<label><b>CNPJ:</b></label>
										<input type="text" class="form-control" placeholder="Informe o CNPJ da Empresa Contratada" name="CNPJ" id="CNPJ" required="required" />
									</div>
									<div class="form-group">
										<label><b>E-Mail:</b></label>
										<input type="email" class="form-control" placeholder="Informe o E-Mail cadastrado no usuário" name="RecMail" id="RecMail" required="required" />
									</div>
								</div>
							</div>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
							<button type="submit" onclick="getTextModal();" class="btn btn-green"><i class="fa fa-paper-plane" aria-hidden="true"></i> Enviar Token</button>
						</div>
					</div>
				</div>
			</div>
		</form>
		<script src="js/jquery/jquery-1.8.1.js"></script>
		<script src="js/jquery/jquery.maskedinput.js"></script>
		<script>
			$(function($) {
				$("#CNPJ").mask("99.999.999/9999-99");
			});
		</script>
		<script src="js/jquery/jquery-1.8.1.js"></script>
		<script src="js/bootstrap/bootstrap.min.js"></script>
		<script src="js/validate/Validar.js"></script>
		<script src="js/pace/pace.js"></script>
		<script src='js/funcoes.js'></script>
	</body>
</html>



