Академический Документы
Профессиональный Документы
Культура Документы
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.
Leave manager project is a web based system which can be accessed by all the
students, faculties, Hod, and admin. This application is a automated system for
managing leaves related information of the students and the faculties. Both the
students and the faculties are provided with a unique user id and password for log in
to the application and send request for leave. The students request are managed by
the faculty, they may accept or reject or keep it in pending. Similarly, the HOD of
the department look after the faculty’s leave application, the HOD can either accept
or reject the leave application that is received in their module. This helps the
students and faculties to balance their leave, request leaves, view past leave history.
This application is very useful for any department, college or even any organizations
can take this up, where there are large number of students or employees. Also this
application have many features such as notification through email, leave
cancellation, and automated leave approval.
1
LEAVE MANAGEMENT SYSTEM
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.
2
LEAVE MANAGEMENT SYSTEM
Login:
3
LEAVE MANAGEMENT SYSTEM
4
LEAVE MANAGEMENT SYSTEM
Student Module:
5
LEAVE MANAGEMENT SYSTEM
Faculty Module:
6
LEAVE MANAGEMENT SYSTEM
Admin Module:
7
LEAVE MANAGEMENT SYSTEM
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.
8
LEAVE MANAGEMENT SYSTEM
3.3 Program/Pseudocode
indexStud.php:
<?php
session_start();
if (isset($_SESSION['uname'])) {
$uid = $_SESSION['uid'];
include("connect.php");
?>
<?php
if($_SESSION['desig']=='student'){
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!--[if lt IE 11]>
<script
src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script
>
<script
src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></scri
pt>
<![endif]-->
<!-- Meta -->
9
LEAVE MANAGEMENT SYSTEM
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="Free Datta Able Admin
Template come up with latest Bootstrap 4 framework with basic
components, form elements and lots of pre-made layout options" />
<meta name="keywords" content="admin templates, bootstrap
admin templates, bootstrap 4, dashboard, dashboard templets, sass admin
templets, html admin templates, responsive, bootstrap admin templates
free download,premium bootstrap admin templates, datta able, datta able
bootstrap admin template, free admin theme, free dashboard template" />
<meta name="author" content="CodedThemes" />
10
LEAVE MANAGEMENT SYSTEM
</head>
<body>
</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">
11
LEAVE MANAGEMENT SYSTEM
</div>
</div>
</li>
<li>
<div class="dropdown drp-user">
</div>
</div>
</li>
</ul>
12
LEAVE MANAGEMENT SYSTEM
</div>
</header>
<!-- [ Header ] end -->
</table>
</div>
</div>
</div>
</div>
<!--[ Recent Users ] end-->
</div>
<h2 class="mt-3 f-w-300">10th OCT<sub
class="text-muted f-14">Diwali</sub>
</h2>
<h6 class="text-muted mt-4 mb-0">9.00
p.m - Diwali Party </h6>
<i class="fab fa-angellist text-c-purple f-
50"></i>
</div>
</div>
14
LEAVE MANAGEMENT SYSTEM
<div class="card">
<div class="card-block border-bottom">
<div class="row d-flex align-items-
center">
<div class="col-auto">
<i class="feather icon-zap f-30 text-
c-green"></i>
</div>
<div class="col">
<h3 class="f-w-300">
<?php
$getLeaveTaken_query =
"SELECT LeaveTaken FROM user WHERE user_id='$uid'";
$getLeaveTaken_result =
mysqli_query($connect, $getLeaveTaken_query);
if
(mysqli_num_rows($getLeaveTaken_result) > 0) {
while ($LeaveTaken_row =
mysqli_fetch_array($getLeaveTaken_result)) {
echo
$LeaveTaken_row['LeaveTaken'];
}
}
?>
</h3>
<span class="d-block text-
uppercase">LEAVES TAKEN</span>
</div>
</div>
15
LEAVE MANAGEMENT SYSTEM
</div>
<div class="card-block">
<div class="row d-flex align-items-
center">
<div class="col-auto">
<i class="feather icon-zap f-30 text-
c-green"></i>
</div>
<div class="col">
<h3 class="f-w-300">
<?php
$getLeaveTaken_query =
"SELECT balanceLeave FROM user WHERE user_id='$uid'";
$getLeaveTaken_result =
mysqli_query($connect, $getLeaveTaken_query);
if
(mysqli_num_rows($getLeaveTaken_result) > 0) {
while ($LeaveTaken_row =
mysqli_fetch_array($getLeaveTaken_result)) {
echo
$LeaveTaken_row['balanceLeave'];
}
}
?>
</h3>
<span class="d-block text-
uppercase">LEAVES LEFT</span>
</div>
16
LEAVE MANAGEMENT SYSTEM
</div>
</div>
</div>
</div>
<div class="col-lg-8">
<div class="card">
<div class="card-header">
<h5> LEAVE FORM</h5>
</div>
<div class="card-body">
<div class="row">
<div class="col-lg-6">
<form method="post"
id="leave_form" action="./insertStud.php">
<div class="form-group">
<label>Mentor</label>
<input type="text" class="form-
control" placeholder="Mentor">
</div>
<div class="form-group">
<label
for="exampleFormControlSelect1">Faculty
substitute</label>
<select class="form-control"
name="name" id="name" required>
<option disabled selected
value="NULL">Select Teacher</option>
17
LEAVE MANAGEMENT SYSTEM
<?php
$teachers_sql =
"SELECT name FROM user WHERE designation='faculty'";
$teachers_result =
mysqli_query($connect, $teachers_sql);
$trail =
$teachers_result;
if
(mysqli_num_rows($teachers_result) > 0) {
while ($teacher
= mysqli_fetch_array($teachers_result)) {
?>
<option
value="<?php echo $teacher['name']; ?>"><?php echo
$teacher['name']; ?></option>
<?php
}
}
?>
</select>
</div>
<div class="form-group">
<label for="fromDate">From-
Date</label>
<input type="date"
class="form-control" name="fromDate" id="fromDate" required>
</div>
18
LEAVE MANAGEMENT SYSTEM
<div class="form-group">
<label for="toDate">To-
Date</label>
<input type="date"
class="form-control" name="toDate" id="toDate" required>
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label>Subject</label>
<input type="text" class="form-
control" name="subject" id="subject" placeholder="Subject" required>
</div>
<div class="form-group">
<label for="reason">Reason for
absence</label>
<textarea class="form-control"
name="reason" id="reason" rows="5" required></textarea>
</div>
</div>
<div class="col-lg-6">
19
LEAVE MANAGEMENT SYSTEM
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
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) {
$('#res1').html(data.output);
}
});
}
load_unseen_notification();
load_unseen_requests();
21
LEAVE MANAGEMENT SYSTEM
}, 2000);
});
</script>
</body>
</html>
<?php
} else {
echo '<script>window.location.href = "404.html";</script>';
}
?>
<?php
} else {
echo '<script>window.location.href = "./login.html";</script>';
}
?>
req_dis.php
<?php
session_start();
if (isset($_SESSION['uname']))
22
LEAVE MANAGEMENT SYSTEM
{
$uid = $_SESSION['uid'];
$uname = $_SESSION['uname'];
include('connect.php');
$output = '';
$output .= '<tbody>';
$output1 = '';
$output1 .= '<tbody>';
if ($_SESSION['desig'] != 'hod') {
$query = "SELECT * FROM leaveapplication where
facultyApproval = '" . $uname . "' ORDER BY application_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']."'";
$orifrom=$row['fromDate'];
$orito=$row['toDate'];
23
LEAVE MANAGEMENT SYSTEM
$t_from = strtotime($orifrom);
$t_to = strtotime($orito);
$new_from = date("d-m-Y", $t_from);
$new_to = date("d-m-Y", $t_to);
}
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 . ' name="accpt"
>Accept</button></a>';
</a>
';
}
$output .= '</td>
</tr></tbody>';
}
} else {
$output .= '<tr class="unread">
<td>
</td>
</tr></tbody>';
}
$query = "SELECT * FROM leaveapplication where user_id='".
$uid."' ORDER BY application_id DESC";
$result = mysqli_query($connect, $query);
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_array($result)) {
$orifrom=$row['fromDate'];
$orito=$row['toDate'];
$t_from = strtotime($orifrom);
$t_to = strtotime($orito);
$new_from = date("d-m-Y", $t_from);
$new_to = date("d-m-Y", $t_to);
$output1 .= '<tr class="unread">
<td><img class="rounded-circle" style="width:40px;"
src="assets/images/user/avatar-1.jpg"
alt="activity-user"></td>
<td>
26
LEAVE MANAGEMENT SYSTEM
<td>';
if ($row['leaveStatus'] == 1) {
$output1 .= '<button class="label theme-bg text-white f-15"
disabled >Accepted</button></a>
</li></form>';
}
if ($row['leaveStatus'] == -1) {
$output1 .= '<button class="label theme-bg2 text-white f-
15" disabled >Rejected</button></a>
</li></form>';
}
if ($row['leaveStatus'] == 0) {
$output1 .= '<button class="label label-warning theme-bg3
text-white f-15" disabled >Pending..</button>
</form><br></a>
</li>';
}
$output1 .= '</td>
27
LEAVE MANAGEMENT SYSTEM
</tr></tbody>';
}
} else {
$output1 .= '<tr class="unread">
<td>
</td>
</tr></tbody>';
}
}
if ($_SESSION['desig'] == 'hod') {
$query = "SELECT * FROM leaveapplication where hodStatus=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']."'";
$t_to = strtotime($orito);
$new_from = date("d-m-Y", $t_from);
$new_to = date("d-m-Y", $t_to);
29
LEAVE MANAGEMENT SYSTEM
if ($row['leaveStatus'] == 1) {
$output .= '<button class="label theme-bg text-white f-15 "
id=' . $acpid . ' value=' . $acpid . ' name="accpt" disabled disabled
>Accepted</button></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 . ' name="accpt"
>Accept</button></a>';
</a>
';
}
$output .= '</td>
</tr></tbody>';
}
}
30
LEAVE MANAGEMENT SYSTEM
else {
$output .= '<tr class="unread">
<td>
include("connect.php");
session_start();
$uid=$_POST['uid'];
$password=$_POST['pass'];
$data = array();
if(mysqli_num_rows($result) > 0)
{
//
$2y$10$VPdsbHC1XYkgp0.629QWq.Cu4.gzvcn6kuRLuxctTItkSXBa56
eLq
$row = mysqli_fetch_assoc($result);
if(password_verify($password,
$row['password'])/*$password==$row['password']*/)
{
//password valid
$uquery = "SELECT * FROM user where user_id = '".$uid."'" ;
$uresult = mysqli_query($connect, $uquery);
$urow = mysqli_fetch_assoc($uresult);
$_SESSION['uname'] =$urow['name'];
$_SESSION['uid']=$urow['user_id'];
$_SESSION['desig']=$urow['designation'];
if($urow['designation']=="faculty")
{
echo '<script>window.location.href = "./index.php";</script>';
}
if( $urow['designation']=="hod")
{
32
LEAVE MANAGEMENT SYSTEM
}
else
{
echo '<script language="javascript">';
echo 'alert("Wrong Password")';
echo '</script>';
echo '<script>window.location.href = "./login.html";</script>';
}
Connect.php
<?php
//connect.php;
$connect = mysqli_connect("localhost", "root", "", "dummydb");
?>
SQL FILE:
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
--
-- Database: `dummydb`
--
34
LEAVE MANAGEMENT SYSTEM
35
LEAVE MANAGEMENT SYSTEM
36
LEAVE MANAGEMENT SYSTEM
37
LEAVE MANAGEMENT SYSTEM
38
LEAVE MANAGEMENT SYSTEM
39
LEAVE MANAGEMENT SYSTEM
40
LEAVE MANAGEMENT SYSTEM
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.
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.
41