-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.php
59 lines (51 loc) · 1.68 KB
/
admin.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
<?php
session_start();
if(!isset($_SESSION['user']))
{
include("classe/class.php");
$user = new user();
if (isset($_POST['connexion']))
{
$user->connect($_POST['login'], $_POST['mdp']);
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="css/style-nav.css">
<title>Connexion Admin</title>
</head>
<body>
<header></header>
<section class="container navbar-light" id="mh-form-co" style="background-color: #82b2e2;">
<h2 class="text-center" style="color: white;">Connexion</h2>
<form class="" method='POST'>
<div class="col my-4">
<input class="form-control" type='text' placeholder="Login" name='login' required>
</div></br>
<div class="col my-4">
<input class="form-control" type='password' placeholder="Mot de passe" name='mdp' required>
</div></br>
<div id="mh-bo-co">
<button class="btn btn-success" type='submit' name='connexion'>Connexion</button>
</div>
<?php
if(isset($_GET['erreur']))
{
$err = $_GET['erreur'];
if($err==1 || $err==2)
echo "<p class='erreur'><b>*Utilisateur ou mot de passe incorrect*</b></p>";
}
?>
</form>
</section>
</body>
</html>
<?php
}
else
{
echo "déja connecter";
}
?>