예제 #1
0
function verificaUsuario()
{
    if (!usuarioEstaLogado()) {
        header("Location:inicio.php?falhaDeSegurança=true");
        die;
    }
}
예제 #2
0
function verificaUsuario()
{
    if (!usuarioEstaLogado()) {
        header("Location: index.php?acessoNegado=true");
        die;
    }
}
function verificaUsuario()
{
    if (!usuarioEstaLogado()) {
        $_SESSION["danger"] = "Você não têm acesso a esta funcionalidade";
        header("Location: index.php");
        die;
    }
}
예제 #4
0
function verificaUsuario()
{
    if (!usuarioEstaLogado()) {
        $_SESSION['danger'] = "Você não tem acesso a essa funcionalidade.";
        header('Location: index.php');
        die;
    }
}
예제 #5
0
<?php

include 'cabecalho.php';
include 'logica-usuario.php';
?>
				<h1>BEM VINDOS!</h1>
				<h2>login</h2>

				<?php 
if (usuarioEstaLogado()) {
    ?>
					<p class="alert-success">Voce está logado como <?php 
    echo usuarioLogado();
    ?>
.</p>
					<a href="logout.php" class="btn btn-primary">Logout</a>
				<?php 
} else {
    ?>
				<form action="login.php" method="post">
					<table class="table">
						<tr>
							<td>Email <input class="form-control" type="email" name="email"/></td>
						</tr>

						<tr>
							<td>Senha <input class="form-control" type="password" name="senha"/></td>
						</tr>

						<tr>
							<td><button class="btn btn-primary">Login</button></td>
예제 #6
0
function verificaUsuario()
{
    if (!usuarioEstaLogado()) {
        header("Location: index.php?falhaDeSeguranca=true");
    }
}