0% found this document useful (0 votes)
18 views51 pages

A Web Based Leave System For Effective F

Uploaded by

Subham Pande
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views51 pages

A Web Based Leave System For Effective F

Uploaded by

Subham Pande
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

ABSTRACT

Employee leave management systems bring together a variety of procedures and technologies
to automate and simplify the management of employee data, leave requests, and leave grants.
In many institutions, employees are entitled to several sorts of leave, which are awarded in
accordance with the institution's policies. The administrative department is primarily in
charge of managing and approving leave requests. To this purpose, most institutions followed
the standard procedure for requesting, granting, and managing leave.

In the traditional procedure, leave is requested manually by writing a letter to the department
head. The department head takes notes and sends the request to higher-ups for approval. This
method is time-consuming, prone to error, necessitates more paper work, and is difficult to
manage. As a result, an automated leave management system that is speedier, error-free,
requires less paperwork, and is simple to manage is required. The system was created
utilizing a three-tier software architecture approach to provide an automated employee leave
management system. CSS, JS, HTML, MySQL, and PHP are among the web-based
technologies used to create the system. The system's general functioning indicates that it
functions satisfactorily, and the results indicate that it is error-free, speedier, and allows
employees to request leave in a timely manner. As a result, the Ghana Post Company
Limited's human resource department may use the system to handle employee leave more
effectively and efficiently.
TABLE OF CONTENTS

DECLARATION.......................................................................................................................i
DEDICATION..........................................................................................................................ii
ACKNOWLEDGEMENTS...................................................................................................iii
ABSTRACT.............................................................................................................................iv
TABLE OF CONTENTS.........................................................................................................v
LIST OF FIGURES..............................................................................................................viii
CHAPTER ONE.......................................................................................................................1
INTRODUCTION....................................................................................................................1
1.0 BACKGROUND TO THE STUDY................................................................................1
1.1 OVERVIEW OF SUBJECT AREA.................................................................................1
1.2 PROBLEM STATEMENT..............................................................................................2
1.3 SIGNIFICANCE OF THE STUDY.................................................................................3
1.4 GENERAL OBJECTIVES OF THE STUDY..................................................................3
1.5 SPECIFIC OBJECTIVES OF THE STUDY...................................................................3
1.6 PROJECT BENEFITS......................................................................................................3
1.7 ORGANIZATION OF THE STUDY..............................................................................4
1.8 CONCLUSION................................................................................................................4
CHAPTER TWO.....................................................................................................................5
LITERATURE REVIEW........................................................................................................5
2.0 INTRODUCTION............................................................................................................5
2.1 LEAVE OVERVIEW.......................................................................................................5
2.1.1 Classification of leave................................................................................................5
2.1.2 Types of leave............................................................................................................5
2.1.3 Leave management....................................................................................................6
2.1.4 Web-based Leave Management System....................................................................6
2.2 TECHNOLOGIES............................................................................................................7
2.3 CURRENT RESEARCH ISSUES...................................................................................7
2.4 HIGHLIGHTS OF SIMILAR IMPLEMENTATIONS FROM VENDORS...................8
2.5 REVIEW OF EXISTING WEB-BASED LEAVE MANAGEMENT SYSTEMS..........8
2.5.1 e-HRMS.....................................................................................................................8
2.5.2 e-Management Solution System................................................................................9
2.5.3 SCTCS Leave..........................................................................................................10
2.5.4 BMS Leave Management System............................................................................10
2.5.5 JustLogin eLeave.....................................................................................................11
2.6 BENEFITS AND CHALLENGES OF LEAVE MANAGEMENT SYSTEMS...........12
2.6.1 Benefits of leave management systems...................................................................12
2.6.2 Challenges of leave management systems...............................................................12
2.7 SUMMARY...................................................................................................................13
CHAPTER THREE...............................................................................................................14
PROJECT METHODOLOGY.............................................................................................14
3.0 INTRODUCTION..........................................................................................................14
3.1 DEVELOPMENT METHODOLOGY..........................................................................14
3.2 CASE STUDY AREA....................................................................................................15
3.3 OVERVIEW OF PROPOSED SYSTEM......................................................................15
3.4 DEVELOPMENT TOOLS.............................................................................................15
3.5 SUMMARY...................................................................................................................17
CHAPTER FOUR..................................................................................................................18
SYSTEMS ANALYSIS AND DESIGN................................................................................18
4.0 INTRODUCTION..........................................................................................................18
4.1 REQUIREMENT SPECIFICATION.............................................................................18
4.1.1 Functional Requirements.........................................................................................18
4.1.2 Non-functional Requirements..................................................................................18
4.1.3 Use Case Modelling.................................................................................................19
4.1.4 Sequence Diagrams..................................................................................................21
4.2 DATABASE DESIGN...................................................................................................24
4.2.1 Entity Relationship Diagram...................................................................................24
4.2.2 Normalization..........................................................................................................25
4.3 USER INTERFACE DESIGN.......................................................................................25
CHAPTER FIVE....................................................................................................................27
SYSTEMS IMPLEMENTATION........................................................................................27
5.0 INTRODUCTION..........................................................................................................27
5.1 MAPPING LOGICAL DESIGN ONTO PHYSICAL PLATFORM.............................27
5.1.1 Administrator:..........................................................................................................27
5.1.2 HR Manager:............................................................................................................28
5.1.3 Employee:................................................................................................................28
5.2 CONSTRUCTION.........................................................................................................29
5.2.1 Screenshots of the various Interfaces of the Leave Management System...............29
5.3 TESTING OF PROGRAM.............................................................................................31
5.3.1 Unit Testing.............................................................................................................31
5.3.2 System Testing.........................................................................................................31
5.3.3 Results......................................................................................................................32
5.3.4: System Operations..................................................................................................32
5.4 EVALUATION OF THE PROJECT.............................................................................33
CHAPTER SIX.......................................................................................................................34
FINDINGS AND CONCLUSION........................................................................................34
6.0 INTRODUCTION..........................................................................................................34
6.1 SUMMARY OF PROBLEMS.......................................................................................34
6.2 ACHIEVEMENTS AND CHALLENGES....................................................................34
6.2.1 Achievements...........................................................................................................34
6.2.2 Challenges................................................................................................................34
6.3 RECOMMENDATIONS...............................................................................................35
6.4 FUTURE WORK...........................................................................................................35
6.5 CONCLUSION..............................................................................................................35
REFERENCES.......................................................................................................................37
APPENDIX.............................................................................................................................39
LIST OF FIGURES

Figure 3.1: Water Model Diagram...........................................................................................14


Figure 4.1: Flowchart of System..............................................................................................19
Figure 4.2: Use Case Diagram for the Proposed System Users...............................................20
Figure 4.3: Sequence Diagram for Employee Login...............................................................21
Figure 4.4: Sequence Diagram for Administrator Login.........................................................22
Figure 4.5: Sequence Diagram for Adding Employee.............................................................23
Figure 4.6: ER diagram for employee leave management system...........................................25
Figure 5.1: Add employee screen.............................................................................................27
Figure 5.2: Leave status of employees.....................................................................................28
Figure 5.3: Employee login screen...........................................................................................28
Figure 5.4: Administrator screen..............................................................................................29
Figure 5.5: HR Manager screen...............................................................................................29
Figure 5.6: Leave application form..........................................................................................30
Figure 5.7: Leave report...........................................................................................................30
Figure 5.8: Database structure..................................................................................................31
CHAPTER ONE

INTRODUCTION

1.0 BACKGROUND TO THE STUDY

Employee leave is an integral part of every organization. Part IV of the Labour Act of 2003
governs leave management in Ghana (Act 651). After twelve months of continuous service, a
worker is entitled to at least fifteen working days of fully paid yearly leave under sections 20
and 27 of the Labour Act. Employers must keep a record of the following information: the
date of employment of each employee and the duration of the annual leave to which the
employee is entitled; the dates on which each employee takes the annual leave; and the
remuneration received by each employee for the annual leave.

Varied firms in Ghana have different procedures for managing leave; nonetheless, these
policies must correspond to the labor act laws of 2003.

A proactive leave policy may also assist to protect an organization's interests; for example,
one study found that a one percent (1%) rise in absenteeism is comparable to a one percent
(1%) increase in compensation costs (Nikolay et al.,2012).

The traditional method of requesting and managing leave is still in use at Ghana Post. Staff
must manually write and submit leave applications to the administrative department via the
postal manager using this method. The postal manager takes notes and forwards the request
to the highest-ranking officials, who approve or deny it. This strategy is time consuming,
prone to error, necessitates extra paper work, and is difficult to keep up with.

As a result, an automated system that is fast, error-free, paperless, and simple to manage is
required.

1.1 OVERVIEW OF SUBJECT AREA

The concept of leave in labor law refers to an authorized extended absence from work for any
reason approved by the employer.

All records of leave taken by an employee in accordance with the company's leave policy are
kept by leave management.
A leave management system is a web-based tool that allows employees and management to
apply for, appropriately allocate, track, and issue leave (Chugh, 2014). This system can be
used to automate the process of submitting and accepting leave applications.

A company's human resources department performs an important function. It has the ability
to manage an organization's most valuable and vital assets. Without a well operating human
resources department, a company will fail to reach high levels of efficiency and labor force
management.

Human resources is responsible for hiring, training, promoting, firing, preserving records,
managing employee leave, and complying with other regulatory requirements. (Anthony and
colleagues, 1999) It is an important part of the human resources department's job to keep and
manage all of the employees' leave data, which must be kept up to date and accessible at all
times. When all of the labor is done manually, keeping track of these documents becomes
extremely challenging for the human resources department.

This necessitates a significant amount of paperwork. It has numerous challenges in manually


managing a large amount of data and keeping track of employee performance, personal data,
and, in particular, information on the number of vacation days taken by an employee in
accordance with corporate policy.

As a result, in this fast-paced technological era, it is critical for a large organization like
Ghana Post to automate their employee leave record keeping system in order to make the
human resources department more efficient and allow them to focus on the most important
functions, such as organizational development.

1.2 PROBLEM STATEMENT

The leave management system in Ghana post is currently manual and requires a lot of time
and paperwork, which creates a barrier to work efficiency.

Employees who want to “take leave” requests for a leave application form. The application is
presented to the line manager to fill his portion and then presented to the district manager,
who minutes and forward the request to the approving authority (Regional Office), who will
grant or reject the request.
However, because it is prone to delays and excessive paperwork, this technique of managing
leave using a leave application form is not capable of achieving a high level of leave
management and making effective employee-based decisions.

Furthermore, data is saved in files alphabetically by year or by staff name under the existing
manual filing method. It will take time to find the information needed in a timely manner
because the staff will have to search for each file one by one, which will take a long time.

Furthermore, the manual file system has no backup, and if the information files are lost or
damaged, the Ghana Post staff will lose all of their valuable data.

1.3 SIGNIFICANCE OF THE STUDY

The project's goal is to raise awareness of the present platform's flaws in the process and
management of leave applications, as well as its negative effects on employees and managers,
while simultaneously building an effective system to make applying for leave simple and
convenient.

1.4 GENERAL OBJECTIVES OF THE STUDY

The aim of the project is to design and develop a web-based system that will handle the leave
system.

1.5 SPECIFIC OBJECTIVES OF THE STUDY

The specific objectives of the study include:

 Review the existing leave management system


 To automate the leave management system of Ghana post that intelligently adapts to
Human resources policy of the organization
 To create a platform where employees can apply for leave
 To help human resource department keep track of leave applications and leave type
 To build a system that can be accessed by users at their own convenience and will
also enable higher staff in-charge of leave approvals and disapprovals get notified of
leave applications.

1.6 PROJECT BENEFITS

Benefits would be gained in terms of:

 Time spent looking for information on employees leave history will be reduced.
 Enhancing Speed and processing of Leave Applications
 Provide Centralized management of leave applications
By centralizing the management and administration for employee leave processing,
any information needed can be found easily, and the integrity of information would
always be preserved.

1.7 ORGANIZATION OF THE STUDY

The organization of the project will be done in six chapters:

Chapter one provides the project background description of the study, an overview of subject
area, the statement of research problem, the significance, aims and objectives of the study, the
project benefits and organization of the work and chapters outlined.

Chapter two will cover a review of related literature on the employee leave management
system, past and present technologies, current research issues, review of existing
implementations, benefits and challenges of implementations

Chapter three will look at the methodology that will be employed, the case study area, an
overview of proposed system and the development tools.

Chapter four comprises of the requirements capture and specification. It basically covers the
data collection, and data analysis as well as the software design

Chapter five covers the implementation of the system designed as well as testing the system.

Chapter six and final will present a summary of the findings, achievements, challenges,
conclusions and recommendations for future studies.

1.8 CONCLUSION

At the end of the study, the aim is to have a web-based employee leave system for Ghana
Post that will be the platform where administration controls and manage the leave system of
the organization. They will further be able to manage information of the employees.
Employees will also be able to apply for leave at their own convenience and keep track of
their applications.
CHAPTER TWO

LITERATURE REVIEW

2.0 INTRODUCTION

Because this project primarily focuses on upgrading an existing system, the literature
evaluation aims to identify the system's drawbacks and, as a result, to seek ways to improve
it, as well as to decide whether the existing system and development tools can still be
employed. New features and functions are also investigated in order to compare and absorb
them in order to improve the system's efficiency and effectiveness.

2.1 LEAVE OVERVIEW

The term "leave" refers to a time off from work that has been granted by the employer. It is a
period of time during which an employee must be absent from his or her primary
employment but yet keeping employee status. Vacations, holidays, interludes, and "working
from home" programs, on the other hand, are treated as extraordinary circumstances rather
than advantages. In most cases, such a contract has a predetermined end date or event. Before
an employee may use vacation time, they must first earn it.

2.1.1 Classification of leave

The two main classes of leave are; paid and unpaid leave.

 Paid leave is when an employee is permitted to leave the job but continues to be paid
during that time. Paid vacation is typically provided at the request of the employer or
in accordance with a legislative or contractual requirement.
 Unpaid leave: Unpaid leaves are usually taken at the request of the employee or as a
result of alleged employee misconduct. A leave of absence may be sought by an em-
ployee for a variety of reasons, including active duty call-up for reserve military per-
sonnel or to respond to the employee's or a family member's health requirements.

2.1.2 Types of leave

 Annual leave: The total number of vacation days that an employee is entitled to each
year. It does not include Sundays or public holidays that have been declared by the
government. Various numbers of days may be offered depending on the employer's
policy, and the employee may be compelled to give a particular period of notice. An
employee is only permitted to take earned leave once each calendar year, and it must
be for a period of less than 30 days. To be eligible for this sort of leave, an employee
must have worked for at least one (1) year continuously. Unless otherwise specified,
annual leave is usually paid. Leave pay is usually equal to the monthly wage in most
institutions.
 Medical Leave: For a duration of not more than two (2) months, leave on medical
grounds may be granted. An employee must have worked for at least one year in order
to be eligible for this form of leave.
 Maternity Leave: Depending on the policies of the firm, an employee may be
awarded maternity leave by the competent authority. Traditionally, women have been
entitled to maternity leave for two reasons:
 To provide mothers time to recover and rest from the physical, mental, and
emotional toll of childbirth.
 To allow mothers to spend quality time with their new baby.
 Study Leave: This is paid time off taken for the purpose of studying or taking exams.
In terms of length, this varies each institution. It's also paid for and has no bearing on
annual leave days or monthly salary.
 Casual Leave: If authorized for under the employment contract, this is a sort of brief
leave that can be taken to attend to personal concerns. These days are usually sub-
tracted from the previously mentioned accumulated yearly leave days.
 Leave disembarkation: An employee who has completed their course outside of the
country is eligible for this form of leave. When such an employee returns, he or she is
given ten (10) working days.

2.1.3 Leave management

All records of leave taken by an employee in accordance with the company's leave policy are
stored. This is known as leave management. Many organizations now provide paid leave
plans to employees as a method to combine personal time, vacation, holiday, floating
holidays, and other paid leave as today's employee work schedules become more flexible.
Seniority, job classification, or union or federal employee regulations are frequently used to
determine leave policy.

2.1.4 Web-based Leave Management System


The automation of a conventional leave management system is called web-based leave
management. A web-based Leave System is a sophisticated online leave management system
that allows users to apply for leave from anywhere at any time, and is developed with online
leave approval features, making every leave application a snap for both those applying and
those approving. 2007 (Sin)

2.2 TECHNOLOGIES

Paper is a wasteful form of communication. It's difficult to keep up with, and information on
one piece of paper isn't always easy to connect to information on other pieces of paper. It's
challenging to keep track of all of the data that comes into our lives on a daily basis. Paper
costs climb every year as well. The price of cellulose used to create paper is skyrocketing as
environmental concerns grow and fewer trees are harvested. Every day, new and inventive
techniques to convey information at drastically reduced costs are discovered.

Nanotechnology, optical storage, virtual reality, and interactive real-time work and play
settings are all available today thanks to the communication industry. The Generic office is
one of these developing workplaces, designed to use technology to meet humans' daily
requirements for more efficient and effective information access. The changing office
environment's objective is to offer individuals with the technology and management tools
they need to work smarter. The leave management system arose from a standard office
setting, where it acts as an integrated workspace that allows office chores and duties to be
completed with ease and efficiency. Users can apply for leave quickly and conveniently using
this system, which eliminates the need for paper documentation.

2.3 CURRENT RESEARCH ISSUES

Security: Virus infection can cause significant damage to data, programs, and system files, so
virus checkers must be updated on a regular basis to protect against new infections.

Maintenance and training: Implementation teams are tasked with bringing about change or
introducing new concepts, which is a difficult process. Though it is true that new ideas are
constantly met with opposition, the key is to correctly describe the idea so that the opposing
party can see reason.

Hardware and software requirements: If ancient versions of operating systems are used, as
well as inadequately powerful modern hardware, the system may not function properly.
Using the internet or the World Wide Web, there is a need make sure the lab going to be used
is connected to the outside networks and that the setup is sturdy and stable enough to handle
multiple employees accessing external sources at the same time.

2.4 HIGHLIGHTS OF SIMILAR IMPLEMENTATIONS FROM VENDORS

There are several literatures on leave management systems; Hridita, et al., (2018) documents
an internship report on leave management systems, but only a few elements of the system
were described due to time constraints, organizational data confidentiality, and resource
constraints. Mishal et al., (2017) created an intranet-based leave management system that can
be used by employees within a company. The system can be used to request, authorize, and
produce leave reports, but only for intranet-based activities. Manish et al., (2015) created a
leave and pay roll management system that allows for leave request submission, history
viewing, and approval/rejection.

Rushitha et al.,(2019) developed an android-based leave management system for managing


employee leave requests and approval/rejection. Although the system is capable of properly
managing staff leave, it is limited to the Android operating system and hence cannot be
utilized as a web-based application. Isaac et al., (2018) created a prototype of a cloud-based
personnel management information system for African small and medium businesses, which
included four modules: leave management, payroll administration, employee appraisal, and
record management. Despite the fact that the system was supposed to cover every aspect of
human resources in African small and medium businesses, only a prototype of the proposed
system was produced at the time of this study. Vibrant et al., (2017) created an intranet-based
student leave management system that automates the approval and rejection of leave requests.
In the Nigerian university system, Stephen et al. (2018) developed an algorithm for
scheduling leave for academic employees. The system determines the staff mix by rank and
the lecture-to-student ratio before delivering services.

2.5 REVIEW OF EXISTING WEB-BASED LEAVE MANAGEMENT SYSTEMS

Various web-based Leave Management Systems have been developed to make applying for
leave easier in a variety of enterprises, organizations, and domains. A few of these systems
are listed below:

2.5.1 e-HRMS
Malaysia's e-HRMS, powered by CNL HR Solutions, was created in 2011. It's an online
leave management system that lets users apply for leave whenever and wherever they choose,
as long as they have access to the internet. It was created with auto-routing for approval and
different online leave management tools in mind to make application and approval as simple
as possible (CNL HR Solutions Sdn Bhd., 2011) Users may simply verify, apply, and manage
their leaves using the e-HRMS system's many easy-to-use capabilities.

It possesses the following characteristics:

 Employee Self-Service (ESS): Allows employees and department managers to man-


age their own leave information, allowing for greater communication with HR.
 Calculate leave entitlement automatically: e-Leave will determine each employee's
leave entitlement based on their date of hire, group, and service year.
 Employees can quickly check their leave balance online without having to go through
HR professionals or a leave administrator.
 Create as many records as you want: Create as many records as you like for employee
profiles, leave types, approval groups, and other things.
 Approval processes for multi-levels are as follows: Each group has up to five layers of
leave approvers/supervisors.
 E-mail approval and notification: Supervisors can approve or reject leave requests via
e-mail. Employees will be advised of their leave application status by e-mail.
 Calendar view to see "Who's on leave": Calendar View has a user-friendly interface.

2.5.2 e-Management Solution System

Info-tech Systems Integrators Pte Ltd, Singapore, developed an electronic leave management
system in 2012. It's a web-based Leave Management System that streamlines HR-to-
employee communication and makes managing employee leave simple and efficient.
Employees can use this technology to quickly establish their vacation availability (at any
time) and request time off online. Managers no longer have to deal with paper trails when it
comes to leave permission. All leaves taken and leave requests are carefully maintained via e-
leave, where anyone can apply for and examine leave records without the inconvenience and
delay of going through the administrative staff - it's all at your fingertips with anytime,
anywhere access. Info-Tech Systems Integrators Pte Ltd. (Info-Tech Systems Integrators Pte
Ltd., 2012)

The following are some of the system's advantages:


 Manages e-Leave for a variety of businesses.
 Customizable leave type/entitlement
 Customizable holiday calendar
 Easy administration
 Mini-HR Management Module (capture Employee's Personal and Basic Employment
Information)
 Different sorts of access levels can be specified for different authorizing officers
 It supports two-level leave approval
 It allows you to submit an application and receive approval from anywhere in the
world, and it also offers email notifications.

2.5.3 SCTCS Leave

The Faculty of Information and Communication Technology at South Carolina Technical


College in the United States of America built and deployed an electronic leave management
system in 2011. It was created for college employees to make applying for leave simple and
quick. This electronic leave system also allows users to see who is on leave at the college and
manage leave policies. 2011 (SC Technical College System).

The following are some of the system's features:

 Leave application and approval anywhere and at any time.


 Single sign-on.
 Payroll and timekeeping software
 Information retrieval and updating in real time.
 Leave planning.
 Notification through email.

2.5.4 BMS Leave Management System

IBASE Technology Pte Ltd, Singapore, created this leave management system in 2005. The
BMS Leave Management System (LMS) is a user-friendly and effective web-based tool that
replaces the previous LMS from 1999. The new LMS improves communication between HR
and individual employees and provides a simple yet effective approach for managing all
employee leave issues. At the same time, the LMS ensures that all leave requests and
applications are accurately accounted for, allowing employees to apply for, approve, and
view leave records without having to go through admin staff – it's all done with a few mouse
clicks, anytime, anywhere with broadband Internet access (Ibase technology private limited,
2005). Any Windows-based computer (or PC notebook) that can run Microsoft Internet
Explorer 5.5 or above on any broadband connection meets the minimum system requirements
(512Kbps and above).

The following are some of the advantages of the BMS leave management system:

 Single sign-on.
 Integrates with human resources.
 Time and payroll system.
 Information in real time
 Simple to use

2.5.5 JustLogin eLeave

The Electronic Leave Management system by JustLogin Limited is a prominent system for
managing leave inside an enterprise. JustLogin is a leading Software-as-a-Service (SaaS)
provider for the global corporate community, providing a portfolio of HR and office
collaboration solutions (JustLogin Pte Ltd, 1999). With its sophisticated features, the
JustLogin program eliminates physical moves and allows managers to get a bird's eye view of
a company's leave status and make quick approval decisions. The system flow for this
electronic leave application is as follows: users submit their leave applications to the
approving officer via the e-leave system, the officer approves or rejects the leave request, and
the user receives an email notification. This electronic leave system also allows users to
check the business calendar to see who is currently on leave. Furthermore, this e-leave system
could manage the leave policies of several organizations in various countries, with each
company being able to customize the leave policies to suit its own policies. Leave records
could also be exported to any backend system (JustLogin Pte Ltd, 2010).

The leave management system has the following features:

 Without the need for papers, you can apply for leave online.
 Notifications to the approving officer and applicants through email.
 Leave approval using regular email rather than logging in.
 Both the applicant and the approving officer have access to the applicant's complete
leave history and the approving officer's approval history.
 Once applications are approved, leave records are automatically updated.
 Printing or generating reports from leave records is possible.
 Any backend system can be used to export leave records.
 Allows for "extraordinary instances" in HR policies, such as individual special leave
entitlement.
 Delegation, block leave, document tracking, and leave adjustment are some of the
more advanced features.
 A bird's eye perspective of who's on leave is provided by the leave calendar.

2.6 BENEFITS AND CHALLENGES OF LEAVE MANAGEMENT SYSTEMS

2.6.1 Benefits of leave management systems

Nowadays, more individuals choose to do things online because it is easier, faster, and more
secure. There are numerous benefits to applying for leave online. This includes the following:

 Employees can apply from anywhere as long as they have access to the internet.
 Communication is improved.
 Processing time is short: It allows managers to get all leave requests as soon as they
are submitted, allowing them to respond to requests more quickly.
 Save Cost and paperwork is eliminated: Employees can apply for leave electronically,
which is a paperless and environmentally responsible technique. As a result, the cost
of obtaining paperwork for leave applications is avoided.
 Save Time: Employees can receive approval or denial of their leave request more
quickly when they use online applications. Employees will save time because they
will not have to wait for an administrator to manually process their leave request.

2.6.2 Challenges of leave management systems

 A multi-faceted challenge: Although leave management is only one of many functions


that an HR is responsible for, it consumes a significant amount of time. It's a multi-
faceted challenge to ensure the availability of resources to ensure business continuity
in the absence of an employee while also devising means and methods to improve em-
ployee satisfaction. These elements, on the other hand, define an organization's sur-
vival and growth and must be handled with care.
 Tracking leave: Knowing who is entitled to what and when is another problem in
leave management. Vacation time is calculated differently in different workplaces.
Organizations have varying policies regarding certain types of leaves, as well as their
own internal policies to adhere to, as well as government-imposed external laws.
Some leave tracking systems are superior to others. When you track time off by hand
or in Excel spreadsheets, you'll have to manually update the files. Time off may be
calculated incorrectly if something is entered incorrectly.
 Employee System Management: Managing an organization's employee system re-
quires a disciplined framework. It necessitates the organization's use of a single, all-
encompassing strategy divided into relevant portions and areas of responsibility. At
various levels of management, the contracting, estimation, development, and exami-
nation processes must be thoroughly understood and used.
 Payroll mistakes: Leave management has an impact on payroll. Some leaves are com-
pensated, while others are not. Employees may be offered both paid and unpaid leave
under the same category, depending on the policies of the company. In this case, there
is certainly room for error. Because there is no connectivity between the organiza-
tion's human resources information system and the leave management system, if no
one alerts the person in charge of payroll, they may not sufficiently reward the indi-
vidual.
 Employee Perplexity: Employees may be unsure of how their vacation time is calcu-
lated. Employees may not know what they're entitled to or how much time they've
used, which is one of the most serious issues in leave management.

2.7 SUMMARY

Because of the shortcomings of previous research, this study proposes an employee leave
management system that is specifically designed for managing staff leave with simplicity,
convenience, and ease of use for both management and employees. The system improves
staff management, maintains accuracy, and openness, and emphasizes the need for advanced
technology to be integrated into employee records and welfare management.
CHAPTER THREE

PROJECT METHODOLOGY

3.0 INTRODUCTION

This chapter looks at the methodology used for the study. It communicates in details, how the
study was done. This section discusses the development methodology, case study area,
proposed system, and development tools.

3.1 DEVELOPMENT METHODOLOGY

The project was carried out linearly. Each stage of the project from conception to deployment
was carefully planned and completed before going on to the next stage. The waterfall model
was the most appropriate methodology for this project.

The waterfall which is the first process model to be introduced goes according to a linear-
sequential life cycle. Below is the waterfall model diagram;

Figure 3.1: Water Model Diagram


This methodology was chosen because it is very simple to understand and follow. It also
works very well for mini projects such as this one where all the requirements are very well
understood. Using this methodology one can easily measure progress as they go along.
3.2 CASE STUDY AREA

The study adopted a case study design. Case study is an empirical enquiry that investigates a
contemporary phenomenon within its real-life context. The study focused on Ghana Post
Company Limited. Case study design was adopted because it enabled us to query on how and
why questions, which focused on contemporary, rather than historic information.

3.3 OVERVIEW OF PROPOSED SYSTEM

In light of the issues stated in the problem statement with employee leave management, an
automated leave management is the proposed system. This is a web based system that
handles all the processes that are involved in the management of employee leaves. The
proposed system will be initiated if an employee fills up the leave request form and submits
it. The system will verify the eligibilities of the employee for the type of leave applied for. If
the employee is eligible then the information will be added to the pending leave list. If more
than one employee requests for the same type of leave, the system will use the employee
priority to sort the pending leave list. However, the proposed system will make available
reports, which will provide the leave status of a branch.

3.4 DEVELOPMENT TOOLS

The leave management system was implemented using Hypertext Pre-processor (PHP),
Hypertext Markup Language (HTML), JavaScript and Cascading Style Sheet (CSS).

The front-end technologies are:

1. HTML (HTML5)
HyperText Markup Language (HTML) is a computer language devised which allow
website creation. It is the HTML code that provides an overall framework of how the
site will look. These websites can then be viewed by anyone else connected to the
Internet (Shannon, n.d.).
2. JavaScript (JavaScript 1.8)
JavaScript is an event-based imperative language that is used to transform a static
HTML page into a dynamic interface. Some of the dynamic behaviour that can be
generated by JavaScript are the following: can change html content; can change html
attributes; can change html styles (CSS); and can validate data (Anonymous, n.d.).
3. CSS (CSS3)
Cascading Style Sheets (CSS) is a style sheet language used to describe presentation
and layout of HTML tags. It controls the presentation aspect of the site and allows
your site to have its own unique look. It does this by maintaining style sheets, which
sit on top of other style rules and are triggered based on other inputs, such as device
screen size and resolution (Anonymous, 2021).
4. jQuery (jQuery 2.1.4)
jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML
document traversal and manipulation, event handling, animation, and Ajax much
simpler with an easy-to use application programming interface (API) that works
across a multitude of browsers. With a combination of versatility and extensibility,
jQuery has changed the way that millions of people write JavaScript (JSF, n.d.).
5. Materialize CSS is a UI component library which is created with CSS, JavaScript and
HTML. It is created and designed by Google. Materialize CSS is also known as
Material Design. It is a design language which combines the classic principles of
successful design along with innovation and technology. Google's goal is to develop a
system of design that allows for a unified user experience across all their products on
any platform. It is used to construct attractive, consistent, and functional web pages
and web apps while adhering to modern web design principles such as browser
portability, device independence, and graceful degradation. (Anonymous, n.d.).

The following are back-end technologies used:

6. PHP (PHP 5.6.9)


Hypertext Preprocessor (PHP) is a server side web programming language that can be
embedded into HTML. It is used for creating dynamic web pages that interact with
the user and can include functionalities such as getting user input, manipulation of the
input and storage of this data in a suitable DBMS. PHP is also easy to integrate with
web pages (Anonymous, n.d.).
7. MySQL (MySQL 5.7.6)
MySQL stands for My Structured Query Language. It is an open-source relational
database management system (RDBMS). It is non-proprietary, easily extensible and
platform independent. It is a popular choice of database for use in web applications.
Its downside is that it lacks a graphical user interface; therefore you need to know
how the database works to make the most efficient use of it (Anonymous, n.d.).
8. SQL
SQL stands for Structured Query Language is a standardized query language for
requesting information from a database. It is declarative computer language aimed at
querying relational databases. It lets you access and manipulate databases
(Anonymous, n.d.).
9. FPDF which stands for Free Portable Document Format is a PHP class used to
generate PDF files with pure PHP, without using the PDF library.
The main purpose using FPDF is due to it high-level functionalities which includes:
 Choice of measure unit, page format and margins
 Page header and footer management
 Automatic page break
 Automatic line break and text justification
 Image support (JPEG, PNG and GIF)
 Colors
 Links
 TrueType, Type1 and encoding support
 Page compression

3.5 SUMMARY

This chapter presented the development methodology, the case study area, proposed system
and the development tools. The following chapter outlines the research approaches used for
the study, and the design of the system.
CHAPTER FOUR

SYSTEMS ANALYSIS AND DESIGN

4.0 INTRODUCTION

Systems development involves phases such as planning, analysis, design, deployment, and
maintenance. This chapter focuses on systems analysis and design which specifies what the
system should do and focus on how to accomplish the objective of the system.The
methodology used in the proposed system is waterfall as a result of the fact that the project
was carried out linearly. This chapter covers the following areas: requirement specification,
database design, user interface design, they are therefore, examined in turns, in the following
sections.

4.1 REQUIREMENT SPECIFICATION

4.1.1 Functional Requirements

 Users should be able to login with their credentials


 Users should be able to modify their information including changing of passwords
 The system should enable users to apply for leave
 The system should enable user in charge approve or reject leave applications
 The system should enable users to check and print leave status
 The system should manage employee records, branch records, department records
 The system should generate leave reports

4.1.2 Non-functional Requirements

4.1.2.1 Product Requirement

 The system should be easy to use by users


 The system should not show latent leakage of information
 The system should be able to run twenty four (24) hours a day and perform its
intended functions with accuracy.

4.1.2.2 Organizational Requirement

 Users shall login using their username and password


 The system should authenticate users with their login details
4.1.2.3 External Requirement

 The system should conform to Part IV of the Labour Act 2003(Act 651)

Figure 4.1: Flowchart of System

4.1.3 Use Case Modelling

Use cases are a requirements discovery technique that were first introduced in the objectory
method (Jacobson et al., 1993). A use case identifiesthe actors involved in an interaction and
names the type of interaction. The actors involved in the leave management system are the
administrators, leave approvers/HR manager and employees:

Figure 4.2: Use Case Diagram for the Proposed System Users
4.1.4 Sequence Diagrams

A sequence diagram shows the sequence of interactions that take place during a particular use
case instance. The sequence diagrams for employee login and administrator login activities of
the proposed leave management system are given in Figure 4.3 and Figure 4.4 respectively.

Figure 4.3: Sequence Diagram for Employee Login


The sequence diagram for employee login can be read as follows:

 The employee enters URL for the leave management system in web browser, which
goes to the homepage of the system.
 Employee then press login button and enters login details (i.e. username and
password)
 The system checks with the database if login credentials entered by the employee is
valid or not.
 If validated, system takes user to the employee homepage. If validation fails, system
takes user back to the homepage of the leave management system.

Figure 4.4: Sequence Diagram for Administrator Login


The sequence diagram for administrator login can be read as follows:

 The administrator enters URL for the leave management system in web browser,
which goes to the homepage of the system.
 Administrator then press login button and enters login details (i.e. username and
password)
 The system checks with the database if login credentials entered by the administrator
is valid or not.
 If validated, system takes user to the administrator homepage. If validation fails,
system takes user back to the systems homepage.

Figure 4.5 is a sequence diagram from the same system thatillustrates adding employees by
the administrator.

Figure 4.5: Sequence Diagram for Adding Employee


The sequence diagram for adding employee can be read as follows:

 The administrator enters URL for the leave management system in web browser,
which goes to the homepage of the system.
 Administrator then press login button and enters login details (i.e. username and
password)
 The system checks with the database if login credentials entered by the administrator
is valid or not.
 If validated, system takes user to the administrator homepage. If validation fails,
system takes user back to the systems homepage.
 From the administrator homepage, the administrator click on the link for add
employee page. Administrator then enters employee information.
 The administrator press the save button to add employee to the database of the
system.
 The system checks with the database if information entered is valid and hence does
not exist already.
 If validated, system takes administrator to the administrator homepage. If validation
fails, system takes administrator back to the add employee information page.

4.2 DATABASE DESIGN

A database is a collection of interrelated data stored with a minimum redundancy to serve


many applications. MySQL is a relational database management system which is widely used
around the globe due to it being open-sourced. Most SQL servers provide reliability but not
ease of use unlike MySQL. MySQL is also mostly platform independent which means it can
run on most operating systems. When using PHP to develop a website, Xamp Server supports
a MySQL database connection as both PHP and MySQL are tightly connected. Since PHP
complements MySQL very well, both technologies were used in the design of database
hence, it can be certain that thorough testing has been done.

4.2.1 Entity Relationship Diagram

The ER diagram depicts the model of the leave management system entity. The diagram
(Figure 4.6) reveals all the visual instrument of database tables and the relations between
branch, department, leave, employee, company etc. thus, the major entities of the leave
management system.
Figure 4.6: ER diagram for employee leave management system.

Description of leave management system database:

 The details of entities are stored into their tables.


 One and all entity contains primary key and unique keys.
 There are one-to-one and one-to-many relationships available between leave,
employee, and company.

4.2.2 Normalization

In figure 4.6, all entities are normalized and reduce duplication of records. Normalization is
built around the idea of normal forms, which are used to make sure that various types of
anomalies and inconsistencies are not instigated into the database.

4.3 USER INTERFACE DESIGN

User interface design is the process of designing the way in which system users can access
system functionality,and the way that information produced by the system is displayed.
The interface is aimed to improve efficiency and effectiveness of the user when using the
entire system.

The Leave management system comprises of Administrator and the general user
environment. The interfaces for the different types of users are as follows

 Administrators:
Who have privileges to add employees and register them in the company and
check the information of the employee and their leave status.
 The Leave Approver/ HR manager:
Has a privilege to approve or reject leave requests.
 Employees:
They are neither administrators nor managers. They have the privileges of
making leave requests, view leave history changing their basic information,
changing their password among others.
CHAPTER FIVE

SYSTEMS IMPLEMENTATION

5.0 INTRODUCTION

Systems implementation is concerned with how the information system should be built and
also ensure that the system is operational, used and meets quality standard. This chapter uses
the results of system analysis to construct system elements that meet the user requirements
and system requirements developed in the early life cycle phase.

5.1 MAPPING LOGICAL DESIGN ONTO PHYSICAL PLATFORM

The users involved in the system are:

 Administrator
 HR manager or leave approver
 Employee

5.1.1 Administrator:

This Administrator has the privileges to add Employees in the company’s database. This user
can also check the information of the Employee as well as the leave status and print report.

Figure 5.1: Add employee screen


5.1.2 HR Manager:
Similar to the privileges of the administrator, this user can check the information of the
employee as well as the status of the leave, and then approve or reject leave application.

Figure 5.2: Leave status of employees


5.1.3 Employee:

The employee can use his or her username and password to login into the system, make leave
request, view status of existing requests and update personal information.

Figure 5.3: Employee login screen


5.2 CONSTRUCTION
5.2.1 Screenshots of the various Interfaces of the Leave Management System

The output to be extracted from the proposed system are as shown below:

 Administrator interface

Figure 5.4: Administrator screen


 HR manager interface
The HR after login will be presented a main menu where he can check details of
employees who apply for leave and then approve or reject leave applications.

Figur
e 5.5: HR manager screen
Figure 5.6: Leave application form

Figure 5.7: Leave report


Figure 5.8: Database structure

5.3 TESTING OF PROGRAM

After developing and implementing the system, testing is done. This activity checks the
accuracy of the system according to the user requirements with the aim of improving the
quality and reliability of the system. It is known that a successful test is one that finds the
errors. The leave management system was evaluated with an intention of creating a strong
system. Testing strategies conducted for the leave management system were Unit testing and
System testing. Each of the phases is discussed below:

5.3.1 Unit Testing

Unit testing aims at the verification of the smallest unit within a program. At this stage, each
module was tested independently to assure accuracy. In the leave management system, each
module contains sub-modules, which in turn consist of different functions and units. These
functions were individually tested. The white box and black box approach was used to carry
out unit testing.

5.3.2 System Testing

System testing was the final test to be carried out. A system test is a series of different tests
designed to fully exercise the system to uncover its limitation and to measure its capabilities.
This test covers the performance, reliability, accuracy and other criteria.
An alpha test was carried out on the system using a local server. This was to ensure that all
individual modules (i.e. end user interface and database connectivity) were integrated and
fully functional. Subsequently, a user acceptance test (beta testing) was conducted with
potential end users of the system.

5.3.3 Results

The results of the various tests were taken into account and changes were done where needed.

5.3.4: System Operations

For effective installation and efficient functioning of this system, some hardware and
software components are fundamental in the process of accomplishing the desired objectives.

The most significant software requirements are:

 Operating System (Windows operating system, Unix, Linux, etc.)


 Web browser (e.g. Internet Explorer, Chrome, Firefox etc.)
 Xampp (For local access only).

the hardware requirements are:

 Keyboard
 10 Gigabyte hard disk or more
 A monitor (VDU)
 Minimum of Pentium 2 processor
 Minimum of 64MB RAM
 Internet Connection (Optional, for online access only)

This operation guide assists the users to get around fast with the system without stress. It
provides the user with relevant information and other precautions measure to maintain the
system. After successful booting operation of the computer on which this system is installed
on:

 Start the Xampp by clicking on its icon.


 Open a web browser by clicking on its icon.
 Type ‘localhost/gpleave/’ in the address bar of the web browser.
 Press Enter on your keyboard.
 After the system’s home page has shown, you can navigate to the required page by
clicking on the relevant URL and providing the authorization credentials (username
and password) when needed.

5.4 EVALUATION OF THE PROJECT

Evaluation is the ultimate stage of system development. The automation of the leave
management system will create a convenient platform for users. This will reduce time and
effort of working in paper base environment by handling ledgers for keeping operational data.

The goal of the project was attained and functionalities of the system running smoothly.
CHAPTER SIX

FINDINGS AND CONCLUSION

6.0 INTRODUCTION

This chapter presents a summary of the result, conclusions arising, as well as the
recommendations.

6.1 SUMMARY OF PROBLEMS

Even though this project is successfully completed, it might have failed to meet some
requirements. The system has been identified to have the following problems:

The capacity of the database increases gradually, increasing the load on the database back up
and data maintenance task.

Training for simple computer operations is necessary for the users of the system.

The system needs to be carefully tested from time to time, since it’s a web-based system, to
find out any security gaps.

6.2 ACHIEVEMENTS AND CHALLENGES

6.2.1 Achievements

The web-based leave management system was evaluated to see if it met the system
expectations and if it fulfils all requirements as proposed at the early stage of the system. The
following are some functions that a user of the leave management system can perform:

 Employees can apply for leave


 HR or Leave manager can approve or reject employees’ leave application.
 Administrator can add employees to the system.
 Both HR manager and Administrator can check leave status of employees and print
report.

6.2.2 Challenges

Some challenges encountered during this project are as follows:


There were complications in selecting development tools and also Inexperience in chosen
programming language; extra lessons on jQuery and JavaScript had to be taken. In addition
to, guidelines were sought from project supervisor, online forums, and course mates.

6.3 RECOMMENDATIONS

We sincerely attracted, learned and acquired skills in this practical project because lecturers
made sure that all students understood well what we were being taught. Practical project is
very important to students as it adds not only knowledge and experience to us but also build
skills, confidence and self-trust in making decisions. In addition to, it exposes students to the
working environment by preparing us to be hard working and self-discipline workers.

This project recommends that, the web-based leave management system should be deployed
and used by Ghana Post Company limited, and hence trains the employees and management
on how to use the system.

6.4 FUTURE WORK

 Interfacing it with other existing systems in the company. This would avoid
duplication of staffs’ bio-data and reduce data entry efforts.
 Generation of standard leave report for the employees, to ensure the employee views
leave reports
 Include the capability of sending reports to employees email addresses.
 Interfacing the system with some sort of electronic processing system that ensures that
staffs who would like to print their leave report get access to this information.

6.5 CONCLUSION

The system has three basic types of users; the Employee, the Leave or HR Manager and the
Administrator, each of which would have their respective roles. The system is designed for
managing leave application in Ghana Post Company Limited. Employees are allowed to
make leave request by submitting leave application request on this web-based platform

On the contrary, the Leave or HR Manager is allowed to approve or reject leave request. He
or she is also responsible for checking out the eligibility of the employee for the leave type he
or she has applied for and send necessary feedback report to the employee.

Lastly, the Administrator is allowed to add all the employees and register them in the
organization. He can also check the information of the employee and their leave status.
Additionally, security features are put in place to prevent a user from login into the system as
a different user and to validate form data. The methodology used in designing the system is
explained in chapter three while chapters four and five provide detailed procedures for
implementing the system.

The result obtained in this system shows that the objectives has been achieved, hence the
system can help Ghana Post Company Limited to have a better and convenient way of
managing their leave system. This project meets the expectations and it fulfills requirements
as planned.
REFERENCES

Anon, 2021. Cascading Style Sheets. Wikipedia. Available at:


https://en.wikipedia.org/wiki/Cascading_Style_Sheets [Accessed June 28, 2021].

Anon, JavaScript Introduction. Available at: http://www.w3schools.com/js/js_intro.asp


[Accessed June 28, 2021].

Anon, PHP - Introduction. Tutorialspoint. Available at:


https://www.tutorialspoint.com/php/php_introduction.htm [Accessed June 28, 2021].

Anon, Scripting MySQL. Available at: https://scriptingmysql.wordpress.com/ [Accessed June


28, 2021].

Anon, SQL Tutorial. Available at: http://www.w3schools.com/sql/default.asp [Accessed June


28, 2021].

Chugh, R. (2014). Role of Human Resource Information System in Educational


Organization.

Journal of Advanced Management Science. 2(2)

Hridita, A. (2018). Employee leave Management System in Metlife Bangladesh. An


Intenship

Report on Meltlife.

Isaac, U.O., Sanjay, M., Robertas, D. and Rytis, M. (2018). Cloud Based Simple Employee

Management Information System: A Model for African Small and Medium


Enterprises. Proceedings of International Conference on Information Technology &
Systems, Advace in Intelligent System and Computing 721. Pg 115

Jacobson, I., Christerson, M., Jonsson, P. and Overgaard, G. (1993). Object-Oriented

SoftwareEngineering. Wokingham: Addison-Wesley.

js.foundation, J.S.F.-, jQuery. Available at: https://jquery.com/ [Accessed June 28, 2021].

Manish, S., Prachi, S., Rohil, Shubham, S. and Shiwani, S.(2015). Leave and Payroll
Management System. International Conference on Computing and
Virtualization,Thakur, India.

Mishal, R., Prity, S., Prachir C. and Arhant, C. (2017). Employee Leave Management
System.

International Journalof Advance Research and Innovative Ideas in Education.03(05).

Nikolay C., Gerald B. and Yishan Z. (2012). ‘The Management of Sick leave in the United

Nation’. Proceedings of management report on sick leave, Joint Inspection Unit


Geneva.

Rushitha, E., Preethi, G., Harshita, N.M., Manisha, R.R. and Veena, M. (2019). Android
Leave

Management System. International Research Journal of Computer Science. 06(6).

Shannon, R., HTML Source : HTML Tutorials. What is HTML? | HyperText Markup
Language

explained. Available at: http://www.yourhtmlsource.com/starthere/whatishtml.html.

Sin L. (2007). ‘The development of E-Leave system for FTMK’. Unpublished B.Sc. Thesis,

Department of Computer Science, Universiti Technikal, Malaysia

Stephen, B.U. and Chukwudebe, G.A., Dike, D.O. and Chukwuchewa, N. (2018). Improved

Leave Schedulling Algorithm for Improved Service Delivery in Nigeria University


System. Nigerian Journal of Technology. 4(37).Pg 1039.

Vibrant, K.K., Arjun, K.G., Ashish, K., and Abhishek, P.(2017). Student Leave Management

System. InternationalJournal of Advance Research and Innovative Ideas inEducation.


03(05). Pg 124

W.P. Anthony, P.L. Perrewe, and K.M. Kacmar, Human Resource Management: A Strategic

Approach, Orlando: Dryden, 1999, ch. 1, pp. 5-20.


APPENDIX

Codes:

<?php

session_start();

error_reporting(0);

include('includes/config.php');

if(strlen($_SESSION['emplogin'])==0)

header('location:index.php');

else{

if(isset($_POST['apply']))

$empid=$_SESSION['eid'];

$leavetype=$_POST['leavetype'];

$fromdate=$_POST['fromdate'];

$todate=$_POST['todate'];

$description=$_POST['description'];

$oto=$_POST['oto'];

$on=$_POST['on'];

$status=0;

$isread=0;
/*if($fromdate > $todate){

$error=" ToDate should be greater than FromDate ";

}*/

$sql="INSERT INTO
tblleaves(LeaveType,ToDate,FromDate,Description,OfficerTakenOver,OfficerNumber,Status
,IsRead,empid)
VALUES(:leavetype,:todate,:fromdate,:description,:oto,:on,:status,:isread,:empid)";

$query = $dbh->prepare($sql);

$query->bindParam(':leavetype',$leavetype,PDO::PARAM_STR);

$query->bindParam(':fromdate',$fromdate,PDO::PARAM_STR);

$query->bindParam(':todate',$todate,PDO::PARAM_STR);

$query->bindParam(':description',$description,PDO::PARAM_STR);

$query->bindParam(':oto',$oto,PDO::PARAM_STR);

$query->bindParam(':on',$on,PDO::PARAM_STR);

$query->bindParam(':status',$status,PDO::PARAM_STR);

$query->bindParam(':isread',$isread,PDO::PARAM_STR);

$query->bindParam(':empid',$empid,PDO::PARAM_STR);

$query->execute();

$lastInsertId = $dbh->lastInsertId();

if($lastInsertId)

$msg= "You have successfully applied for your Leave";

else
{

$error="Something went wrong. Please try again";

?>

<!DOCTYPE html>

<html lang="en">

<head>

<!-- Title -->

<title>Employe | Apply Leave</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-


scale=1.0, user-scalable=no"/>

<meta charset="UTF-8">

<meta name="description" content="Responsive Admin Dashboard Template"/>

<meta name="keywords" content="admin,dashboard" />

<meta name="author" content="Steelcoders"/>

<!-- Styles -->

<link type="text/css" rel="stylesheet"


href="assets/plugins/materialize/css/materialize.min.css"/>
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<link href="assets/plugins/material-preloader/css/materialPreloader.min.css"
rel="stylesheet">

<link href="assets/css/alpha.min.css" rel="stylesheet" type="text/css"/>

<link href="assets/css/custom.css" rel="stylesheet" type="text/css"/>

<style>

.errorWrap {

padding: 10px;

margin: 0 0 20px 0;

background: #fff;

border-left: 4px solid #dd3d36;

-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);

box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);

.succWrap{

padding: 10px;

margin: 0 0 20px 0;

background: #fff;

border-left: 4px solid #5cb85c;

-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);

box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);

</style>
</head>

<body>

<?php include('includes/header.php');?>

<?php include('includes/sidebar.php');?>

<main class="mn-inner">

<div class="row">

<div class="col s12">

<div class="page-title">Apply for Leave</div>

</div>

<div class="col s12 m12 l8">

<div class="card">

<div class="card-content">

<form id="example-form" method="post" name="addemp">

<div>

<h3>Apply for Leave</h3>

<section>

<div class="wizard-content">

<div class="row">

<div class="col m12">

<div class="row">

<?php if($error){?><div class="errorWrap"><strong>ERROR </strong>:<?php echo


htmlentities($error); ?> </div><?php }

else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo


htmlentities($msg); ?> </div><?php }?>
<div class="input-field col s12">

<select name="leavetype" autocomplete="off">

<option value="">Select leave type...</option>

<?php $sql = "SELECT LeaveType from tblleavetype";

$query = $dbh -> prepare($sql);

$query->execute();

$results=$query->fetchAll(PDO::FETCH_OBJ);

$cnt=1;

if($query->rowCount() > 0)

foreach($results as $result)

{ ?>

<option value="<?php echo htmlentities($result->LeaveType);?>"><?php echo


htmlentities($result->LeaveType);?></option>

<?php }} ?>

</select>

</div>

<div class="input-field col m6 s12">

<label for="fromdate">From Date</label>

<input placeholder="" id="mask1" name="fromdate" class="masked" type="text" data-


inputmask="'alias': 'date'" required>

</div>

<div class="input-field col m6 s12">

<label for="todate">To Date</label>


<input placeholder="" id="mask1" name="todate" class="masked" type="text" data-
inputmask="'alias': 'date'" required>

</div>

<div class="input-field col m12 s12">

<label for="birthdate">Purpose of Leave</label>

<textarea id="textarea1" name="description" class="materialize-textarea" length="500"


required></textarea>

</div>

<div class="input-field col m6 s12">

<label for="oto">Officer Taken Over</label>

<input id="oto" name="oto" type="text" onkeypress="return (event.charCode > 64 &&


event.charCode < 91) || (event.charCode > 96 && event.charCode < 123) ||
(event.charCode==32)" required>

</div>

<div class="input-field col m6 s12">

<label for="on">Officer Mobile number</label>

<input id="on" name="on" type="tel" maxlength="10" autocomplete="off"


onkeypress='validate(event)' required>

</div>

</div>

<button type="submit" name="apply" id="apply" class="waves-effect waves-light btn


indigo m-b-xs">Apply</button>

</div>

</div>

</section>

</section>
</div>

</form>

</div>

</div>

</div>

</div>

</main>

</div>

<div class="left-sidebar-hover"></div>

<!-- Javascripts -->

<script src="assets/plugins/jquery/jquery-2.2.0.min.js"></script>

<script src="assets/plugins/materialize/js/materialize.min.js"></script>

<script src="assets/plugins/material-preloader/js/materialPreloader.min.js"></script>

<script src="assets/plugins/jquery-blockui/jquery.blockui.js"></script>

<script src="assets/js/alpha.min.js"></script>

<script src="assets/js/pages/form_elements.js"></script>

<script src="assets/js/pages/form-input-mask.js"></script>

<script src="assets/plugins/jquery-inputmask/jquery.inputmask.bundle.js"></
script>

</body>

</html>

<?php } ?>

You might also like