-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPass.php
46 lines (44 loc) · 1.06 KB
/
Pass.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
<?php session_start(); ?>
<?php
if (($_POST['tttpseudo'])=="" AND ($_POST['tttpass']=="")) {
include("Connexion2.php");
}
else{
if (isset($_POST['tttpseudo']) AND (isset($_POST['tttpass']))) {
try
{
include('TTT_BDD.php');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
$req = $bdd->prepare('SELECT * FROM utilisateurs WHERE NomUtilisateur = ?');
$req->execute(array($_POST['tttpseudo']));
if($donnees = $req->fetch()){
if (MD5($_POST['tttpass'])==$donnees['MotDePass']) {
if($donnees['is_banned']==0) {
$_SESSION['tttpseudo']=$_POST['tttpseudo'];
$_SESSION['tttpass']=1;
$req->closeCursor();
header('Location: Profild.php');
}
else{
$req-> closeCursor();
include("Connexion6.php");
}
}
else{
$req->closeCursor();
include("Connexion5.php");
}
}
else{
$req->closeCursor();
include("Connexion4.php");
}
$req->closeCursor();
}
else {
include("Connexion2.php");}}
?>