Commit a33f9ac26256ae06b2af59082d6b6ade4cc25f38
1 parent
ca37e894
MAJ connexion site
Showing
2 changed files
with
30 additions
and
36 deletions
Show diff stats
site/connecter.php
1 | 1 | <?php |
2 | 2 | session_start(); |
3 | 3 | require("accesBase.php") ; |
4 | + | |
5 | +if(verifPwd($_POST["id"], $_POST["pwd"])) | |
6 | +{ | |
7 | + $_SESSION['Login'] = $_POST['id']; | |
8 | + $_SESSION['Password'] = $_POST['pwd']; | |
9 | + $connect = true; | |
10 | +} | |
11 | +else | |
12 | +{ | |
13 | + $connect = false; | |
14 | +} | |
4 | 15 | ?> |
5 | 16 | |
6 | 17 | <!DOCTYPE html> |
... | ... | @@ -15,41 +26,27 @@ require("accesBase.php") ; |
15 | 26 | <?php include("header.php"); ?> |
16 | 27 | |
17 | 28 | <!-- Centre de la page --> |
18 | - <div class="container-fluid"> | |
19 | - <div class="row"> | |
20 | 29 | |
21 | - <!-- Contenu de la page --> | |
22 | - <!-- Connexion --> | |
23 | - <div class="row syst"> | |
24 | - <div class="connect"> | |
25 | - <?php | |
26 | - if (verifPwd($_POST["id"], $_POST["pwd"])){ | |
27 | - $_SESSION['Login'] = $_POST['id']; | |
28 | - $_SESSION['Password'] = $_POST['pwd']; | |
29 | - ?><meta http-equiv="Refresh" content="0;url=accueil.php" /><?php | |
30 | - } | |
31 | - else | |
32 | - { | |
33 | - ?> | |
34 | - <div class="row"> | |
35 | - <div class="col-4 col-md-4 offset-4 offset-md-4"> | |
36 | - <br/> | |
37 | - <div class="alert <?php echo $color;?>" role="alert"> | |
38 | - Identifiant ou mot de passe incorrect ! | |
39 | - </div> | |
40 | - </div> | |
41 | - </div> | |
42 | - <meta http-equiv="Refresh" content="5;url=accueil.php" /> | |
43 | - <?php | |
44 | - } | |
45 | - ?> | |
46 | - </div> | |
47 | - </div> | |
48 | - <!-- fin connexion --> | |
30 | + <?php | |
31 | + if($connect) | |
32 | + { | |
33 | + ?><meta http-equiv="Refresh" content="0;url=accueil.php" /><?php | |
34 | + } | |
35 | + else | |
36 | + { | |
37 | + ?> | |
38 | + <div class="row"> | |
39 | + <div class="col-4 col-md-4 offset-4 offset-md-4"> | |
40 | + <br/> | |
41 | + <div class="alert alert-danger" role="alert"> | |
42 | + Identifiant ou mot de passe incorrect ! | |
49 | 43 | </div> |
50 | - <!-- fin contenu de la page --> | |
51 | 44 | </div> |
52 | 45 | </div> |
53 | - <!-- fin centre de la page --> | |
46 | + <!-- <meta http-equiv="Refresh" content="5;url=accueil.php" /> --> | |
47 | + <?php | |
48 | + include("formConnexion.php"); | |
49 | + } | |
50 | + ?> | |
54 | 51 | </body> |
55 | 52 | </html> | ... | ... |