-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
105 lines (81 loc) · 4.64 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
include("classes/classe_php_flashy/gestionMessageFlash.php");
gestionMessageFlash::gestionMessage(1);// 1 for success , 2 for warning and 3 for error
//test de setcookie
$email=$_POST['email'];
$pass=$_POST["password"];
if(isset($_POST["submit"])){
setcookie("toto","[email protected]",time()+60*60*24*30,null,null,false,true);
$db=new PDO("mysql:host=localhost;dbname=Authentification","ange","aegn1996");
$req=$db->prepare("SELECT * FROM auth WHERE (email=? AND mot_de_pass=?)");
$req->execute([$email,$pass]);
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Floating labels example for Bootstrap</title>
<!-- Bootstrap core CSS -->
<link href="asserts/css/bootstrap.min.css" rel="stylesheet">
<link href="asserts/css/css_flashy/font-awesome.css" rel="stylesheet">
<link href="asserts/css/css_flashy/style_flashy.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="asserts/css/floating-labels.css" rel="stylesheet">
</head>
<body style="margin:10px">
<div class="<?php echo(gestionMessageFlash::getFlashDefault());?>">
<a href="mailto:[email protected]"><i class="<?php echo(gestionMessageFlash::getIcone())?>"></i> <?php echo(gestionMessageFlash::getMessage() )?></a>
</div>
<form class="form-signin" method="post" action="">
<div class="text-center mb-4">
<img class="mb-4" alt="" width="72" height="72">
<h1 class="h3 mb-3 font-weight-normal">Connexion</h1>
<p>veuillez vous authentifier <code>:placeholder-shown</code> pseudo-element.Works in latest Chrome, Safari, and Firefox.</p>
</div>
<div class="form-group">
<input id="email" type="email" class="form-control" placeholder="Email address" name="email" />
</div>
<div class="form-group">
<input id="password" type="password" class="form-control" name="password" placeholder="Password"/>
</div>
<div class="checkbox mb-3">
<label>
<input id="checkbox" type="checkbox" value="remember-me" name="checkbox"> Remember me
</label>
</div>
<button id="submit" class="btn btn-lg btn-primary btn-block" type="submit" name="submit">Sign in</button>
<p class="mt-5 mb-3 text-muted text-center">© 2017-2018</p>
</form>
<script src="asserts/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript">
$(document).ready(()=>{
// ================== POUR LES MESSAGES FLASH EXTERNE==========================
setTimeout(() =>{
$(".<?php echo(gestionMessageFlash::getFlashDefault());?>").animate({
"left":"-1000px",
"display":"none"
},500);
},3000);
$('<audio id="beep" src="asserts/sounds/notify.wav"></audio>').appendTo('body');
$("#beep")[0].play();
// ================== / POUR LES MESSAGES FLASH ==========================
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° PROGRAMME INTERNE °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
$_email=$("#email").val()
$_password=$("#password").val()
$_checkbox=$("#checkbox").val()
/*function controleChamps(champ){
if(champ.length <4){
champ.css("border","1px solid black")
alert("ooo")
}else{
}
}*/
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° / PROGRAMME INTERNE °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
});
</script>
</body>
</html>