-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
30 lines (30 loc) · 1.19 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
require_once "logica-usuario.php";
require_once "cabecalho.php"; ?>
<?php
if (isUsuarioLogado()) : ?>
<h1>Olá, <?=getUsuarioLogado()->getNome(); ?>!</h1>
<p class="text-success">Você está logado(a) como <?=getUsuarioLogado()->getEmail(); ?> <a href="logout.php">Sair</a></p>
<?php
else : ?>
<h1>Bem vindo!</h1>
<h2>Login</h2>
<form action="login.php" method="post">
<table class="table">
<tr>
<td><label for="email" >E-mail</label></td>
<td><input id="email" type="email" name="email" placeholder="Digite seu e-mail" class="form-control"/></td>
</tr>
<tr>
<td><label for="senha">Senha</label></td>
<td><input id="senha" type="password" name="senha" placeholder="Digite sua senha" class="form-control"/></td>
</tr>
<tr>
<td></td>
<td><button class="btn btn-primary">Login</button></td>
</tr>
</table>
</form>
<?php
endif;
require_once("rodape.php"); ?>