You are on page 1of 25

LEAVE MANAGEMENT SYSTEM

CHAPTER 1: Introduction
1.1 I NTRODUCTION TO PROJECT

There are a lot of traditional tools that help keep track of the different vacation
requests and leave applications in any management. One of the disadvantages with
using old tools are that they are ineffective and just eat away at the productivity and
efficiency of work that is done. They also demand too much of manual intervention
and are hence, not entirely reliable.

A leave management system optimizes and automates the entire process thus
increasing productivity, accuracy and reliability. It is also robust enough to
seamlessly handle all the stages involved in a leave management process
-application, approval/rejection, filing leaves, managing leave balance, and analysis.

1.2 PROBLEM DEFINITION


Leave manager web Application is very convenient to implement and easy to
understand. The need of designing such application is to provide the administration a
better way for scheduling and balancing work load by maintaining leave details of
the staff and students. It reduces the human efforts of checking the papers for leave
request manually or by mail and then maintaining it in folders and files.

1.3 OBJECTIVE
This project aims to do the following:
• To automate the existing leave management in educational institutes.
• To decrease the paperwork and enable the process with efficient, Reliable
record maintenance by using centralized database, thereby reducing the chance of
data loss.
• To provide for an automated leave Management system that intelligently
adapts to manage the leaves and allows the faculty and students to apply for the
leaves with replacement of heavy workload.

1
LEAVE MANAGEMENT SYSTEM

CHAPTER 2: Program Components


2.1 HARDWARE AND SOFTWARE USED

Hardware Requirements  2GB RAM


 Main Server machine
Software Requirements
 XAMPP
 Web browser: Chrome

Platform  Cross platform web application

Programming Language/Tools Used  PHP v7.3.6, Javascript, HTML5,


CSS3, Bootstrap4, jQuery,Ajax

2
LEAVE MANAGEMENT SYSTEM

CHAPTER 3: IMPLEMENTATION

3.1 FLOWCHART

Login:

Fig 3.1: Login Process

3
LEAVE MANAGEMENT SYSTEM

Student Module:

Fig 3.2: Student Module

4
LEAVE MANAGEMENT SYSTEM

Faculty Module:

Fig 3.3: Faculty Module

5
LEAVE MANAGEMENT SYSTEM

Admin Module:

Fig 3.4: Admin Module

6
LEAVE MANAGEMENT SYSTEM

3.2 Brief description of leave management system


The leave manager basically consists of four modules:
 Students
 Faculty
 HOD
 Admin
Students Module: The students logs into his interface, where he can check:
a. Personal leave details
b. Status of leave application
c. Place new requests for leave

Faculty Module: Faculty logs into his interface and can check for:
a. Check new application request
b. Check his leave details
c. Apply for leave application
d. Accepts/rejects leave application of the students

HOD module: Hod logs into his interface and check for:
a. Check new Faculty request
b. Accepts/request leave application of the faculty

Admin Module: Admin is responsible for updating and maintaining the


student’s and faculty’s records and uploading excel sheets.

7
LEAVE MANAGEMENT SYSTEM

3.3 Program/Pseudocode

indexStud.php:
<?php
session_start();
if (isset($_SESSION['uname'])) {
$uid = $_SESSION['uid'];
include("connect.php");

?>
<!DOCTYPE html>
<html lang="en">

<head>
<link rel="icon" href="assets/images/favicon.ic
o" type="image/x-icon">
<link rel="stylesheet" href="assets/fonts/fonta
wesome/css/fontawesome-all.min.css">
<link rel="stylesheet" href="assets/plugins/ani
mation/css/animate.min.css">
<link rel="stylesheet" href="assets/css/style.cs
s">
<link rel="stylesheet" href="assets/css/user-
style.css">
</head>
<body>
<header class="navbar pcoded-header navbar-expand-lg
navbar-light" style="margin-
left:0px;width: calc(100% - 0px)">
8
LEAVE MANAGEMENT SYSTEM

<div class="collapse navbar-collapse">


<ul class="navbar-nav mr-auto">
<li class="pdr-10"><a
href="javascript:" class="full-
screen" onclick="javascript:toggleFullScreen()">&l
t;i class="feather icon-
maximize"></i></a></li>
<li class="nav-item dropdown">
<a class="mb-1"
href="logout.php">Logout</a>
</li>
</ul>
<ul class="navbar-nav ml-auto">
<li class="pdr-10">
<div class="dropdown">

<span class="label label-pill label-danger


count" style="border-
radius:20px;"> </span>
<a class="dropdown-toggle dropdown-toggle-
noti" href="javascript:" data-
toggle="dropdown"><i class="icon feather icon-
bell"></i></a>
<div class="dropdown-menu dropdown-menu-
right notification drop-noti">
</div>
</div>
</li>
<li>
9
LEAVE MANAGEMENT SYSTEM

<div class="dropdown drp-user">


<a href="javascript:" class="dropd
own-toggle" data-toggle="dropdown">
<i class="icon feather icon-
settings"></i>
</a>
<div class="dropdown-menu dropdown-menu-
right profile-notification">
<div class="pro-head">
<img src="assets/images/user/avatar-
1.jpg" class="img-radius" alt="User-
Profile-Image">
<span><?php echo
($_SESSION['uname']) ?></span>
<a href="logout.php" class="
dud-logout" title="Logout">
<i class="feather icon-log-
out"></i>
</a>
</div>
</div>
</div>
</li>
</ul>
</div>
</header>
<div class="main-container mgl-10 mgr-10">
<div class="wrapper mgl-10">
<div class="content">
10
LEAVE MANAGEMENT SYSTEM

<div class="inner-content">

<?php

$teachers_sql = "SELECT name FROM user WHER


E designation='faculty'";
$teachers_result = mysqli_query($connect, $teachers_s
ql);
$trail = $teachers_result;
if (mysqli_num_rows($teachers_result) > 0)
{
while ($teacher = mysqli_fetch_array($teacher
s_result)) {
?>
<option value="<?php echo $teacher['name'];
?>"><?php echo $teacher['name']; ?
></option>
<?php
}

<label for="fromDate">From-Date</label>
<input type="date" class="form-control"
name="fromDate" id="fromDate" required>
</div>
<div class="form-group">
<label for="toDate">To-Date</label>
<input type="date" class="form-control"
name="toDate" id="toDate" required>
$(document).ready(function() {
11
LEAVE MANAGEMENT SYSTEM

function load_unseen_notification(view = '') {


$.ajax({
url: "fetchStud.php",
method: "POST",
data: {
view: view
},
dataType: "json",
success: function(data) {
$('.drop-noti').html(data.notification);
load_unseen_requests();
if (data.unseen_notification > -1) {

$
('.count').html(data.unseen_notification);
}
}
});
}

function load_unseen_requests(view = '') {


$.ajax({
url: "req_dis_stud.php",
method: "POST",
data: {
view: view
},
dataType: "json",
success: function(data) {
12
LEAVE MANAGEMENT SYSTEM

$('#res1').html(data.output);
</script>

</body>

</html>
<?php

} else {
echo '<script>window.location.href = "./login.html&
quot;;</script>';
}

?>

req_dis.php

<?php
session_start();
if (isset($_SESSION['uname']))
{
$uid = $_SESSION['uid'];
$uname = $_SESSION['uname'];
include('connect.php');
$output = '';
$output .= '<tbody>';
$output1 = '';
$output1 .= '<tbody>';
if ($_SESSION['desig'] != 'hod') {
13
LEAVE MANAGEMENT SYSTEM

$query = "SELECT * FROM leaveapplication where facultyA


pproval = '" . $uname . "' ORDER BY a
pplication_id DESC";//student leave req
$result = mysqli_query($connect, $query);
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_array($result)) {
$query1 = "SELECT name from `user`,`leaveapplication
` WHERE user.user_id = '".$row['user
_id']."'";
$result1 = mysqli_query($connect, $query1);
$s = mysqli_fetch_array($result1);
$name = $s['name'];
$rejid = 'rej' . $row["application_id"];
$acpid = "acp" . $row["application_id"
];
$output .= '<tr class="unread">
<td><img class="rounded-circle"
style="width:40px;"
src="assets/images/user/avatar-1.jpg"
alt="activity-
user"><br>'.$name.'</td>

<td>
<h6 class="mb-1">' .
$row["subjectOfLeave"] . '</h6>
<p class="m-0" style="max-
width:500px;margin: auto;">' . $row["reason"
] . '</p>
</td>
14
LEAVE MANAGEMENT SYSTEM

<td>
<h6 class="text-muted"><i
class="fas fa-circle text-c-green f-10 m-r-
15"></i>' . $row["fromDate"] . '&
lt;/h6><h6 class="text-muted"><i
class="fas fa-circle text-c-red f-10 m-r-
15"></i>' . $row["toDate"] . '</
h6>
</td>
<td><form id=' . $row["application_id&quot
;] . '>';
if ($row['leaveStatus'] == 1) {
$output .= '<button class="label theme-bg
text-white f-
15 " id=' . $acpid . ' value=' . $acpid . ' nam
e="accpt" disabled disabled >Accepted</button>&lt
;/a>
</li></form>'; }
if ($row['leaveStatus'] == -1) {
$output .= '<button class="label theme-bg2
text-white f-
15 " id=' . $rejid . ' value=' . $rejid . ' name
="reject" disabled >Rejected</button></a>
</li></form>';
} if ($row['leaveStatus'] == 0) {
$output .= '<button class="label theme-bg
text-white f-15 leave-
button" id=' . $acpid . ' value=' . $acpid . ' n
ame="accpt" >Accept</button></a>';
15
LEAVE MANAGEMENT SYSTEM

$output .= '<button class="label theme-bg2


text-white f-15 leave-
button" id=' . $rejid . ' value=' . $rejid . ' na
me="reject" >Reject</button></a>
</li></form>
</a>
'; }
$output .= '</td>
</tr></tbody>';
}
} else {
$output .= '<tr class="unread">

<td> <h6 class="mb-1">No


Requests</h6>

</td>
</tr></tbody>';
}
$query = "SELECT * FROM leaveapplication where user_id=
'".$uid."' ORDER BY application_id DE
SC";
$result = mysqli_query($connect, $query);
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_array($result)) {
$output1 .= '<tr class="unread">
<td><img class="rounded-circle"
style="width:40px;"
16
LEAVE MANAGEMENT SYSTEM

src="assets/images/user/avatar-1.jpg"
alt="activity-user"></td>
<td> <h6 class="mb-1">' .
$row["subjectOfLeave"] . '</h6>
<p class="m-0" style="max-
width:500px;margin: auto;">' . $row["reason"
] . '</p>
</td> <td>
<h6 class="text-muted"><i
class="fas fa-circle text-c-green f-10 m-r-
15"></i>' . $row["fromDate"] . '&
lt;/h6><h6 class="text-muted"><i
class="fas fa-circle text-c-red f-10 m-r-
15"></i>' . $row["toDate"] . '</
h6>
</td>
<td> <button type="button" class="label l
abel-info text-white f-15" data-toggle="modal" data-
target="#myModal" id='.$row['application_id&#
39;].' onClick="detail_show(this.id)">INFO</but
ton></td>

<td>'; if ($row['leaveStatus'] == 1)
{
$output1 .= '<button class="label theme-bg
text-white f-
15" disabled >Accepted</button></a>
</li></form>';
}
17
LEAVE MANAGEMENT SYSTEM

if ($row['leaveStatus'] == -1) {
$output1 .= '<button class="label theme-bg2
text-white f-
15" disabled >Rejected</button></a>

</li></form>';
}
if ($_SESSION['desig'] == 'hod') {
$query = "SELECT * FROM leaveapplication where hodStat
us=1 ORDER BY application_id DESC";
$result = mysqli_query($connect, $query);
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_array($result)) {
$query1 = "SELECT name from `user`,`leaveapplication
` WHERE user.user_id = '".$row['user
_id']."'"; $result1 = mysqli_query($con
nect, $query1);
$s = mysqli_fetch_array($result1);
$name = $s['name'];
$rejid = 'rej' . $row["application_id"];
$acpid = "acp" . $row["application_id"
];
$output .= '<tr class="unread">
<td><img class="rounded-circle"
style="width:40px;"
src="assets/images/user/avatar-1.jpg"
alt="activity-
user"><br>'.$name.'</td>
<td>
18
LEAVE MANAGEMENT SYSTEM

<h6 class="mb-1">' .
$row["subjectOfLeave"] . '</h6>
<p class="m-0" style="max-
width:500px;margin: auto;">' . $row["reason"
] . '</p>
</td> <td> <h6 class="text-
muted"><i
class="fas fa-circle text-c-green f-10 m-r-
15"></i>' . $row["fromDate"] . '&
lt;/h6><h6 class="text-muted"><i
class="fas fa-circle text-c-red f-10 m-r-
15"></i>' . $row["toDate"] . '</
h6>
</td> <td> <button type="button" cla
ss="label label-info text-white f-15" data-
toggle="modal" data-
target="#myModal" id='.$row['application_id&#
39;].' onClick="detail_show(this.id)">INFO</but
ton></td>
<td><form id=' . $row["application_id&quot
;] . '>';
if ($row['leaveStatus'] == 1) {
$output .= '<button class="label theme-bg
text-white f-
15 " id=' . $acpid . ' value=' . $acpid . ' nam
e="accpt" disabled disabled >Accepted</button>&lt
;/a>
</li></form>';
19
LEAVE MANAGEMENT SYSTEM

}
if ($row['leaveStatus'] == -1) {
$output .= '<button class="label theme-bg2
text-white f-
15 " id=' . $rejid . ' value=' . $rejid . ' name
="reject" disabled >Rejected</button></a>
</li></form>';
}
if ($row['leaveStatus'] == 0) {
$output .= '<button class="label theme-bg
text-white f-15 leave-
button" id=' . $acpid . ' value=' . $acpid . ' n
ame="accpt" >Accept</button></a>';

$output .= '<button class="label theme-bg2


text-white f-15 leave-
button" id=' . $rejid . ' value=' . $rejid . ' na
me="reject" >Reject</button></a>
</li></form>
</a>
';
}
$output .= '</td>
</tr></tbody>'; }
}
else {
$output .= '<tr class="unread">
<td>
20
LEAVE MANAGEMENT SYSTEM

<h6 class="mb-1">No Requests </h6>

</td>
</tr></tbody>';
}
}
$data = array(
'output' => $output,
'output1' => $output1, );
echo json_encode($data);
}

?>

21
LEAVE MANAGEMENT SYSTEM

CHAPTER 4: RESULT AND CONCLUSION

Fig 4.1 Login

22
LEAVE MANAGEMENT SYSTEM

Fig 4.2 Student module

Fig 4.3 Faculty module

23
LEAVE MANAGEMENT SYSTEM

Fig 4.4 HOD module

Fig 4.5 Admin module

24
LEAVE MANAGEMENT SYSTEM

4.1 Conclusion and Future Scope


This Leaver manager application would help various types of organisations with multiple
hierarchies in reducing paperwork, help achieve error free tabulation and calculation of
leaves. Several user friendly coding have also adopted. Considerable efforts have made
the application easy to operate even for the people not related to the field of computers.

FUTURE SCOPE:

 Every employees individual leave record can be tabulated in a pie chart format to
ascertain his/her performance during the working session.
 The summarised data generated by this system can be further provided to different
departments, for example, to calculate the fine for shortage of attendance, to
deduct from the salaries of the faculties.

25

You might also like