Skip to content

Instantly share code, notes, and snippets.

@edvaldoszy
Created January 28, 2016 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edvaldoszy/9687612de7d8e4b8ad91 to your computer and use it in GitHub Desktop.
Save edvaldoszy/9687612de7d8e4b8ad91 to your computer and use it in GitHub Desktop.
<?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