-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
110 lines (101 loc) · 3.51 KB
/
login.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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="stylesheet" href="assets/css/particles_style.css">
<title>Login</title>
</head>
<style>
.main {
top: 20%;
left: 30%;
position: absolute;
}
.invalid-feedback {
font-size: 14px;
margin-left: 10%;
}
p {
font-size: 18px;
color: red;
text-align: center;
}
</style>
<body>
<div id="particles-js"></div>
<div class="container main">
<center>
<img src="assets/img/hrms.jpg" alt="" style="height: 100px;">
</center>
<h1 style="font-size: 2.5rem;margin-bottom: .5rem;font-weight: 500;">Login</h1>
<?php
if (isset($_REQUEST['2'])) { ?>
<p>Incorrect Password</p>
<?php } else if (isset($_REQUEST['3'])) { ?>
<p>Invalid Email</p>
<?php } ?>
<form class="needs-validation" novalidate action="controllers/login.php" method="post">
<div class="form-row" style="margin: 15px 0;">
<div class="col-md-12 mb-12">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroupPrepend">
<img src="assets/img/person.png" alt="" style="height: 26px;">
</span>
</div>
<input type="email" class="form-control" id="validationCustomUsername" placeholder="Enter your Email" aria-describedby="inputGroupPrepend" required name="email">
<div class="invalid-feedback">
Please enter your email.
</div>
</div>
</div>
</div>
<div class="form-row" style="margin: 15px 0;">
<div class="col-md-12 mb-12">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="inputGroupPrepend">
<img src="assets/img/vpn_key.png" alt="" style="height: 26px;">
</span>
</div>
<input type="password" class="form-control" id="validationCustomUsername" placeholder="Enter your Password" aria-describedby="inputGroupPrepend" required name="password">
<div class="invalid-feedback">
Please enter password.
</div>
</div>
</div>
</div>
<div class="form-row center" style="margin: 15px 20%;">
<button class="btn btn-primary" type="submit" style=" width: 100%;">LOGIN</button>
</div>
</form>
</div>
</body>
<script src="assets/js/particles.min.js"></script>
<script src="assets/js/app.js"></script>
<script>
// Example starter JavaScript for disabling form submissions if there are invalid fields
(function() {
'use strict';
window.addEventListener('load', function() {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.getElementsByClassName('needs-validation');
// Loop over them and prevent submission
var validation = Array.prototype.filter.call(forms, function(form) {
form.addEventListener('submit', function(event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
})();
</script>
</html>