-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
117 lines (97 loc) · 3.61 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
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="DSkillz">
<title>Gestion Digital Skillz - Connexion</title>
<link rel="shortcut icon" href="assets/images/gt_favicon.png">
<link rel="stylesheet" media="screen" href="https://cdn.jsdelivr.net/npm/open_sans@1.0.1/open_sans.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/font-awesome.min.css">
<!-- Custom styles for our template -->
<link rel="stylesheet" href="assets/css/bootstrap-theme.css" media="screen">
<link rel="stylesheet" href="assets/css/main.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="assets/js/html5shiv.js"></script>
<script src="assets/js/respond.min.js"></script>
<![endif]-->
<!-- JavaScript libs are placed at the end of the document so the pages load faster -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/headroom.js@0.12.0/dist/headroom.min.js" type="text/javascript"></script>
</head>
<body class="home">
<!-- Fixed navbar -->
<?php include 'menu.php'; ?>
<!-- /.navbar -->
<!-- Main -->
<main class="container-fluid d-flex flex-column">
<div class="row justify-content-center m-auto text-center">
<h2 style="color: coral; padding-bottom: 40px;">FICHE INTERVENTION:<br>Authentification</h2>
<div id="formDiv">
<form id="loginForm" method="post">
<!-- Email input -->
<div class="form-outline mb-4">
<input type="email" id="login" name="login" class="form-control">
<label class="form-label" for="form2Example1">Identifiant</label>
</div>
<!-- Password input -->
<div class="form-outline mb-4">
<input type="password" id="pwd" name="pwd" class="form-control">
<label class="form-label" for="form2Example2">Mot de passe</label>
</div>
<!-- 2 column grid layout for inline styling -->
<div class="row mb-4">
<div class="col d-flex justify-content-center">
<!-- Checkbox -->
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="form2Example31" checked="">
<label class="form-check-label" for="form2Example31"> Remember me </label>
</div>
</div>
<!-- Submit button -->
<button type="button" class="btn btn-primary btn-block mb-4" onclick="SubmitFormData();">Connexion</button>
</div>
</form>
</div>
</div>
</main>
<footer id="footer" class="top-space">
<?php include 'footer.php'; ?>
</footer>
<script>
function SubmitFormData() {
var login = $("#login").val();
var pwd = $("#pwd").val();
$.post("login.php", {
login: login,
pwd: pwd
},
function(data) {
console.log('Success' + data);
$('main > div').replaceWith(data);
$('#loginForm').trigger("reset");
});
}
$(document).ready(function() {
// grab an element
var myElement = document.querySelector("nav");
// construct an instance of Headroom, passing the element
var headroom = new Headroom(myElement, {
"offset": 50,
"tolerance": 5,
"classes": {
"initial": "animated",
"pinned": "slideDown",
"unpinned": "slideUp"
}
});
// initialise
headroom.init();
});
</script>
</body>
</html>