Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 78

Employee Management System

Chapter-1

Introduction

1.1.Introduction to DBMS with architecture diagram


Database Management System or DBMS in short refers to the technology of storing and
retrieving user’s data with utmost efficiency along with appropriate security measures. Traditionally,
data was organized in file formats. DBMS was a new concept then, and all the research was done to
make it overcome the deficiencies in traditional style of data management.

Database is a collection of related data and data is a collection of facts and figures that can
be processed to produce information. A database management system stores data in such a way that it
becomes easier to retrieve, manipulate, and produce information.

Database management systems architecture will help us understand the components of


database system and the relation among them. The architecture of DBMS depends on the computer
system on which it runs. The basic client/server architecture is used to deal with a large number of PCs,
web servers, database servers and other components that are connected with networks. DBMS
architecture depends upon how users are connected to the database to get their request done.

1.1.1. The database system can be divided into four components:


i. The database system can be divided into System developer and End users.
ii. Database application: Database application may be Personal, Departmental, Enterprise
and Internal.
iii. DBMS: Software that allow users to define, create and managers database access, Ex:
MySQL, Oracle etc.
iv. Database: Collection of logical data.

1.1.2. Functions of database management system:


i. Provides Recovery services
ii. Provides utility
iii. Provides data Independence
iv. Provides a clear and logical view of the process that manipulates data

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 1 of 78


Employee Management System
1.1.3. Advantages of DBMS:
i. Segregation of application program.
ii. Minimal data duplicity and Easy retrieval of data.

1.1.4. Types of DBMS Architecture:


i. Single tier architecture
ii. Two tier architecture
iii. Three tier architecture

Figure.1.1 DBMS Architecture

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 2 of 78


Employee Management System
1.2.Overview of the project

Problem statement:

The proposed project “Employee Management System” has been developed


to overcome the problems faced in the practicing of manual system.

Objectives of the project:

1. This software is built to eliminate and, in some cases, reduce the hardships faced by the manual
system.
2. Less retrieval time of project details from vast data.
3. This system will maintain employee information in database by fully privacy and authority access.
4. This project is aimed at setting up employee information through a password protected which is
easy to monitor the achievement’s and performance of the employee in the company.
5. This software allows the administrator to edit employees, add new employees as well as evaluate
an employee’s performance.
6. Every organization, whether big or small, has human resource challenges to overcome. Every
organization has different employee management needs, therefore we design exclusive Employee
Management System that are adopted to your managerial requirements.

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 3 of 78


Employee Management System

Chapter-2

System Design and methodology

2.1 SYSTEM ARCHITECTURE:

Figure.2.1 System Architecture of Employee Management System

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 4 of 78


Employee Management System
2.2 ER diagram

Figure.2.2 ER Diagram

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 5 of 78


Employee Management System
2.3 Schema diagram

Figure.2.3 Schema Diagram

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 6 of 78


Employee Management System
Chapter-3

Tools/Environment Used

3.1 Software Requirements


3.1.1 Operating System: Windows 7 or higher

An Operating System (OS) is a software that acts as an interface between computer


hardware components and the user. Every computer system must have at least one operating system to run
other programs. Applications like Browsers, MS Office, Notepad Games, etc., need some environment to
run and perform its tasks.

The OS helps you to communicate with the computer without knowing how to speak the
computer's language. It is not possible for the user to use any computer or mobile device without having an
operating system.

Figure 3.1.1 OS

3.1.2 Language (Server Side):PHP

The term PHP is an acronym for PHP: Hypertext Preprocessor. PHP is a server-side scripting
language designed specifically for web development. PHP can actually do anything related to server-side
scripting or more popularly known as the backend of a website. For example, PHP can receive data from
forms, generate dynamic page content, can work with databases, create sessions, send and receive
cookies, send emails etc.

3.1.3 Web Technology:  HTML, CSS, JavaScript

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 7 of 78


Employee Management System
HTML: Hypertext Markup Language (HTML) is the standard markup language for documents designed to
be displayed in a web browser. 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 and originally included cues for the appearance of the document.

CSS: Cascading Style Sheets (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 fonts. 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.

JavaScript: JavaScript is a lightweight, cross-platform and interpreted scripting language. It is well-


known for the development of web pages, many non-browser environments also use it. JavaScript can be
used for Client-side developments as well as Server-side developments. 

3.1.4 Web Server: Apache

Apache is a popular open-source, cross-platform web server that is, by the numbers, the most
popular web server in existence.

3.1.5 Back End: MySQL

MySQL is an open-source relational database management system. A relational database organizes


data into one or more data tables in which data types may be related to each other; these relations help
structure the data. SQL is a language programmer use to create, modify and extract data from the relational
database, as well as control user access to the database.

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 8 of 78


Employee Management System
Chapter-4

SYSTEM IMPLEMENTATION
4.1 MODULES DESCRIPTION:

1. HOME

INPUT:

Index page consist of buttons which connects the different modules.

OUTPUT:

By selecting a buttons in the index page we can enter into specific module.

DESCRIPTION:

Frontend is designed using HTML, CSS. Index page consists of buttons with name. On selecting
the button, we can enter into the new page of specified module.

SOURCE CODE:

<!DOCTYPE html>

<html>

<head><title>CUB Tech</title>

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

<style>

body

background-image: url('temp1.jpg');

.flip-box {

background-color: transparent;

width: 100%;

height: 200px;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 9 of 78


Employee Management System
border: 1px solid #f1f1f1;

perspective: 1000px;

.flip-box-inner {

position: relative;

width: 100%;

height: 100%;

text-align: center;

transition: transform 0.8s;

transform-style: preserve-3d;

.flip-box:hover .flip-box-inner {

transform: rotateX(180deg);

.flip-box-front, .flip-box-back {

position: absolute;

width: 100%;

height: 100%;

-webkit-backface-visibility: hidden;

backface-visibility: hidden;

.flip-box-front {

background-color: #bbb;

color: black;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 10 of 78


Employee Management System
.flip-box-back {

background-color: white;

color: black;

transform: rotateX(180deg);

</style></head>

<body>

<header>

<nav><h1>CUB Tech</h1><ul id="navli">

<li><a class="homered" href="index.html">HOME</a></li>

<li><a class="homeblack" href="aboutus.html">ABOUT US</a></li>

<li><a class="homeblack" href="contact.html">CONTACT</a></li>

<li><a class="homeblack" href="elogin.html">LOG IN</a></li></ul></nav></header>

<div class="divider"></div>

<div id="divimg"></div>

<center><img src="banner.jpg" ></center><hr>

<b><marquee behavior="scroll" direction="left">Every one update your profile picture and


Data</marquee></b><hr>

<marquee behavior="alternate" direction="right">

<img src="company1.jpg" width="120" height="80" alt="Natural" />

<img src="company2.jfif" width="120" height="80" alt="Natural" />

<img src="company3.jfif" width="120" height="80" alt="Natural" />

<img src="company4.jfif" width="120" height="80" alt="Natural" />

<img src="company5.jfif" width="120" height="80" alt="Natural" />

<img src="company6.jfif" width="120" height="80" alt="Natural" />

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 11 of 78


Employee Management System
<img src="company3.jfif" width="120" height="80" alt="Natural" />

<img src="company7.jfif" width="120" height="80" alt="Natural" /></marquee><hr><center>

<h3>VISION AND MISSION:</h3>

<div class="flip-box"><div class="flip-box-inner"><div class="flip-box-front">

<h1>Vision</h1><h3>To be the company for our clients in our global markets, for all our bussiness,driven
by entrepreneurial spirit, cutting edge technology and execution excellence.</h3></div>

<div class="flip-box-back">

<h1>Mission</h1><h3>We will deliver relaiable,high-quality solutions for global infrastructure, always


ensuring that integrity, safety and sustainability are at the heart of everything we do</h3></div></div>

</center>

<div style="margin-top: 175px">

<h1 style="font-family: 'Lobster', cursive; font-weight: 200; font-size: 50px; margin-top: 100px; text-align:
center;">CUB Tech</h1>

<p style="font-family: 'Montserrat', sans-serif; font-size: 30px ; text-align: center;">Since


20202</p></div>

</body>

</html>

styleindex.css

@import url('https://fonts.googleapis.com/css?family=Lobster');

@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');

body{

margin: 0px;

header{

background: black;

color: white;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 12 of 78


Employee Management System
padding: 8px 20px 6px 40px;

height: 50px;}

header h1{

display: inline;

font-family: 'Lobster', cursive;

font-weight: 400;

font-size: 32px;

float: left;

margin-top: 0px;

margin-right: 10px;

nav ul {

display: inline;

padding: 0px;

float: right;

nav ul li{

display: inline-block;

list-style-type: none;

color: white;

float: left;

margin-left: 12px;

nav ul li a{

color: white;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 13 of 78


Employee Management System
text-decoration: none;

nav ul ul{

display: none;

position: absolute;

#navli ul li ul:hovar{

visibility: visible;

display: block;

#navli{

font-family: 'Montserrat', sans-serif;

.homered{

background-color: red;

padding: 30px 10px 22px 10px;

.divider{

background-color: red;

height: 5px;

.homeblack:hover{

background-color: blue;

padding: 30px 10px 21px 10px;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 14 of 78


Employee Management System
#divimg{

background-repeat: no-repeat;

background-size: cover;

background-image: : url('../images/back.jpg');

padding: 0px;margin: 10px;

height: 100%;width: 100%;

#registration{

padding: 2px 2px 2px 2px;

text-align: center;

background-color: #F0FFFF;

height: 100%;

width: auto;

background-position: center;

#textField{

width: 350px; height: 50px;

padding: 5px;

border-radius: 5px;

font-family: 'Montserrat', sans-serif;

#gender{

font-family: 'Montserrat', sans-serif;

#sub{

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 15 of 78


Employee Management System
width: 350px; height: 50px;

padding: 5px; border-radius: 5px;outline: 0px;

background-color: #0c6996;

.table-emp{

padding: 5px;

height: auto; width: 100%;

font-family: 'Montserrat', sans-serif;

text-align: center;

background-color: #4CAF50;

.table-emp tr th {

background-color: #4CAF50;

color: white;

.simple-form1{

margin-left: 10px;

padding: 2px 2px 2px 2px;

text-align: center;

background-color: #F0FFFF;

height: auto; width: auto;

background-position: center;

.leavetable{

width: 100%; height: auto;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 16 of 78


Employee Management System
}

#textField{

width: 350px;height: 50px;

padding: 5px; border-radius: 5px;

font-family: 'Montserrat', sans-serif;

.info{

margin-left: 10px; padding: 100px;

.h2{

font-family: 'Montserrat', sans-serif;

2.ABOUT US

INPUT:

This page consists information about the group members

OUTPUT:

Information about group members is displayed here.

DESCRIPTION:

Frontend is designed using HTML, CSS. It shows the information about the members

SOURCE CODE:

<!DOCTYPE html>

<html>

<head><title>About Us | CUB Tech</title>

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

<link href="https://fonts.googleapis.com/css?family=Lobster|Montserrat" rel="stylesheet"></head>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 17 of 78


Employee Management System
<body><header>

<nav><h1>CUB Tech</h1>

<ul id="navli">

<li><a class="homeblack" href="index.html">HOME</a></li>

<li><a class="homered" href="aboutus.html">ABOUT US</a></li>

<li><a class="homeblack" href="contact.html">CONTACT</a></li>

<li><a class="homeblack" href="elogin.html">LOG IN</a></li></ul></nav></header>

<div class="divider"></div>

<p style="font-family: Montserrat ; text-align: center; font-size: 40px">Group Members</p>

<div style="float: left; width: 33%">

<p style="text-align: center;"><img src="process/images/no.jpg" alt="Avatar" style="width:250px"></p>

<h2 style="text-align: center; font-family:Montserrat ">SANDHYA M</h2>

<h2 style="text-align: center; font-family:Montserrat ">1SG19CS407</h2></div>

<div style="float: left; width: 33%">

<p style="text-align: center;"><img src="process/images/no.jpg" alt="Avatar" style="width:250px"></p>

<h2 style="text-align: center; font-family:Montserrat ">YUVARAJ</h2>

<h2 style="text-align: center; font-family:Montserrat ">1SG19CS412</h2></div></div>

</body>

</html>

style.css

@import url('https://fonts.googleapis.com/css?family=Lobster');

@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');

body{

margin: 0px;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 18 of 78


Employee Management System
}

header{

background: black;

color: white;

padding: 8px 20px 6px 40px;

height: 50px;

header h1{

display: inline;

font-family: 'Lobster', cursive;

font-weight: 400;font-size: 32px;

float: left;

margin-top: 0px;margin-right: 10px;

nav ul {

display: inline;

padding: 0px;

float: right;

nav ul li{

display: inline-block;

list-style-type: none;

color: white;

float: left;

margin-left: 12px;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 19 of 78


Employee Management System
}

nav ul li a{

color: white;

text-decoration: none;

nav ul ul{

display: none;

position: absolute;

#navli ul li ul:hovar{

visibility: visible;

display: block;

#navli{

font-family: 'Montserrat', sans-serif;

.homered{

background-color: red;

padding: 30px 10px 22px 10px;

.divider{

background-color: red;

height: 5px;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 20 of 78


Employee Management System
.homeblack:hover{

background-color: blue;

padding: 30px 10px 21px 10px;

#divimg{

background-repeat: no-repeat;

background-size: cover;

background-image: : url('../images/back.jpg');

padding: 0px;margin: 10px;

height: 100%;width: 100%;

#registration{

padding: 2px 2px 2px 2px;

text-align: center;

background-color: #F0FFFF;

height: 100%;width: auto;

background-position: center;

#textField{

width: 350px;height: 50px;

padding: 5px;

border-radius: 5px;

font-family: 'Montserrat', sans-serif;

#gender{

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 21 of 78


Employee Management System
font-family: 'Montserrat', sans-serif;

#sub{

width: 350px;height: 50px;

padding: 5px;

border-radius: 5px;outline: 0px;

background-color: #0c6996;

.table-emp{

padding: 5px;

height: auto;width: 100%;

font-family: 'Montserrat', sans-serif;

text-align: center;

background-color: #4CAF50;

.table-emp tr th {

background-color: #4CAF50;

color: white;

.simple-form1{

margin-left: 10px;

padding: 2px 2px 2px 2px;

text-align: center;

background-color: #F0FFFF;

height: auto;width: auto;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 22 of 78


Employee Management System
background-position: center;

.leavetable{

width: 100%;height: auto;

#textField{

width: 350px;height: 50px;

padding: 5px;border-radius: 5px;

font-family: 'Montserrat', sans-serif;

.info{

margin-left: 10px;padding: 100px;

.h2{

font-family: 'Montserrat', sans-serif;

img {

border-radius: 50%;

3. CONTACT

INPUT:

This page consists information about place, phone number and email of the company.

OUTPUT:

It displays the contact information

DESCRIPTION:

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 23 of 78


Employee Management System
Frontend designed using HTML and CSS. It displays the contact information like mail id, location
and phone number.

SOURCE CODE:

<!DOCTYPE html>

<html>

<head><title>Contact | CUB Tech</title>

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

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-


50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
crossorigin="anonymous">

<link href="https://fonts.googleapis.com/css?family=Lobster|Montserrat" rel="stylesheet">

</head>

<body><header>

<nav><h1>CUB Tech</h1>

<ul id="navli">

<li><a class="homeblack" href="index.html">HOME</a></li>

<li><a class="homeblack" href="aboutus.html">ABOUT US</a></li>

<li><a class="homered" href="contact.html">CONTACT</a></li>

<li><a class="homeblack" href="elogin.html">LOG IN</a></li></ul></nav></header>

<div class="divider"></div>

<p style="font-family: Montserrat; text-align: center; font-size: 25px"><i class="fas


fa-map-marked"></i><a href="https://goo.gl/maps/p1cv2w8DwwrWqSuZA">CUB Tech<a></p>

<p style="font-family: Montserrat; text-align: center; font-size: 25px"><i class="fas


fa-address-book"></i>9900488355</p>

<p style="font-family: Montserrat; text-align: center; font-size: 25px"><i class="fas fa-envelope"><a


href="https://urlzs.com/Hppe5">cubtech@gmail.com<a></i></p></body>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 24 of 78


Employee Management System
</html>

4 LOGIN

i. EMPLOYEE LOGIN

INPUT:

This page consists Employee login page. Employee need to enter the registered email id and a
password for logging.

OUTPUT:

Entered email id and password will be checked. If password or email id is incorrect it throws a
message that invalid email or password. If the email and password is entered correctly then it takes to
Employee Account.

DESCRIPTION:

Frontend designed using HTML and CSS. Frontend and backend are connected by using PHP. This page
consists of form in which we should enter registered email id and password. After entering hit the login
button. If password or the registered mail id is incorrect it throws a display message at the top invalid
email/ password and returns back to employee login page again.

SOURCE CODE:

<!DOCTYPE html>

<html>

<head><title>Log In | CUB Tech</title>

<link rel="stylesheet" type="text/css" href="stylelogin.css"></head>

<body>

<header>

<nav> <h1>CUB Tech</h1>

<ul id="navli">

<li><a class="homeblack" href="index.html">HOME</a></li>

<li><a class="homered" href="elogin.html">Employee Login</a></li>

<li><a class="homeblack" href="alogin.html">Admin Login</a></li></ul></nav></header>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 25 of 78


Employee Management System
<div class="divider"></div>

<div class="loginbox">

<img src="assets/avatar.png" class="avatar">

<h1>Login Here</h1>

<form action="process/eprocess.php" method="POST">

<p>Email</p>

<input type="text" name="mailuid" placeholder="Enter Email Address" required="required">

<p>Password</p>

<input type="password" name="pwd" placeholder="Enter Password" required="required">

<input type="submit" name="login-submit" value="Login"></form> </div>

</body>

</html>

@import url('https://fonts.googleapis.com/css?family=Lobster');

@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');

body{

margin: 0px;

header{

background: black; color: white;

padding: 8px 20px 6px 40px;

height: 50px;

header h1{

display: inline;

font-family: 'Lobster', cursive;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 26 of 78


Employee Management System
font-weight: 400;font-size: 32px;

float: left;

margin-top: 0px;margin-right: 10px; }

nav ul {

display: inline;

padding: 0px;float: right;

nav ul li{

display: inline-block;

list-style-type: none;

color: white;float: left;

margin-left: 12px;

nav ul li a{

color: white;

text-decoration: none;

nav ul ul{

display: none;

position: absolute;

#navli ul li ul:hovar{

visibility: visible;

display: block;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 27 of 78


Employee Management System
#navli{

font-family: 'Montserrat', sans-serif;

.homered{

background-color: red;

padding: 30px 10px 22px 10px;

.divider{

background-color: red;

height: 5px;

.homeblack:hover{

background-color: blue;

padding: 30px 10px 21px 10px;

table {

margin: 0px;

border-collapse: collapse;

width: 100%;

font-family: 'Montserrat', sans-serif;

th, td {

text-align: center;

padding: 8px;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 28 of 78


Employee Management System
tr:nth-child(even){background-color: #f2f2f2}

tr:hover {background-color:#76D7C4;}

th {

background-color: #4CAF50;

color: white;

.p-t-20 {

padding-top: 20px;

.btn {

line-height: 40px;

display: inline-block;

padding: 0 25px;

cursor: pointer;

font-family: "Roboto", "Arial", "Helvetica Neue", sans-serif;

color: #fff;

-webkit-transition: all 0.4s ease;

-o-transition: all 0.4s ease;

-moz-transition: all 0.4s ease;

transition: all 0.4s ease;

font-size: 14px;

font-weight: 700;

.btn--radius {

-webkit-border-radius: 3px;

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 29 of 78


Employee Management System
-moz-border-radius: 3px;

border-radius: 3px;

.btn--green {

background: #57b846;

a. EMPLOYEE PANEL

1.HOME:

INPUT:

This page includes the information about the employee who logged in using their login id and
password

OUTPUT:

This page displays the information about the logged in employee with their login id and password

DISCRIPTION:

This page displays the information about the logged in employee with their login id and password. This
page also displays the information about Due projects, Salary and leave status of the employee.

SOURCE CODE:

<?php

$id = (isset($_GET['id']) ? $_GET['id'] : '');

require_once ('process/dbh.php');

$sql1 = "SELECT * FROM `employee` where id = '$id'";

$result1 = mysqli_query($conn, $sql1);

$employeen = mysqli_fetch_array($result1);

$empName = ($employeen['firstName']);

$sql1 = "SELECT `pname`, `duedate` FROM `project` WHERE eid = $id and status = 'Due'";

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 30 of 78


Employee Management System
$sql2 = "Select * From employee, employee_leave Where employee.id = $id and employee_leave.id = $id
order by employee_leave.token";

$sql3 = "SELECT * FROM `salary` WHERE id = $id"; //echo "$sql";

$result1 = mysqli_query($conn, $sql1);

$result2 = mysqli_query($conn, $sql2);

$result3 = mysqli_query($conn, $sql3);

?>

<html>

<head>

<title>Employee Panel | CUB Tech</title>

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

</head>

<body><header>

<nav><h1>CUB Tech</h1><ul id="navli">

<li><a class="homered" href="eloginwel.php?id=<?php echo $id?>"">HOME</a></li>

<li><a class="homeblack" href="myprofile.php?id=<?php echo $id?>"">My Profile</a></li>

<li><a class="homeblack" href="empproject.php?id=<?php echo $id?>"">My Projects</a></li>

<li><a class="homeblack" href="applyleave.php?id=<?php echo $id?>"">Apply Leave</a></li>

<li><a class="homeblack" href="elogin.html">Log Out</a></li>

</ul></nav></header>

<div class="divider"></div><div id="divimg">

<div><h2>Welcome <?php echo "$empName"; ?> </h2>

<h2 style="font-family: 'Montserrat', sans-serif; font-size: 25px; text- align: center;">Due


Projects</h2>

<table><tr>

<th align = "center">Project Name</th>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 31 of 78


Employee Management System
<th align = "center">Due Date</th></tr>

<?php

while ($employee1 = mysqli_fetch_assoc($result1)) { echo "<tr>";

echo "<td>".$employee1['pname']."</td>";

echo "<td>".$employee1['duedate']."</td>"; }

?>

</table>

<h2 style="font-family: 'Montserrat', sans-serif; font-size: 25px; text-align: center;">Salary Status</h2>

<table> <tr>

<th align = "center">Base Salary</th>

<th align = "center">Total Salary</th></tr>

<?php

while ($employee = mysqli_fetch_assoc($result3)) {echo "<tr>"

echo "<td>".$employee['base']."</td>";

echo "<td>".$employee['total']."</td>"; }

?>

</table>

<h2 style="font-family: 'Montserrat', sans-serif; font-size: 25px; text-align: center;">Leave Satus</h2>

<table> <tr>

<th align = "center">Start Date</th><th align = "center">End Date</th><th align = "center">Total


Days</th><th align = "center">Reason</th><th align = "center">Status</th></tr>

<?php

while ($employee = mysqli_fetch_assoc($result2)) {

$date1 = new DateTime($employee['start']);

$date2 = new DateTime($employee['end']);

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 32 of 78


Employee Management System
$interval = $date1->diff($date2); $interval = $date1->diff($date2);

echo "<tr>";

echo "<td>".$employee['start']."</td>";

echo "<td>".$employee['end']."</td>";

echo "<td>".$interval->days."</td>";

echo "<td>".$employee['reason']."</td>";

echo "<td>".$employee['status']."</td>";

?>

</table>

<br><br><br><br><br>

</div></h2></div>

</body>

</html>

2.MY PROFILE

INPUT:

This page will display the filled information of the employee.

OUTPUT:

This page will display the filled information of the employee and also has a update button for updation.

DISCRIPTION:

This page will display the information of the employee and also as a update button for updating a
details if any of the details entered are incorrect. If any of the information is incorrected edited with help of
update info button. When a update info button is pressed it takes to a new web page in which we can edit
the information of email id ,contact and address.In a new webpage we also see a change password button
by which we can change the password. After updating the details then the user need to press the submit
button. After pressing the submit button a new message will be displayed that successfully updated and
returns back to My profile page.

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 33 of 78


Employee Management System
SOURCE CODE:

<?php

require_once ('process/dbh.php');

$sql = "SELECT * FROM `employee` WHERE 1";

//echo "$sql";

$result = mysqli_query($conn, $sql);

$id = (isset($_GET['id']) ? $_GET['id'] : '');

$sql = "SELECT * from `employee` WHERE id=$id";

$sql2 = "SELECT total from `salary` WHERE id = $id";

$result = mysqli_query($conn, $sql); $result2 = mysqli_query($conn , $sql2);

$salary = mysqli_fetch_array($result2);$empS = ($salary['total']);

if($result){ while($res = mysqli_fetch_assoc($result)){

$firstname = $res['firstName'];$lastname = $res['lastName'];

$email = $res['email'];$contact = $res['contact'];

$address = $res['address'];$gender = $res['gender'];

$birthday = $res['birthday'];$dept = $res['dept'];

$degree = $res['degree'];

}}

?>

<html>

<head><title>My Profile | CUB Tech</title>

<!-- Main CSS-->

<link href="css/main.css" rel="stylesheet" media="all">

</head>

<body> <header>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 34 of 78


Employee Management System
<nav><h1>CUB Tech</h1><ul id="navli">

<li><a class="homeblack" href="eloginwel.php?id=<?php echo

$id?>"">HOME</a></li>

<li><a class="homered" href="myprofile.php?id=<?php echo $id?>"">My Profile</a></li>

<li><a class="homeblack" href="empproject.php?id=<?php echo $id?>"">My Projects</a></li>

<li><a class="homeblack" href="applyleave.php?id=<?php echo $id?>"">Apply Leave</a></li>

<li><a class="homeblack" href="elogin.html">Log Out</a></li></ul></nav></header>

<div class="divider"></div>

<!-- <form id = "registration" action="edit.php" method="POST"> --><h2 class="title">My Info</h2>

<form method="POST" action="myprofileup.php?id=<?php echo $id?>"

<div class="row row-space"> <div class="col-2"> <div class="input-group> <p>First Name</p>

<input class="input--style-1" type="text" name="firstName" value="<?php echo $firstname;?>"


readonly ></div> </div><div class="col-2"><div class="input-group"> <p>Last Name</p>

<input class="input--style-1" type="text" name="lastName" value="<?php echo $lastname;?>" readonly>

</div></div></div>

<div class="input-group"> <p>Email</p>

<input class="input--style-1" type="email" name="email" value="<?php echo $email;?>"


readonly </div>

<div class="row row-space"><div class="col-2"><div class="input-group”> <p>Date of Birth</p>

<input class="input--style-1" type="text" name="birthday" value="<?php echo $birthday;?>" readonly>

</div> </div>

<div class="col-2"> <div class="input-group">

<p>Gender</p>

<input class="input--style-1" type="text" name="gender" value="<?php echo $gender;?>" readonly


</div></div> </div> <div class="input-group">

<p>Contact Number</p>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 35 of 78


Employee Management System
<input class="input--style-1" type="number" name="contact" value="<?phpecho $contact;?>" readonly
</div><div class="input-group"><div class="input-group">

<p>Address</p>

<input class="input--style-1" type="text" name="address" value="<?php echo$address;?>" readonly


</div>

<div class="input-group"> <p>Department</p>

<input class="input--style-1" type="text" name="dept" value="<?php echo $dept;?>" readonly>

</div><div class="input-group"><p>Degree</p>

<input class="input--style-1" type="text" name="degree" value="<?php echo $degree;?>" readonly>

</div>

<div class="input-group">

<p>Total Salary</p>

<input class="input--style-1" type="text" name="degree" value="<?php echo $empS;?>" readonly></div>

<input type="hidden" name="id" id="textField" value="<?php echo $id;?>"required="required"><br><br>


<div class="p-t-20">

button class="btn btn--radius btn--green" name="send" >Update Info</button>

</div> </form> </div></div> </div> </div>

</body>

</html>

UPDATE

<?php

require_once ('process/dbh.php');

$sql = "SELECT * FROM `employee` WHERE 1";

//echo "$sql";

$result = mysqli_query($conn, $sql);

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

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 36 of 78


Employee Management System
{ $id = mysqli_real_escape_string($conn, $_POST['id']);

$email = mysqli_real_escape_string($conn, $_POST['email']);

$contact = mysqli_real_escape_string($conn, $_POST['contact']);

$address = mysqli_real_escape_string($conn, $_POST['address']);

$result = mysqli_query($conn, "UPDATE `employee` SET


`email`='$email',`contact`='$contact',`address`='$address' WHERE id=$id");

echo ("<SCRIPT LANGUAGE='JavaScript'>

window.alert('Succesfully Updated')

window.location.href='myprofile.php?id=$id ';

</SCRIPT>"); }

?>

<?php

$id = (isset($_GET['id']) ? $_GET['id'] : '');

$sql = "SELECT * from `employee` WHERE id=$id";

$result = mysqli_query($conn, $sql); if($result){

while($res = mysqli_fetch_assoc($result)){

$firstname = $res['firstName'];

$lastname = $res['lastName'];$email = $res['email'];

$contact = $res['contact']; $address = $res['address'];

$gender = $res['gender']; $birthday = $res['birthday'];

$dept = $res['dept']; $degree = $res['degree'];

// $salary = $res['salary'];

}}

?>

<html>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 37 of 78


Employee Management System
<head> <title>Update Profile | CUB Tech</title>

<!-- Main CSS--> <link href="css/main.css" rel="stylesheet" media="all">

</head>

<body><header><nav><h1>CUB Tech</h1>

<ul id="navli">

<li><a class="homeblack" href="eloginwel.php?id=<?php echo $id?>"">HOME</a></li>

<li><a class="homered" href="myprofile.php?id=<?php echo $id?>"">My Profile</a></li>

<li><a class="homeblack" href="applyleave.php?id=<?php echo $id?>"">Apply Leave</a></li>

<li><a class="homeblack" href="elogin.html">Log Out</a></li></ul></nav>

</header>

<div class="divider"></div>

<!-- <form id = "registration" action="edit.php" method="POST"> -->

<h2 class="title">Update Employee Info</h2>

<form id = "registration" action="myprofileup.php" method="POST">

<div class="input-group"> <p>Email</p>

<input class="input--style-1" type="email" name="email" value="<?php echo $email;?>">


</div>

<div class="input-group”> <p>Contact</p>

<input class="input--style-1" type="number" name="contact"value="<?phpecho$contact;?>"></div>

<div class="input-group"> <p>Address</p>

<input class="input--style-1" type="text" name="address" value="<?php echo $address;?>"></div>

<input type="hidden" name="id" id="textField" value="<?php echo $id;?>" required="required">

<br><br> <div class="p-t-20"><button class="btn btn--radius btn--green" type="submit"

name="update">Submit</button> </div> </form><br>

<button class="btn btn--radius btn--green" onclick="window.location.href = 'changepassemp.php?id=<?


php echo $id?>';">Change Password</button> </div> </div></div></div>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 38 of 78


Employee Management System
</body>

</html>

Change password:

<?php

require_once ('process/dbh.php');

$sql = "SELECT * FROM `employee` WHERE 1";

//echo "$sql";

$result = mysqli_query($conn, $sql);

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

$id = $_POST['id'];

$old = $_POST['oldpass'];

$new = $_POST['newpass'];

$result = mysqli_query($conn, "select employee.password from employee WHERE id = $id");


$employee = mysqli_fetch_assoc($result);

if($old == $employee['password']){

$sql = "UPDATE `employee` SET `password`='$new' WHERE id = $id";

mysqli_query($conn, $sql); echo ("<SCRIPT LANGUAGE='JavaScript'>

window.alert('Password Updated')

window.location.href='myprofile.php?id=$id';</SCRIPT>"); }

else{

echo ("<SCRIPT LANGUAGE='JavaScript'>

window.alert('Failed to Update Password')

window.location.href='javascript:history.go(-1)'; </SCRIPT>"); }

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 39 of 78


Employee Management System
?>

<!-- <?php

$id = (isset($_GET['id']) ? $_GET['id'] : '');

$sql = "SELECT * from `employee` WHERE id=$id";

$result = mysqli_query($conn, $sql);

if($result){

while($res = mysqli_fetch_assoc($result)){

$old = $res['password'];echo "$old";

}}

?> -->

<html><head>

<title>Change Password | CUB Tech</title>

<!-- Main CSS--> <link href="css/main.css" rel="stylesheet" media="all"></head>

<body> <header>

<nav><h1>CUB Tech</h1>

<ul id="navli">

<li><a class="homeblack" href="eloginwel.php?id=<?php echo $id?>"">HOME</a></li>

<li><a class="homered" href="myprofile.php?id=<?php echo $id?>"">My Profile</a></li>

<li><a class="homeblack" href="applyleave.php?id=<?php echo $id?>"">Apply Leave</a></li>

<li><a class="homeblack" href="elogin.html">Log Out</a></li> </ul></nav>

</header>

<div class="divider"></div>

<!-- <form id = "registration" action="edit.php" method="POST"> -->

<h2 class="title">Update Password</h2>

<form id = "registration" action="changepassemp.php" method="POST">

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 40 of 78


Employee Management System
<div class="row row-space"><div class="col-2"> <div class="input-group">

<p>Old Password</p><input class="input--style-1" type="Password" name = "oldpass" required >

</div> </div>

<div class="col-2"> <div class="input-group"><p>New Password</p>

<input class="input--style-1" type="Password" name="newpass" required>

</div></div> </div>

<input type="hidden" name="id" id="textField" value="<?php echo $id;?>"


required="required"><br><br><div class="p-t-20">

<button class="btn btn--radius btn--green" type="submit"name="update">Submit</button> </div>


</form> </div> </div></div>

</body>

</html>

3.MY PROJECTS:

INPUT:

This page displays the projects that are assigned to the employee and also see a submit option.

OUTPUT:

This page displays the projects that are assigned to the employee and also see a submit option.

DISCRIPTION:

This page displays the projects that are assigned to the employee and also see a submit option
which need to be clicked after completing the project work so that the status of the project will be changed
from pending to completed.

SOURCE CODE:

<?php

$id = (isset($_GET['id']) ? $_GET['id'] : '');

require_once ('process/dbh.php');

$sql = "SELECT * FROM `project` where eid = '$id'";

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 41 of 78


Employee Management System
$result = mysqli_query($conn, $sql);

?>

<html>

<head> <title>Employee Panel | CUB Tech</title>

<link rel="stylesheet" type="text/css" href="styleview.css"></head>

<body><header> <nav> <h1>CUB Tech</h1>

<ul id="navli"><li><a class="homeblack" href="eloginwel.php?id=<?php echo $id?>"">HOME</a></li>

<li><a class="homeblack" href="myprofile.php?id=<?php echo $id?>"">My Profile</a></li>


<li><a class="homered" href="empproject.php?id=<?php echo $id?>"">My
Projects</a></li> <li><a class="homeblack" href="applyleave.php?id=<?php echo $id?>"">Apply
Leave</a></li>

<li><a class="homeblack" href="elogin.html">Log Out</a></li> </ul>

</nav> </header>

<div class="divider"></div> <div id="divimg"><table>

<tr> <th align = "center">Project ID</th> <th align = "center">Project Name</th>

<th align = "center">Due Date</th> <th align = "center">Sub Date</th>

<th align = "center">Mark</th> <th align = "center">Status</th>

<th align = "center">Option</th> </tr>

<?php

while ($employee = mysqli_fetch_assoc($result)) {

echo "<tr>";echo "<td>".$employee['pid']."</td>";

echo "<td>".$employee['pname']."</td>"; echo


"<td>".$employee['duedate']."</td>";

echo "<td>".$employee['subdate']."</td>"; echo "<td>".$employee['mark']."</td>";

echo "<td>".$employee['status']."</td>";

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 42 of 78


Employee Management System
echo "<td><a href=\"psubmit.php?pid=$employee[pid]&id=$employee[eid]\">Submit</a>"; }

?>

</table> </body></html>

4.APPLY LEAVE

INPUT:

This page has a form in which the employee need to fill the reason and also a leave date.

OUTPUT:

This page display the leave form. The employee need to fill the form if the employee need leave
and it also displays the leave record of an employee.

DISCRIPTION:

This page display the leave form. The employee need to fill the form if the employee need leave
and it also displays the leave record of an employee. When the leave form is filled and submitted then the
page will be redirected to a Home page of a Employee Panel.

SOURCE CODE:

<?php

$id = (isset($_GET['id']) ? $_GET['id'] : '');

require_once ('process/dbh.php');

$sql = "SELECT * FROM `employee` where id = '$id'";

$result = mysqli_query($conn, $sql);

$employee = mysqli_fetch_array($result);

$empName = ($employee['firstName']);

//echo "$id";

?>

<html>

<head>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 43 of 78


Employee Management System
<title>Apply Leave | Employee Panel | CUB Tech</title>

<link rel="stylesheet" type="text/css" href="styleapply.css"></head>

<body bgcolor="#F0FFFF">

<header><nav> <h1>CUB Tech</h1><ul id="navli">

<li><a class="homeblack" href="eloginwel.php?id=<?php echo $id?>"">HOME</a></li><li><a


class="homeblack" href="myprofile.php?id=<?php echo $id?>"">My Profile</a></li>

<li><a class="homeblack" href="empproject.php?id=<?php echo $id?>"">My Projects</a></li>


<li><a class="homered" href="applyleave.php?id=<?php echo $id?>"">Apply
Leave</a></li>

<li><a class="homeblack" href="elogin.html">Log Out</a></li> </ul></nav></header>

<div class="divider"></div>

<div class="page-wrapper bg-blue p-t-100 p-b-100 font-robo">

<div class="wrapper wrapper--w680"><div class="card card-1">

<div class="card-heading"></div><div class="card-body">

<h2 class="title">Apply Leave Form</h2>

<form action="process/applyleaveprocess.php?id=<?php echo $id?>" method="POST">

<div class="input-group">

<input class="input--style-1" type="text" placeholder="Reason" name="reason"> </div>


<div class="row row-space">

<div class="col-2"><p>Start Date</p><div class="input-group">

<input class="input--style-1" type="date" placeholder="start" name="start">

</div> </div> <div class="col-2">

<p>End Date</p>

<div class="input-group">

<input class="input--style-1" type="date" placeholder="end"


name="end"> </div> </div> <div>

<div class="p-t-20">
DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 44 of 78
Employee Management System
<button class="btn btn--radius btn--green" type="submit">Submit</button>

</div></form></div></div></div></div>

<table><tr><th align = "center">Emp. ID</th>

<th align = "center">Name</th> <th align = "center">Start Date</th>

<th align = "center">End Date</th> <th align = "center">Total Days</th>

<th align = "center">Reason</th> <th align = "center">Status</th></tr>

<?php $sql = "Select employee.id, employee.firstName, employee.lastName,


employee_leave.start, employee_leave.end, employee_leave.reason, employee_leave.status From
employee, employee_leave Where employee.id = $id and employee_leave.id = $id order by
employee_leave.token"; $result = mysqli_query($conn, $sql);

while ($employee = mysqli_fetch_assoc($result)) {

$date1 = new DateTime($employee['start']);

$date2 = new DateTime($employee['end']);$interval = $date1->diff($date2);

$interval = $date1->diff($date2);echo "<tr>"; echo "<td>".$employee['id']."</td>";

echo "<td>".$employee['firstName']." ".$employee['lastName']."</td>";

echo "<td>".$employee['start']."</td>";echo "<td>".$employee['end']."</td>";

echo "<td>".$interval->days."</td>";echo "<td>".$employee['reason']."</td>";

echo "<td>".$employee['status']."</td>"; }

?> </table>

</body>

</html>

5.LOGOUT

INPUT:

This button helps to logout.

OUTPUT:

This button logout from employee panel and return back to Login page

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 45 of 78


Employee Management System
DISCRIPTION:

This button logouts from the employee panel and takes you to the login page .

b. ADMIN LOGIN

INPUT:

This page consists form in which we need to enter the email id and password for logging in to the
Admin page.

OUTPUT:

This page consists form in which we need to enter the email id and password for logging in to the
Admin page and need to be pressed login page.

DISCRIPTION:

This page consists form in which we need to enter the email id and password for logging in to the
Admin page and need to be pressed login button. After logging into the Admin Panel. Their will be a
employee lead board at a home page and it also consist Add Employee, View Employee, Assign Project,
Project Status ,Salary Table, Employee Leave and a Logout option.

SOURCE CODE:

<!DOCTYPE html>

<html>

<head><title>Log In | CUB Tech</title>

<link rel="stylesheet" type="text/css" href="stylelogin.css"></head>

<body><header> <nav> <h1>CUB Tech</h1>

<ul id="navli">

<li><a class="homeblack" href="index.html">HOME</a></li>

<li><a class="homeblack" href="elogin.html">Employee Login</a></li>

<li><a class="homered" href="alogin.html">Admin Login</a></li></ul></nav>


DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 46 of 78
Employee Management System
</header><div class="divider"></div>

<div class="loginbox"> <img src="assets/admin.png" class="avatar">

<h1>Login Here</h1> <form action="process/aprocess.php" method="POST">

<p>Email</p>

<input type="text" name="mailuid" placeholder="Enter Email Address" required="required">

<p>Password</p> <input type="password" name="pwd" placeholder="Enter Password"


required="required"><input type="submit" name="login-submit" value="Login"></form>

</div>

</body>

</html>

1.HOME

DISCRIPTION:

Display Welcome message for the Admin and also display vision mission of the company

SOURCE CODE:

<html>

<head><title>Admin Panel | CUB Tech</title>

<link rel="stylesheet" type="text/css" href="styleemplogin.css"></head>

<style>

.flip-box {

background-color: transparent;

width: 100%;height: 200px;

border: 1px solid #f1f1f1;

perspective: 1000px;

.flip-box-inner {

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 47 of 78


Employee Management System
position: relative;

width: 100%;height: 100%;

text-align: center;

transition: transform 0.8s;

transform-style: preserve-3d;

.flip-box:hover .flip-box-inner {

transform: rotateX(180deg);

.flip-box-front, .flip-box-back {

position: absolute;width: 100%;

height: 100%;

-webkit-backface-visibility: hidden;

backface-visibility: hidden;

.flip-box-front {

background-color: #bbb;

color: black;

.flip-box-back {

background-color: white;

color: black;

transform: rotateX(180deg);

</style>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 48 of 78


Employee Management System
<body><header>

<nav><h1>CUB Tech</h1>

<center><ul id="navli">

<li><a class="homered" href="aloginwel.php">HOME</a></li>

<li><a class="homeblack" href="addemp.php">Add Employee</a></li>

<li><a class="homeblack" href="viewemp.php">View Employee</a></li>

<li><a class="homeblack" href="assign.php">Assign Project</a></li> <li><a class="homeblack"


href="assignproject.php">Project Status</a></li>

<li><a class="homeblack" href="salaryemp.php">Salary Table</a></li>

<li><a class="homeblack" href="empleave.php">Employee Leave</a></li>

<li><a class="homeblack" href="alogin.html">Log Out</a></li></ul></nav>

</header> <center><h1>Welcome to Admin Panel of CUBTech</h1>

<hr><center>

<h3>VISION AND MISSION:</h3>

<div class="flip-box"> <div class="flip-box-inner"><div class="flip-box-front">

<h1>Vision</h1>

<h3>To be the company for our clients in our global markets, for all our bussiness,driven by
entrepreneurial spirit, cutting edge technology and execution excellence.</h3></div>

<div class="flip-box-back"><h1>Mission</h1>

<h3>We will deliver relaiable,high-quality solutions for global infrastructure, always ensuring that
integrity, safety and sustainability are at the heart of everything we do</h3></div> </div></center></div>

</body>

</html>

2.ADD EMPLOYEE

INPUT:

This page consist the form of employee registration which need to be filled by the Admin.

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 49 of 78


Employee Management System
OUTPUT:

This page consist the form of employee registration which need to be filled by the Admin and it
also consists a Submit button.

DISCRIPTION:

This page consist the form of employee registration which need to be filled by the Admin and it
also consists a Submit button. Every Data need to be filled by the Admin with the help of employee. After
filling the details Submit button need to be pressed so that the entered employee details will be updated in
the database. If any of the fields are not filled then it throws a message that please fill out this field.

SOURCE CODE:

<!DOCTYPE html>

<html><head>

<!-- Title Page--> <title>Add Employee | Admin Panel</title>

<!-- Vendor CSS-->

<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">

<link href="vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">

<!-- Main CSS--> <link href="css/main.css" rel="stylesheet" media="all">

</head>

<body> <header><nav>

<h1>CUBTech</h1>

<ul id="navli"><li><a class="homeblack" href="aloginwel.php">HOME</a></li>

<li><a class="homered" href="addemp.php">Add Employee</a></li>

<li><a class="homeblack" href="viewemp.php">View Employee</a></li>

<li><a class="homeblack" href="assign.php">Assign Project</a></li>

<li><a class="homeblack" href="assignproject.php">Project Status</a></li>

<li><a class="homeblack" href="salaryemp.php">Salary Table</a></li>

<li><a class="homeblack" href="empleave.php">Employee Leave</a></li>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 50 of 78


Employee Management System
<li><a class="homeblack" href="alogin.html">Log Out</a></li></ul>

</nav></header><div class="divider"></div>

<div class="page-wrapper bg-blue p-t-100 p-b-100 font-robo">

<div class="wrapper wrapper--w680"><div class="card card-1">

<div class="card-heading"></div><div class="card-body">

<h2 class="title">Registration Info</h2>

<form action="process/addempprocess.php" method="POST" enctype="multipart/form-data"> <div


class="row row-space">

<div class="col-2"> <div class="input-group">

<input class="input--style-1" type="text" placeholder="First Name" name="firstName"


required="required">

</div></div>

<div class="col-2"><div class="input-group">

<input class="input--style-1" type="text" placeholder="Last Name" name="lastName"


required="required">

</div></div></div>

<div class="input-group">

<input class="input--style-1" type="email" placeholder="Email" name="email"


required="required"></div>

<p>Birthday</p><div class="row row-space">

<div class="col-2"><div class="input-group">

<input class="input--style-1" type="date" placeholder="BIRTHDATE" name="birthday"


required="required"> </div> </div>

<div class="col-2"><div class="input-group"><div class="input-group”>

<div class="rs-select2 js-select-simple select--no-search"><select name="gend

<option disabled="disabled" selected="selected">GENDER</option>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 51 of 78


Employee Management System
<option value="Male">Male</option><option
value="Female">Female</option>

<option value="Other">Other</option></select>

<div class="select-dropdown"></div></div></div></div></div>

<div class="input-group">

<input class="input--style-1" type="number" placeholder="Contact Number"


name="contact" required="required" ></div>

<div class="input-group">

<input class="input--style-1" type="text" placeholder="Address" name="address"


required="required"></div>

<div class="input-group">

<input class="input--style-1" type="text" placeholder="Department" name="dept"


required="required"></div>

<div class="input-group">

<input class="input--style-1" type="text" placeholder="Degree" name="degree"


required="required"></div>

<div class="input-group">

<input class="input--style-1" type="number" placeholder="Salary"


name="salary"></div><div class="p-t-20">

<button class="btn btn--radius btn--green"


type="submit">Submit</button></div></form></div></div></div></div>

<!-- Jquery JS-->

<script src="vendor/jquery/jquery.min.js"></script>

<!-- Vendor JS-->

<script src="vendor/select2/select2.min.js"></script>

<script src="vendor/datepicker/moment.min.js"></script>

<script src="vendor/datepicker/daterangepicker.js"></script>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 52 of 78


Employee Management System
<!-- Main JS-->

<script src="js/global.js"></script></body></html><!-- end document-->

3.VIEW EMPLOYEE

INPUT:

This Module will display the employee details.

OUTPUT:

This module displays the employee details.

DISCRIPTION:

This will display the employee’s working in a company and also the details about an employee.We
can also edit the employee details in this by clicking on edit, it will take you to a new page their you
can update or enter the correct information, this can be done by employee also and also from the
Admin panel.Admin can also delete the employee. If a employee Id isdeleted then ,if a deleted
employee tries to login with the email id and password it will give a message that invalid
email/password because the employee data will be deleted from the database.

SOURCE CODE:

<?php

require_once ('process/dbh.php');

$sql = "SELECT * from `employee` ";

//echo "$sql";

$result = mysqli_query($conn, $sql);

?>

<html>

<head>

<title>View Employee | Admin Panel | CUB Tech</title>

<link rel="stylesheet" type="text/css" href="styleview.css"></head>

<body><header><nav>

<h1>CUB Tech</h1>
DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 53 of 78
Employee Management System
<ul id="navli">

<li><a class="homeblack" href="aloginwel.php">HOME</a></li>

<li><a class="homeblack" href="addemp.php">Add Employee</a></li>

<li><a class="homered" href="viewemp.php">View Employee</a></li>

<li><a class="homeblack" href="assign.php">Assign Project</a></li>

<li><a class="homeblack" href="assignproject.php">Project Status</a></li>

<li><a class="homeblack" href="salaryemp.php">Salary Table</a></li>

<li><a class="homeblack" href="empleave.php">Employee Leave</a></li>

<li><a class="homeblack" href="alogin.html">Log Out</a></li></ul></nav></header>

<div class="divider"></div>

<table><tr>

<th align = "center">Emp. ID</th><th align = "center">Name</th>

<th align = "center">Email</th><th align = "center">Birthday</th>

<th align = "center">Gender</th><th align = "center">Contact</th>

<th align = "center">Address</th><th align = "center">Department</th>

<th align = "center">Degree</th><th align = "center">Options</th></tr>

<?php

while ($employee = mysqli_fetch_assoc($result)) {

echo "<tr>";

echo "<td>".$employee['id']."</td>";

echo "<td>".$employee['firstName']." ".$employee['lastName']."</td>";

echo "<td>".$employee['email']."</td>"; echo "<td>".$employee['birthday']."</td>";

echo "<td>".$employee['gender']."</td>";echo "<td>".$employee['contact']."</td>";

echo "<td>".$employee['address']."</td>";echo "<td>".$employee['dept']."</td>";

echo "<td>".$employee['degree']."</td>";

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 54 of 78


Employee Management System
echo "<td><a href=\"edit.php?id=$employee[id]\">Edit</a> | <a href=\"delete.php?id=$employee[id]\"
onClick=\"return confirm('Are you sure you want to delete?')\">Delete</a></td>"; }

?> </table>

</body>

</html>

4.ASSING PROJECT

INPUT:

This page consist a form which has Employee ID, project name and a date.

OUTPUT:

This page displays the project assigning form which need to be filled by the Admin.

DISCRIPTION:

This page displays the project assigning form which need to be filled by the Admin. Admin need to
know the Employee Id to assign a project to a employee. If entered employee Id is incorrect then it throws
a message that project cannot be assigned and returns back to a project assigning page.Amin need to fill the
employee id ,project name and date.After filling the correct details Admin need to enter the Assign button
then the work will be assigned to a employee and employee can see the assigned work in their Employee
Panel.

SOURCE CODE:

<!DOCTYPE html>

<html>

<head>

<!-- Title Page-->

<title>Assign Project | Admin Panel</title>

<!-- Icons font CSS-->

<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">

<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">

<!-- Font special for pages-->

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 55 of 78


Employee Management System
<link href="https://fonts.googleapis.com/css?
family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i" rel="stylesheet">

<!-- Vendor CSS-->

<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">

<link href="vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">

<!-- Main CSS-->

<link href="css/main.css" rel="stylesheet" media="all">

</head>

<body><header><nav><h1>CUB Tech</h1>

<ul id="navli"><li><a class="homeblack" href="aloginwel.php">HOME</a></li>

<li><a class="homeblack" href="addemp.php">Add Employee</a></li>

<li><a class="homeblack" href="viewemp.php">View Employee</a></li>

<li><a class="homered" href="assign.php">Assign Project</a></li>

<li><a class="homeblack" href="assignproject.php">Project Status</a></li>

<li><a class="homeblack" href="salaryemp.php">Salary Table</a></li>

<li><a class="homeblack" href="empleave.php">Employee Leave</a></li>

<li><a class="homeblack" href="alogin.html">Log Out</a></li></ul></nav>

</header><div class="divider"></div>

<div class="page-wrapper bg-blue p-t-100 p-b-100 font-robo"><div class="wrapper wrapper--w680">


<div class="card card-1"> <div class="card-heading"></div>

<div class="card-body"> <h2 class="title">Assign Project</h2>

<form action="process/assignp.php" method="POST" enctype="multipart/form-data">

<div class="input-group">

<input class="input--style-1" type="text" placeholder="Employee ID" name="eid"


required="required"></div>

<div class="input-group">

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 56 of 78


Employee Management System
<input class="input--style-1" type="text" placeholder="Project Name" name="pname"
required="required"></div>

<div class="row row-space"><div class="col-2"><div class="input-group">

<input class="input--style-1" type="date" placeholder="date" name="duedate"


required="required"></div></div></div>

<div class="p-t-20"> <button class="btn btn--radius btn--green"


type="submit">Assign</button></div></form></div></div></div></div>

<!-- Jquery JS--><script src="vendor/jquery/jquery.min.js"></script>

<!-- Vendor JS--><script src="vendor/select2/select2.min.js"></script>

<script src="vendor/datepicker/moment.min.js"></script>

<script src="vendor/datepicker/daterangepicker.js"></script>

<!-- Main JS--><script src="js/global.js"></script>

</body>

</html>

<!-- end document-->

5. PROJECT STATUS

INPUT:

This Module will display the project status.

OUTPUT:

This Module will display the project status which is assigned by the Admin to the employee

DESCRIPTION:

This page displays the status of the project which is assigned by the Admin to the Employee.It also
display the employee name ,employee ,project due date and submission date, and also the status of the
project.It also consist a mark option.If a Admin click on the mark option it goes to a new page and a form
will be displayed.The form consist Name of an employee and details about the project, here the Admin can
Assign a mark for the submitted project.If a Admin need to give a mark for the project that has been
completed by the employee ,admin need to enter the mark and click a Assign Mark button.

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 57 of 78


Employee Management System
SOURCE CODE:

<?php

require_once ('process/dbh.php');

$sql = "SELECT * from `project` order by subdate desc";

//echo "$sql";

$result = mysqli_query($conn, $sql);

?>

<html>

<head><title>Project Status | Admin Panel | CUB Tech</title>

<link rel="stylesheet" type="text/css" href="styleview.css"></head>

<body><header><nav><h1>CUB Tech</h1><ul id="navli">

<li><a class="homeblack" href="aloginwel.php">HOME</a></li>

<li><a class="homeblack" href="addemp.php">Add Employee</a></li>

<li><a class="homeblack" href="viewemp.php">View Employee</a></li>

<li><a class="homeblack" href="assign.php">Assign Project</a></li>

<li><a class="homered" href="assignproject.php">Project Status</a></li>

<li><a class="homeblack" href="salaryemp.php">Salary Table</a></li>

<li><a class="homeblack" href="empleave.php">Employee Leave</a></li>

<li><a class="homeblack" href="alogin.html">Log Out</a></li></ul></nav></header>

<div class="divider"></div><table><tr><th align = "center">Project ID</th>

<th align = "center">Emp. ID</th><th align = "center">Project Name</th>

<th align = "center">Due Date</th><th align = "center">Submission Date</th>

<th align = "center">Mark</th><th align = "center">Status</th>

<th align = "center">Option</th></tr>

<?php

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 58 of 78


Employee Management System
while ($employee = mysqli_fetch_assoc($result)) {

echo "<tr>";

echo "<td>".$employee['pid']."</td>";echo "<td>".$employee['eid']."</td>";

echo "<td>".$employee['pname']."</td>";echo "<td>".$employee['duedate']."</td>";

echo "<td>".$employee['subdate']."</td>";echo "<td>".$employee['mark']."</td>";

echo "<td>".$employee['status']."</td>";

echo "<td><a href=\"mark.php?id=$employee[eid]&pid=$employee[pid]\">Mark</a>";

?>

</table>

</body>

</html>

6.SALARY TABLE

INPUT:

This module displays the salary table.

OUTPUT:

This module displayed the salary table of an employee.

DESCRIPTION:

This page consists the information about the employee salary and bonus of the employee.

SOURCE CODE:

<?php

require_once ('process/dbh.php');

$sql="SELECT employee.id,employee.firstName,employee.lastName,salary.base,salary.total from


employee,`salary` where employee.id=salary.id";

//echo "$sql";

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 59 of 78


Employee Management System
$result = mysqli_query($conn, $sql);

?>

<html>

<head><title>Salary Table | CUB Tech</title>

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

</head>

<body>

<header><nav><h1>CUB Tech</h1><ul id="navli"><li><a class="homeblack"


href="aloginwel.php">HOME</a></li>

<li><a class="homeblack" href="addemp.php">Add Employee</a></li>

<li><a class="homeblack" href="viewemp.php">View Employee</a></li>

<li><a class="homeblack" href="assign.php">Assign Project</a></li>

<li><a class="homeblack" href="assignproject.php">Project Status</a></li>

<li><a class="homered" href="salaryemp.php">Salary Table</a></li>

<li><a class="homeblack" href="empleave.php">Employee Leave</a></li>

<li><a class="homeblack" href="alogin.html">Log Out</a></li></ul></nav></header>

<div class="divider"></div><div id="divimg"></div>

<table><tr><th align = "center">Emp. ID</th>

<th align = "center">Name</th><th align = "center">Base Salary</th>

<th align = "center">TotalSalary</th>

</tr>

<?phpwhile ($employee = mysqli_fetch_assoc($result)) {

echo "<tr>";

echo "<td>".$employee['id']."</td>";

echo "<td>".$employee['firstName']." ".$employee['lastName']."</td>";

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 60 of 78


Employee Management System
echo "<td>".$employee['base']."</td>";echo "<td>".$employee['total']."</td>";

?>

</table>

</body>

</html>

7.EMPLOYEE LEAVE

INPUT:

This module displays the employee leave.

OUTPUT:

This module displayed the employee leave form which need to accepted/ rejected by the Admin.

DESCRIPTION:

This page displays the employee leave information, when employee has been applied for leave with
the reason.Admin need to approve or cancel the leave request by click approve or cancel button.

SOURCE CODE:

<?php

require_once ('process/dbh.php');

//$sql = "SELECT * from `employee_leave`";

$sql = "Select employee.id, employee.firstName, employee.lastName, employee_leave.start,


employee_leave.end, employee_leave.reason, employee_leave.status, employee_leave.token From
employee, employee_leave Where employee.id = employee_leave.id order by employee_leave.token";

//echo "$sql";

$result = mysqli_query($conn, $sql);

?>

<html>

<head><title>Employee Leave | Admin Panel | CUB Tech</title>

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 61 of 78


Employee Management System
<link rel="stylesheet" type="text/css" href="styleview.css">

</head>

<body>

<header><nav><h1>CUB Tech</h1><ul id="navli"><li><a class="homeblack"


href="aloginwel.php">HOME</a></li>

<li><a class="homeblack" href="addemp.php">Add Employee</a></li><li><a class="homeblack"


href="viewemp.php">View Employee</a></li><li><a class="homeblack" href="assign.php">Assign
Project</a></li>

<li><a class="homeblack" href="assignproject.php">Project Status</a></li>

<li><a class="homeblack" href="salaryemp.php">Salary Table</a></li>

<li><a class="homered" href="empleave.php">Employee Leave</a></li>

<li><a class="homeblack" href="alogin.html">Log Out</a></li></ul></nav></header>

<div class="divider"></div><div id="divimg"><table><tr>

<th>Emp. ID</th><th>Token</th><th>Name</th><th>Start Date</th><th>End Date</th><th>Total


Days</th><th>Reason</th><th>Status</th><th>Options</th>

</tr>

<?php

while ($employee = mysqli_fetch_assoc($result)) {

$date1 = new DateTime($employee['start']);

$date2 = new DateTime($employee['end']);

$interval = $date1->diff($date2);

$interval = $date1->diff($date2);

//echo "difference " . $interval->days . " days ";

echo "<tr>";echo "<td>".$employee['id']."</td>";

echo "<td>".$employee['token']."</td>";echo "<td>".$employee['firstName']." ".


$employee['lastName']."</td>";

echo "<td>".$employee['start']."</td>";echo "<td>".$employee['end']."</td>";


DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 62 of 78
Employee Management System
echo "<td>".$interval->days."</td>";echo "<td>".$employee['reason']."</td>";

echo "<td>".$employee['status']."</td>";

echo "<td><a href=\"approve.php?id=$employee[id]&token=$employee[token]\" onClick=\"return


confirm('Are you sure you want to Approve the request?')\">Approve</a> | <a href=\"cancel.php?
id=$employee[id]&token=$employee[token]\" onClick=\"return confirm('Are you sure you want to Canel
the request?')\">Cancel</a></td>";}

?>

</table>

</div></body>

</html>

8.LOGOUT

INPUT:

This module helps to logout from the Admin panel.

OUTPUT:

This module logouts admin from the Admin panel.

DESCRIPTION:

This button helps the Admin to logout from the Admin Panel. After clicking logout button the user
will be taken to a login page again.

SOURCE CODE:

<!DOCTYPE html>

<html>

<head><title>Contact | CUB Tech</title>

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

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-


50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
crossorigin="anonymous">

<link href="https://fonts.googleapis.com/css?family=Lobster|Montserrat" rel="stylesheet">

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 63 of 78


Employee Management System
</head>

<body><header>

<nav><h1>CUB Tech</h1>

<ul id="navli">

<li><a class="homeblack" href="elogin.html">LOG IN</a></li></ul>

</nav>

</header>

</body>

</html>

4.1.5 STORED PROCEDURE

A stored procedure is a set of Structured Query Language (SQL) statements with an


assigned name, which are stored in a relational database management system as a group, so it can be reused
and shared by multiple programs. Code for Stored Procedure is as follows:

Image 4.1.5 Stored Procedure

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 64 of 78


Employee Management System

Chapter-5

Results and Screenshots

1.HOME:

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 65 of 78


Employee Management System

Image 5.1.Home page.

2.ABOUT US:

Image 5.2 About us.

3.CONTACT:

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 66 of 78


Employee Management System

Image 5.3 Contact

4.LOGIN:

ADMIN LOGIN AND ADMIN PANEL:

Image 5.4 Admin login page

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 67 of 78


Employee Management System

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 68 of 78


Employee Management System

Image 5.6 Add Employee

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 69 of 78


Employee Management System

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 70 of 78


Employee Management System

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 71 of 78


Employee Management System

Image 5.5 Admin panel.

EMPLOYEE LOGIN AND EMPLOYEE PANEL:

Image 5.6 Employee Login Page.

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 72 of 78


Employee Management System

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 73 of 78


Employee Management System

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 74 of 78


Employee Management System

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 75 of 78


Employee Management System

Image 5.7 Employee Panel.

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 76 of 78


Employee Management System
Chapter-6

CONCLUSION AND FUTURE ENHANCEMENT

6.1 CONCLUSION
The “Employee Management System” provides better functionality for the management
to be more efficient and reduce manual paperwork in order to automate all possible tasks. It has
been developed in PHP, HTML and CSS keeping in mind the specification of the system. For
designing the system, PHP is being used as the front end in phpMyAdmin Environment.
Overall, the project teaches us the essential skills like:
 Understanding the database handling and query processing.
 Implement, analyse and evaluate the project developed for an application.
 Demonstrate the working of different concepts of DBMS.

6.2 FUTURE ENHANCEMENT


There are also few features which can be integrated with the system to make it more flexible.
Below list shows the future points to be considered:
 We can implement transaction of salary through.
 We can add a project report submission through online so that work will be done even
more faster.
 We can also add a graph which describes about company profits and losses.

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 77 of 78


Employee Management System
Chapter-7

References and Bibliography


1. https://www.tutorialspoint.com/dbms/index.htm
2. https://beginnersbook.com/2018/11/dbms-architecture/
3. DBMS Introduction (w3schools.in)
4. C# Corner - Community of Software and Data Developers (c-sharpcorner.com)
5. https://GitHub / GitHub
6. Learn PHP Tutorial - javatpoint

DEPT.OF COMPUTER SCIENCE & ENGINEERING, SCE, BANGALORE Page 78 of 78

You might also like