<?php
session_start();
if((!isset ($_SESSION['login']) == true) and (!isset ($_SESSION['password']) == true))
{
  unset($_SESSION['login']);
  unset($_SESSION['senha']);
  header('location:/controle/?error=1');
  }

$email = $_SESSION['login'];
  
date_default_timezone_set('America/Sao_Paulo');
$error = $_GET['error'];

include('/home/devworks/public_html/auanews/config/auanews.config.php');

$sql = $conecta->query("SELECT nome_site FROM config_site WHERE id = '1'");
while ($consulta = $sql->fetch_assoc())
{$nome_site = $consulta['nome_site'];}

$sql1 = $conecta->query("SELECT id, nome FROM usuarios WHERE email = '$email'");
while ($consulta1 = $sql1->fetch_assoc())
{$id_user = utf8_encode($consulta1['id']);
 $nome_user = $consulta1['nome'];}

$menu = 1;

?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    <title><?php echo $nome_site; ?> - Painel de Controle</title>
	<link rel="icon" type="image/x-icon" href="https://www.noharbar.com.br/site/visuais/assets/images/favicon.ico" />
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="fonts/ionicons.min.css">
    <link rel="stylesheet" href="css/Login-Form-Dark.css">
    <link rel="stylesheet" href="css/styles.css">
	<link href="../images/favicon-blue.png" rel="shortcut icon" type="image/vnd.microsoft.icon" />
	<link rel="preconnect" href="https://fonts.googleapis.com">
	<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
	<link href="https://fonts.googleapis.com/css2?family=Ubuntu&display=swap" rel="stylesheet">
	<script src="//cdn.jsdelivr.net/npm/medium-editor@latest/dist/js/medium-editor.min.js"></script>
	<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/medium-editor@latest/dist/css/medium-editor.min.css" type="text/css" media="screen" charset="utf-8">
	
	<style>
	body {
		font-family: 'Ubuntu', sans-serif;
	}
	
	.espacoInicial {
		height: 70px;
		-webkit-box-shadow: 0px 6px 5px 0px rgba(0,0,0,0.75);
		-moz-box-shadow: 0px 6px 5px 0px rgba(0,0,0,0.75);
		box-shadow: 0px 6px 5px 0px rgba(0,0,0,0.75);
	}
	
	.bgMenu {
		    position: relative;
			background-color: #64635d;
			border-radius: 4px;
			color: #fff;
			padding: 10px 60px;
			margin: 20px 0px;
	}
	
	.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
		color: #64635d;
		background-color: #ffffff;
	}
	
	.boxInformation {
		width: 80%;
		border: 1px solid #ccc;
		border-radius: 8px;
		padding: 12px 42px;
	}
	
	#fileInput1 {
		display: none;
	}
	
	</style>
	
</head>

<body>
    <div class="espacoInicial login-dark">
		
    </div>
	<?php
	include("menu.php");
	?>
	
	<div class="container">
        <div class="row">
			<div class="col-md-12">
			 &nbsp;
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<h5 class="text-center">Clique abaixo para iniciar:</h5>
			</div>
			<div class="col-md-12">
			 &nbsp;
			</div>
		</div>
			
	</div>
	
	<!-- Modal Inserção de Curso -->
	<div class="modal fade" id="inscurso" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
	  <div class="modal-dialog" role="document">
		<div class="modal-content">
		  <div class="modal-header">
			<h5 class="modal-title" id="exampleModalLabel">Inserir Curso</h5>
			<button type="button" class="close" data-dismiss="modal" aria-label="Fechar">
			  <span aria-hidden="true">&times;</span>
			</button>
		  </div>
		  <div class="modal-body">
			<form action="alt_curso.php" method="POST">
				<div class="form-group">
					<label>Data do Curso</label>
					<input type="date" class="form-control" name="data">
					<input type="hidden" value="0" name="step">
				</div>
		  </div>
		  <div class="modal-footer">
			<button type="button" class="btn btn-secondary" data-dismiss="modal">Fechar</button>
			<button type="submit" class="btn btn-success"><i class="far fa-save"></i> Salvar Curso</button>
			</form>
		  </div>
		</div>
	  </div>
	</div>
	
    <script>
		var editor = new MediumEditor('.editable');
	</script>
	<script src="https://kit.fontawesome.com/4e2ec11868.js"></script>
	<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>

</html>