-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
83 lines (70 loc) · 2.52 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
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
<!--
/************************************/
/* ______ ___ _ _ __ _ */
/* | _ \ \ / / | | | |/ / / \ */
/* | |_) \ V /| | | | ' / / _ \ */
/* | _ < | | | |_| | . \ / ___ \ */
/* |_| \_\|_| \___/|_|\_\/_/ \_\ */
/* */
/************************************/
-->
<?php
session_start();
if ((isset($_SESSION['userName'])) && ($_SESSION['userName'] != '')) :
header('location: pages/home.php');
else :
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="assets/css/style.css">
<title>Login && SignUp - Site éducation</title>
</head>
<body class="login">
<div class="page">
<!--!En-tête de page-->
<div class="head">
<div class="header">
<?php include './header.php'; ?>
</div>
</div>
<!--!Contenu du page-->
<div class="body ">
<div class="content loginPages">
<fieldset>
<legend> Login pages </legend>
<?php
if (isset($_SESSION['loginError']) && ($_SESSION['loginError'] == 1)) {
echo
'
<p style="text-align:center; color:red> ERROR LOGIN </p>
';
}
?>
<div class="container" id="menu_1">
<form action="assets/login.php" method="post">
<label for="userName"> Username </label>
<input type="text" name="userName" id="userName">
<label for="password"> Password</label>
<input type="password" name="password" id="password">
<div class="formButton">
<input type="submit" value=" Login">
</div>
</form>
</div>
</fieldset>
</div>
</div>
<!--!Pied de page-->
<div class="footer">
<?php include 'footer.php'; ?>
</div>
</div>
</body>
</html>
<?php
endif;
?>