-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
128 lines (106 loc) · 4.23 KB
/
index.php
File metadata and controls
128 lines (106 loc) · 4.23 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
require_once("DBConnection.php");
include("functions.php");
session_start();
?>
<?php
if (isset($_POST['login'])) {
if (!empty($_POST['username']) && !empty($_POST['password'])) {
$username = mysqli_real_escape_string($conn,$_POST['username']);
$pass = mysqli_real_escape_string($conn,$_POST['password']);
$login = login($username,$pass,$conn);
}
else{
echo "Required All fields!";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css">
<title>Online Leave Application</title>
<style>
#invalidMsg{
display:none;
}
</style>
</head>
<body>
<!-- header -->
<nav class="navbar header-nav navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Online Leave Application</a>
<a id="register" href="signup.php">Sign Up</a>
</div>
</nav>
<!-- header ends -->
<!-- body -->
<div class="container-fluid">
<div class="row">
<!-- container and row divs for responsive -->
<!-- leftComponent -->
<div class="leftComponent col-md-5">
<img src="img/indeximg.jpg" alt="Leave Image" class="img-fluid">
</div>
<!-- leftComponent ends -->
<!-- rightComponent -->
<div class="rightComponent col-md-5">
<h3>Please login to continue. . .</h3>
<hr>
<form method="POST" class="loginForm">
<div class="alert alert-danger" id="invalidMsg">
<?php
if(isset($_POST['login'])){
if($login == false)
echo "<script type='text/javascript'>document.getElementById('invalidMsg').style.display = 'block';</script>";
echo "Invalid Username or Password";
}
else
echo "";
?>
</div>
<div class="mb-3">
<input class="form-control" type="text" id="username" name="username" placeholder="Enter Username" required>
</div>
<div class="mb-3">
<input class="form-control" type="password" id="password" name="password" placeholder="Enter Password"
required>
</div>
<input type="submit" class="btn btn-success" name="login" value="Log In">
</form>
</div>
<!-- rightComponent ends -->
</div>
</div>
<!-- body ends -->
<div class="content2">
<p class="heading lead text-start">
Simple yet effective software for leave management system
</p>
<p class="text-start">
Every organization may have different needs, so while picking on a leave management software, it will be
smart to choose a leave solution that provides the basic requirements while offering the flexibility to
customize the leave process. With greytHR managing employee leave is effortless with an all-rounded HR
management software.
</p>
</div>
<footer class="footer navbar navbar-expand-lg navbar-light bg-light" style="color:white;">
<div>
<p class="text-center">© <?php echo date("Y"); ?> - Online Leave Application</p>
<p class="text-center">Developed By Issa Oderinde</p>
</div>
</footer>
</body>
</html>
<?php
ini_set('display_errors', true);
error_reporting(E_ALL);
?>