-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
54 lines (34 loc) · 1.12 KB
/
login.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
<?php
session_start();
require_once "connections/connection.php";
if (isset($_COOKIE['email']) && isset($_COOKIE['id']) && isset($_COOKIE['role'])) {
header("location: index.php");
}
?>
<!doctype html>
<html lang="zxx">
<head>
<?php include_once "helpers/help_meta.php" ?>
<title>Aplans</title>
<?php include_once "helpers/help_css.php" ?>
</head>
<body>
<!-- Login e Registo -->
<?php
//SE NAO ESTIVERMOS LOGADOS MOSTRA OS CAMPOS PARA PREENCHER, SE NAO, AVISA QUE JÁ ESTAMOS LOGADOS
if (!isset($_SESSION['email_iloading'])) {
include_once "components/cp_login.php";
} else {
echo '<div class="alert alert-danger col-12 text-center h2 alert-dismissible fade show" role="alert">
Já se encontra logado
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>';
}
?>
</div>
<!-- JS Files -->
<?php include_once "helpers/help_js.php" ?>
</body>
</html>