-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndex.php
More file actions
108 lines (95 loc) · 3.1 KB
/
Index.php
File metadata and controls
108 lines (95 loc) · 3.1 KB
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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Staff Login Form</title>
<link
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
rel="stylesheet" />
<style>
#toast-container {
z-index: 1050;
}
.login-form {
max-width: 400px;
margin: 50px auto;
padding: 30px 25px;
background: #f7f7f7;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}
.login-form h2 {
margin-bottom: 20px;
}
.login-form .form-control {
margin-bottom: 10px;
}
</style>
</head>
<body>
<div class="container">
<div class="row justify-content-center pt-5 mt-5">
<?php
if(isset($_SESSION['error'])){
echo "<div id='toast-container' class='toast-body position-fixed top-0 end-0 p-3' role ='alert'>
<p>".$_SESSION['error']."</p>
<button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
</div>
";
unset($_SESSION['error']);
}
?>
<div class="col-md-6 col-lg-4">
<div class="login-form">
<form method="POST" action="action.php?return=<?php echo basename(htmlspecialchars($_SERVER['PHP_SELF'])); ?>" >
<div class="text-center mb-4">
<img
src="../assets/images/logo.png"
alt="Logo"
class="img-fluid"
style="width: 50px" />
</div>
<div class="form-group">
<label for="staffId">Staff ID</label>
<input
type="text"
name="staffId"
class="form-control"
id="staffId"
placeholder="Enter Your Staff Id"
required />
<div class="invalid-feedback">
Please provide a valid Staff Id.
</div>
</div>
<div class="form-group">
<label for="password">Password</label>
<input
type="password"
class="form-control"
id="password"
name="password"
placeholder="Enter Password"
required />
<div class="invalid-feedback">
Please provide a valid password.
</div>
</div>
<button type="submit" name ="login" class="btn btn-danger btn-block">
Login
</button>
</form>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.4/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script>
</script>
</body>
</html>