Created
January 28, 2016 22:05
-
-
Save edvaldoszy/9687612de7d8e4b8ad91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once "src/Sys/Sessao.php"; | |
use Sys\Sessao; | |
$sessao = new Sessao(); | |
if ($sessao->existe('usuario_logado')) { | |
$usuario = $sessao->ler('usuario_logado'); | |
} else { | |
header('location: login.php'); | |
exit; | |
} | |
?><!DOCTYPE html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Login</title> | |
<meta name="viewport" content="width=device-width, user-scalable=no"> | |
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap-responsive.min.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<div style="height: 100px;"></div> | |
<h1>Olá <?= $usuario->nome ?>! Você está logado no sistema.</h1> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment