You are on page 1of 34

A PROJECT REPORT

ON

"LEAVE MANAGEMENT SYSTEM"

Submitted in partial fulfilment of the Requirement for the


Award of the Degree

BACHELOR OF COMPUTER APPLICATIONS


BY

AMITH M V 20BC5007
THANUSHGOWDA H S 20BC5086
DEEKSHITHA K C 20BC5017
DIMPLE C 20BC5019

DEPARTMENT OF COMPUTER SCIENCE AND APPLICATIONS

GOVERNMENT SCIENCE COLLEGE (AUTONOMOUS)


HASSAN-573201
2022-2023
A PROJECT REPORT
ON

"LEAVE MANAGEMENT SYSTEM"

Submitted in partial fulfilment of the Requirement for the


Award of the Degree

BACHELOR OF COMPUTER APPLICATIONS


BY

AMITH M V 20BC5007
THANUSHGOWDA H S 20BC5086
DEEKSHITHA K C 20BC5017
DIMPLE C 20BC5019

UNDER THE GUIDANCE OF


Prof. VIKRAM B.
Asst Prof. PAVANA M.H.

DEPARTMENT OF COMPUTER SCIENCE AND APPLICATIONS

GOVERNMENT SCIENCE COLLEGE (AUTONOMOUS)


HASSAN-573201
2022-2023

GOVERNMENT SCIENCE COLLEGE (AUTONOMOUS)


DEPARTMENT OF COMPUTER SCIENCE AND APPLICATIONS
HASSAN-573201

CERTIFICATE
This is to certify that the project entitled

"LEAVE MANAGEMENT SYSTEM"


Submitted by
AMITH M V 20BC5007
THANUSHGOWDA H S 20BC5086
DEEKSHITHA K C 20BC5017
DIMPLE C 20BC5019

is a record of bonified work carried out by them, in the partial fulfilment of the requirement
for the award of Degree of Bachelor of Computer Applications at Government Science college
Hassan, Affiliated to University of Mysore. This work is done during year 2020-2021, under
our guidance.
Date:

(Prof. Vikram B.) (Prof. DYANAND) (Prof. GANGEGOWDA )


Head of the Department principal
(Asst Prof. Pavana M.H.) Name of Examiner
Project Guide 1.
2.
ACKNOWLEDGEMENT

We are profoundly grateful to Prof. VIKARM B for his expert guidance and
continued encouragement throughout to see that this Project reach its target
since its commencement to its competition.

We would like to express deepest appreciation towards Prof. Gange Gowda


S.H, Principal, Government science College, Prof Dayanandh, Head of the
Department of computer Science and Applications.

At last we must express our sincere heartfelt gratitude to all the staff members
of Computer Science and Application Department who helped us directly or
indirectly during this course work.

AMITH MV
THANUSHGOWDA H S
DEEKSHITHA K C
DIMPLE C
ABSTRACT

This project is aimed at developing an online leave management system that is


of importance to either an organization. The Leave Management System (LMS)
is an Intranet based application that can be accessed throughout the organization
or a specified group/Dept. This system can be used to automate the workflow of
leave applications and their approvals.

The periodic crediting of leave is also automated. There are features like
notifications, approval of leave, detail of leave used, report generators etc in this
system. Leave Management application will reduce paper work and maintains
record in more efficient way.
CONTENT

1.INTRODUCTION

1.1 PURPOSE………………………………………………………………………. 1
1.2 SCOPE…………………………………………………………………………… 2

2.REQUIREMENT SPECIFICATION

2.1 OVERALL DESCRIPTION……………………………………………………….3-4


2.2 SPECIFIC REQUIREMENTS…………………………………………………… 4-5

3.IMPLEMENTATIONS

3.1 FRONTEND…………………………………….………………………………… 6-7


3.2 BACKEND………………………………………………………………………….7-8
3.3 MODULES………………………………………………………………………….8

4.SYSTEM DESIGN

4.1 ENTITY-RELATION DIAGRA………………………………………………….. 9-10


4.2 RELATION SCHEMA……………………………………………………………11-12
4.3 TRIGGERS………………………………………………………………………..12
4.4 STORE PROCEDURE……………………………………………………………13

5.INTERPETATION OF RESULTS…………………………………………….14-25

6.CONCLUSION……………………………………………………………………26

7.REFERENCES……………………………………………………………………..27
LEAVE MANAGEMENT SYSTEM 2022-2023

CHAPTER 1

INTRODUCTION

Leave Management project is a web based system which can be accessed all over the
organization. This system is automated system for managing leaves related information of
employees and approval of leaves, cancelations etc are element of this system. Every employee
is provided with unique user id and password for login to system and send request for leave.
Principal will look after the request and he can approve, reject or keep it in pending. This system
will upgrade the process of leave management inside the college by saving time and resources. It
help to employees can view leave balances, request leaves, view past leave history, and principal
approve leave applications. Admin can edit the staff details, and assign the principal and delete the
applied leave of the employee these are the features of admin. This system is very useful for any
colleges where there are large number of employee. This system manages different leave types,
leave history of all employee. The Leave Management is an online system which can be used
throughout the college. This system is also used to automate the workflow of leave and their
approvals in corporate world. This system have many features such as leave cancelation,
automated leave approval, report generation based on the requested data by the user.
In the existing paper work related to leave management, leaves are maintained using the
attendance register for employee. The employee needs to submit their leaves manually to their
respective authorities. This increase the paperwork and maintaining the records becomes difficult.
Maintaining notices in the records also increases the paperwork.

The main objective of the proposed system is to decrease the paperwork and help in easier
record maintenance by having a particular centralized

Database System, where Leave and Notices are maintained. The proposed system
automates the existing system. It decreases the paperwork and enables record maintenance. It also
reduces chances of Data loss. This module intelligently adapts to HR policy of the management
and allows employee and their higher authority to manage leaves and replacement for better
scheduling of work load.

Dept. of CS, GSC, Hassan Page 1


LEAVE MANAGEMENT SYSTEM 2022-2023

1.1 Purpose

The main purpose of the Leave Management is to manage details of employee leave, leave
type etc and to automate the existing leave management in any education institutes or in any
organizations. This system is to maintain the leave records of the employee of a college. This
system helps to decrease the paperwork and the process with efficient, reliable record maintenance
by using centralize database, thereby reducing changes of the data loss.

1.2 Scope

The scope of this leave management process is to help collecting perfect leave management
details which store in database provide more secure and convenient for the user. In a very short
time, the collection will be obvious, simple and sensible. It will help a person to know the leave
history of his leave applied. It also helps in current all works relative to employee Leave
Management. Once the employee logged in they need to record their leave in the proposed system
the higher authorities like Principal can view the leave details of the employee and leave
application s generated by the employee.

Dept. of CS, GSC, Hassan Page 2


LEAVE MANAGEMENT SYSTEM 2022-2023

CHAPTER 2

REQUIREMENTS SPECIFICATION
Software requirement elaborates the type of software required to implement and execute the
project here and emphases on the overall functional and nonfunctional requirements of the project.
It gives an overview of the end-product in terms of the deliverable from the programmer side and
the user side requirements.

2.1 Overall Description

2.1.1 Functional Requirements

The functional requirements of the system include the creation and maintenance of web-
portal with a role-based login functionality provided to the use and certain inputs that should
satisfy. They are linked to the expectations from the software they are also called as product
features.

• Initially users have to fill the registration form and get registered
• Registered users can login by entering valid name and password.
• Then users like teaching staff, non-teaching staff, hod can apply the leave and that leave
will go to their higher authority.
• Higher authority like HOD, Principal will view the staff leave and can accept/reject the
leave request.
• HOD can approve the leave request of teaching staff and Supervisor can approve the leave
request of non-teaching staff.
• Principal can approve the leave request of HOD.

Dept. of CS, GSC, Hassan Page 3


LEAVE MANAGEMENT SYSTEM 2022-2023

2.1.2 Non-Functional Requirements

The database management system must be scalable and void of redundancies. Access to the
database must be restricted only to authorized users and the backend servers must be accessible
only by the administrators. Other non-functional requirements related to the reliability, scalability
and response time of the system. The web-based application must be able to run on any system
with a modern HTML5 browser, should be able to handle moderately large amounts of data in
order to cater to thousand s of students simultaneously, and should respond to requests in under
1second even under heavy load.

2.2 Specific Requirements


The specific requirement for the project include the hardware and software requirements
needed to implement and use the system effectively and make full use of its capabilities.

2.2.1 Hardware Requirements


Processor : Intel® Core™ i5
RAM : 4.00GB
Hard Disk : 4GB or high

2.2.2 Software Requirements


Operating System : Windows 11
Client side (Front End) : HTML, CSS, JavaScript
Back End : MySQL, PHP.
Editor used : Visual Studio code

Dept. of CS, GSC, Hassan Page 4


LEAVE MANAGEMENT SYSTEM 2022-2023

2.2.3 Functionality

Functional requirements illustrate the internal working nature of a system and it includes:

• Allow admin, employee and principal to login using their user name and password.
• Provides the searching facilities based on various factors. Such as information of
employees, approval of leaves.
• Leave Management also manage the employee details online for leaves details, past leave
details.
• It tracks all the information of employees, approval of leaves.
• Shows the information and description of the leave balances, request leaves.
• It deals with monitoring the information and transactions of leaves.

• Editing, adding and updating of Records is improved which results in proper resource
management of Leave Management data.
• Manage the information of employee.
• Integration of all records of leaves.

Dept. of CS, GSC, Hassan Page 5


LEAVE MANAGEMENT SYSTEM 2022-2023

CHAPTER 3

IMPLEMENTATION

3.1 Frontend
Hypertext Markup Language (HTML) is the standard markup language for creating web
pages and web applications. With Cascading Style Sheets (CSS) and JavaScript, it forms a triad
of cornerstone technologies for the World Wide Web.

Web browsers receive HTML documents from a web server or from local storage and render
the documents into multimedia web pages.HTML describes the structure of a web page
semantically included cues for the appearance of the document.

HTML can embed programs written in a scripting language such as JavaScript, which affects
the behavior and content of web pages. Inclusion of CSS defines the look and layout of content.
The World Wide Web Consortium (W3C), maintainer of both the HTML and the CSS standards,
has encouraged the use of CSS over explicit presentational HTML since 1997.

Cascading Style Sheet (CSS) is a style sheet language used for describing the presentation
of a document written in a markup language like HTML. CSS is a cornerstone technology of the
World Wide Web, alongside HTML and JavaScript.

CSS is designed to enable the separation of presentation and content, including layout,
colors, and fronts. This separation can improve content accessibility, provide more flexibility and
control in the specification of presentation characteristics, enable multiple web pages to share
formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and
repetition in the structural content.

The name cascading comes from the specified priority scheme to determine which style rule
applies if more than one rule matches a particular element. This cascading priority scheme is
predictable.

Dept. of CS, GSC, Hassan Page 6


LEAVE MANAGEMENT SYSTEM 2022-2023

3.2 Backend

A Basic Introduction To PHP And MySQL

PHP is a widely used, general-purpose scripting language that was originally designed for
web development to produce dynamic web pages. For this purpose, PHP code is embedded into
the HTML source document and interpreted by a web server with a PHP processor module, which
generates the web page document.

PHP is one of the most popular server side scripting languages running today. It is used for
creating dynamic webpages that interact with the user offering customized information. PHP offers
many advantages; it is fast, stable, secure, easy to use and open source (free).

PHP code is inserted directly into the HTML that makes up a website. When a visitor comes
to the website, code is executed. Because PHP is a server side technology, the user does not need
any special browser or plug-ins to see the PHP in action.

The beauty of PHP lies in its simplicity. It is easy to understand and learn, especially for
those with backgrounds in programming such as C, JavaScript and HTML. The language is similar
to C and Perl so that anyone with a background in either C or Perl programming will feel
comfortable using and understanding PHP. PHP also runs on just about every platform including
most UNIX, Macs and Windows version.

Another key advantage of PHP is its connective abilities. PHP uses a modular system of
extensions to interface with a variety of libraries such as graphics, XML, encryption, etc. In
addition, programmer can extend PHP by writing their own extensions and compiling then into
the executable or they can create their own executable and load it using PHP’s dynamic loading
mechanism.

A huge advantage that PHP offers is its community. Since PHP is an open source project, the
PHP community is willing to share. If you’re looking for a particular script, chances are another
user has already created something similar. Check within the PHP community for availability.
Likewise, if you have created a function that others might enjoy, be sure to post the code for others.

Dept. of CS, GSC, Hassan Page 7


LEAVE MANAGEMENT SYSTEM 2022-2023

3.3 MODULE:
1. EMPLOYEE MODULE: It consist of two types of faculties

a) Teaching staff
b) Non-teaching staff

This module consist of teaching and non-teaching staff s with their name, ID etc. They can
apply for leave. Employee can send a leave application to higher authorities like HOD, Principal,
Supervisor with a reason for leave and number of days.

2. HOD MODULE:

This is the most power full module with full authority of accepting or rejecting the leave
application of the teaching employee. HOD can view the total number of leave of a particular
department for a given day. They can also enquire on the leave history of an individual staff.

3. PRINCIPAL MODULE:

In this module Principal can view the leave of the teaching and non-teaching employee.
Principal can approve the leave applied by the HOD.

4. ADMIN MODULE:

In this module admin can update and edit the detail of both teaching and non-teaching
employee.

Dept. of CS, GSC, Hassan Page 8


LEAVE MANAGEMENT SYSTEM 2022-2023

CHAPTER 4
SYSTEM DESIGN

4.1 Entity-Relationship Diagram


An entity relationship diagram (ERD) shows the relationships of entity sets stored in a
database. An entity in this context is a component of data. In other words, ER diagrams illustrate
the logical structure of databases. Data flow diagram serves two purpose.

The ER diagram for our project is as shown and depicts the following relationships.

1. Initially the staff can apply leave request.


2. Staff can see the leave calculation which means how many leaves are taken and how many
leaves are left for apply of leave.
3. Here the leave request has leave calculation for the purpose to calculate the leaves which are
taken by staff.
4. Admin can delete the staff.
5. Admin can update the leave application.

Dept. of CS, GSC, Hassan Page 9


LEAVE MANAGEMENT SYSTEM 2022-2023

Fig 4.1: ER Diagram for Leave Management System

Dept. of CS, GSC, Hassan Page 10


LEAVE MANAGEMENT SYSTEM 2022-2023

4.2 Relational Schema

Fig 4.2: Schema Diagram for Leave Management System

The above figure description:

1. The user_id of user_info is primary key and user_type, gender, branch, phone, college
are candidate keys.

2. The user_id of admin is primary key and user_type, gender, branch, phone, college are
candidate keys.

3. The leave_id and staff_id of leave_request are primary key and leave_type, start_date,
end_date, days_requested, date_applied are candidate key.

Dept. of CS, GSC, Hassan Page 11


LEAVE MANAGEMENT SYSTEM 2022-2023

4. The user_id of leave_statistics is primary key and leave_type, max_leaves,leave_taken,


remaining_leaves.

5. leave_types and no_of_days are candidate keys of leave_types.

4.3 Triggers
The MySQL trigger is a database object that is associated with a table. It will be
activated when a defined action is executed for the table. The trigger can be executed
when you run one of the following MySQL statements on the table: INSERT, DELETE
and UPDATE and it can b invoked before or after the event.

Trigger which we implemented in our project:

Triggers `staff`:

--DELIMITER $$

CREATE TRIGGER `deleteuser` AFTER DELETE ON `staff` FOR EACH ROW BEGIN

DELETE FROM leave_requests WHERE user_id =OLD.user_id;

DELETE FROM leave_calculation WHERE user_id = OLD.user_id;

END

$$

DELIMITER ;

Dept. of CS, GSC, Hassan Page 12


LEAVE MANAGEMENT SYSTEM 2022-2023

4.4 Store Procedure:


Stored Procedure. A procedure (often called a stored procedure) is a subroutine like
a subprogram in a regular computing language, stored in database. A procedure has a
name, a parameter list, and SQL statement(s). All most all relational database system
supports stored procedure, MySQL 5 introduce stored procedure.

The CALL statements invokes a store procedure that was defined previously with
create procedure.

DELIMITER $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `selectuser` (IN `$user_id`


VARCHAR(20)) BEGIN

SELECT user_id FROM lms.leave_calculation lc WHERE lc.user_id = '".$user_id."';

END$$

DELIMITER ;

Dept. of CS, GSC, Hassan Page 13


LEAVE MANAGEMENT SYSTEM 2022-2023

CHAPTER 5
INTERPRETATION OF RESULTS

Home

Fig 5.1: Home page.

This is the main page of the Leave Management .This intercepts the visitor and
allows him to choose an action from the navigation bar and redirects him to that
page.

Dept. of CS, GSC, Hassan Page 14


LEAVE MANAGEMENT SYSTEM 2022-2023

User Register

Fig 5.2: Register page

This page allows a new user to register himself to the website and login with the
given credentials.

Query: $sql = “INSERT INTO user_info values (‘$name’, ‘$user_id’, ‘$gender’,


‘$phone’, ‘$branch’, ‘$college’, ‘$password’, ‘$user_type’)”;

Dept. of CS, GSC, Hassan Page 15


LEAVE MANAGEMENT SYSTEM 2022-2023

Login page

Fig 5.3: Login Page

This page allows the user to login with the user’s registered user id and password.

While logging in if the given credentials matches with the database then it logins
successfully else it gives an error as “Wrong Username/Password”

Query: $query = “SELECT*FROM user_info WHERE user_id=’$username’ AND


password=’$password’;

Dept. of CS, GSC, Hassan Page 16


LEAVE MANAGEMENT SYSTEM 2022-2023

Apply Leave

Fig 5.4: Apply Leave page.

This page is used to apply leave for both teaching and non-teaching staffs.

Functionalities:
• The user should not apply leave on the same date
• The user should not apply in between the days that user has already applied.
• The user cannot apply leave from past date.
• Start Date should be lesser than End Date.

Query: $sql = “INSERT INTO leave requests(staff_id, leave_type, start_date, end_date,


days_requested, date applied, leave_status) values(‘$user_id’, ‘$staff_leave’, ‘$s_date’,
‘$d_req’, ‘$d_app’, ‘Pending’)”;

Dept. of CS, GSC, Hassan Page 17


LEAVE MANAGEMENT SYSTEM 2022-2023

Leave Status

Fig 5.6: Applied leave status page.

This page is used to view the applied leave status to check whether the leave is applied or
not.

Query: $sql = “SELECT * FROM leave_requests WHERE staff_id = ‘$user_id’ AND


leave_status = ‘Pending’ ”;

Dept. of CS, GSC, Hassan Page 18


LEAVE MANAGEMENT SYSTEM 2022-2023

Leave History

Fig 5.5: Leave History page

This page gives the complete history of the staff’s previous applied leaves.

Query: $sql = “SELECT * FROM leave_requests WHERE leave_type =’

”.$result[‘leave_type’]” ’ AND staff_id = ‘$user_id’ AND leave_status = ‘Accepted’ ”;

Dept. of CS, GSC, Hassan Page 19


LEAVE MANAGEMENT SYSTEM 2022-2023

View Profile

Fig 5.7: View Profile Page


This page is used to view the personal information of the user and to see how many leaves
are taken and how many remaining leave are there for that particular staff.

Query1: $sql = “SELECT name,gender,phone_no,branch,college FROM user_info


WHERE user_id = ‘$user_id’ ”;

Query2: $query = “SELECT * FROM leave_types”;

Query3: $leave_request_query = “SELECT * FROM leave_requests WHERE leave_type=



“$result[‘leave_type’].” ’ AND staff_id = ‘$user_id’ AND leave_status = ‘Accepted’”;

Dept. of CS, GSC, Hassan Page 20


LEAVE MANAGEMENT SYSTEM 2022-2023

View Requests

Fig 5.8: View leave request for admin page.


This page is used by Admin to see how many leave requests are received from teaching
staff and non-teaching staff. Admin can accept/reject the leave applied by the staff.

Functionalities:
• When no of applied leaves is less than or equal to total number of remaining days
then the system accepts the users leave request.
• When the user requests the multiple leaves for the same number of days and for the
same leave type with different dates. Even if the admin accepts all the leave request
for the particular user unknowingly, the system will only accept the leave requests
if the number of days is less than or equal to remaining days.

Query: $sql = “SELECT * FROM leave_requests WHERE leave_status = ‘pending’ ”;

Dept. of CS, GSC, Hassan Page 21


LEAVE MANAGEMENT SYSTEM 2022-2023

Staff details

Fig 5.9: Staff details

This page is used by HOD/Admin to search for the leave history of the teaching staff and
non teaching staff.

Functionalities:

The Admin/HOD can blindly accept or reject leave request or the Admin/HOD can
even check the details of employee before accepting or rejecting the request i.e
HOD can view employee’s leave history or employee’s leave status.

Query: $sql = “SELECT * FROM user_info WHERE NOT user_type = ‘admin’ ”;

Dept. of CS, GSC, Hassan Page 22


LEAVE MANAGEMENT SYSTEM 2022-2023

View Leave Request

Fig 5.9.1: Leave history


This page is used by admin which displays all the history of leaves submitted by staff.

Query: $sql = “SELECT * FROM leave_requests WHERE staff_id = ‘$user_id’ AND NOT
leave_status = ‘Pending’ ”;

Dept. of CS, GSC, Hassan Page 23


LEAVE MANAGEMENT SYSTEM 2022-2023

View Leave Balance

Fig 5.9.2: View Leave Balance

This page is used by admin which displays the leave balance of particular staff.

Query1: $sql = “SELECT * FROM leave_types”;

Query2:
$leave_request_query = “SELECT * FROM leave_requests WHERE leave_type= ‘
“$request[‘leave_type’].” ’ AND staff_id = ‘$user_id’ AND leave_status = ‘Accepted’ ”;

Dept. of CS, GSC, Hassan Page 24


LEAVE MANAGEMENT SYSTEM 2022-2023

Delete Staff

Fig 5.10: Delete staff.


This page is used by admin to delete the existing staffs.

Query: $sql = “DELETE FROM user_info WHERE name = ‘$name’ ”;

Dept. of CS, GSC, Hassan Page 25


LEAVE MANAGEMENT SYSTEM 2022-2023

CONCLUSION

Leave management system is very useful for college to maintain the leave
records of the teaching and non-teaching employees. This system not only maintains the
leave details of the staff, it also maintains the leave applications of the staffs. The higher
authorities may accept or reject the leave applications requested by the staff. Thus this
system maintains the excess amount of job done by college to maintain the leaves. All
this features are included in this web application. The project greatly helped in
understanding the various phases in website development and exposure to a new
developer platform MS visual studio.Net and database MySQL Server.

Dept. of CS, GSC, Hassan Page 26


LEAVE MANAGEMENT SYSTEM 2022-2023

REFERENCES
• ElmasriRamez, Navathe Shamkanth: Fundamentals of Database Systems 7th edition.

• Ramakrishnan, Gehrke: Database Management System 3rd Edition.

• HTML introduction ‘Introduction to HTML, Introduction to Web Programming’.


Available: https://www.w3schools.com/html/html_css.asp

• PHP introduction, ‘Introduction to’. Available: https://www.w3schools.com/php/

• SQL introduction, ‘Introduction to SQL, Database Management’. Available:


https://www.w3schools.com/sql/

Dept. of CS, GSC, Hassan Page 27

You might also like