This repository has been archived by the owner on Oct 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrar.php
83 lines (71 loc) · 1.91 KB
/
entrar.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<?php require "includes/config.inc.php"; ?>
<html>
<head>
<?php require "includes/head.inc.php"; ?>
</head>
<body>
<!-- header -->
<?php include "includes/header.inc.php"; ?>
<section id="about">
<div class="row about-intro">
<h1>Login</h1>
<?php
if (isset($_GET['sucesso'])) {
switch ($_GET['sucesso']) {
case 'cadastro':
alerta(
'success',
'<p>Inscrição feita com sucesso</p>
<p>Agora você pode entrar na sua conta</p>'
);
break;
default:
break;
}
}
if (isset($_GET['erro'])) {
switch ($_GET['erro']) {
case 'campovazio':
alerta('error', '<p>Nenhum campo pode estar vazio!</p>');
break;
case 'usuarioinexistente':
alerta('error', '<p>Usuário inexistente!</p>');
alerta('info', '<p>Se você não está inscrito se cadastre nesse link <a href="cadastro.php">nesse link</a>.</p>');
break;
case 'senhaincorreta':
alerta('error', '<p>A senha inserida está incorreta!</p>');
break;
case 'conexaosql':
alerta(
'error',
'<p>Ocorreu um erro na conexão com o banco de dados!</p>
<p>Por favor tente novamente.</p>'
);
break;
default:
alerta(
'error',
'<p>Ocorreu algum erro inesperado!</p>
<p>Por favor tente novamente.</p>'
);
break;
}
}
?>
<form action="includes/entrar.inc.php" method="post">
<input type="text" name="username" id="" placeholder="Email ou Nome de Usuario">
<input type="password" name="senha" id="" placeholder="Senha">
<button type="submit" name="envia-entrada" class="button button-primary">Entrar</button>
</form>
</div>
</section>
<!-- footer -->
<?php include "includes/footer.inc.php"; ?>
<div id="preloader">
<div id="loader"></div>
</div>
<!-- Java Script -->
<?php include "includes/javascript.inc.php"; ?>
</body>
</html>