Mini Shell

Direktori : /home/emypro/www/admin/
Upload File :
Current File : /home/emypro/www/admin/login.php

<?php include('config.php') ?>
<?php
$flash = array();
// CREATE
if(isset($_POST['action']) && $_POST['action'] == 'login'):
	unset($_POST['action']);

	if(strlen($_POST['email']) > 5 && strlen($_POST['password']) >= 6):
		Auth::login(array('email' => $_POST['email'], 'password' => Helper::hash($_POST['password'])));
	else:
		$flash = Helper::flash('error');
	endif;
endif;

if(isset($_GET['error']) && $_GET['error'] == 'invalid'):
	$flash = Helper::flash('invalid');
endif;
?>
<!DOCTYPE html>
<html lang="pr-br">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Emypro Brasil Administração</title>
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/style.css">
	<link rel="shortcut icon" href="../img/favicon.png">
</head>
<body>
</body>
<div class="container">
	<div class="row">
		<div class="col-lg-4 col-lg-offset-4">
			<form action="" method="post">
				<div class="text-center">
					<br>
					<img src="../img/emypro-brasil.png" alt="">
				</div>
				<h2>Administração</h2>
				<?php if($flash): ?>
				<div class="form-group">
					<div class="alert alert-<?= $flash['class'] ?> alert-dismissible">
						<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<?= $flash['message'] ?>
					</div>
				</div>
				<?php endif ?>
				<div class="form-group">
					<label for="email">E-mail:</label>
					<input type="email" class="form-control" name="email" required>
				</div>
				<div class="form-group">
					<label for="password">Senha:</label>
					<input type="password" class="form-control" name="password" required>
				</div>
				<div class="form-group">
					<input type="hidden" name="action" value="login">
					<button class="btn btn-primary">
						<i class="glyphicon glyphicon-log-in"></i> Acessar
					</button>
				</div>
			</form>
		</div>
	</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
</html>

Zerion Mini Shell 1.0