Skip to main content

Attendance and Payroll System using PHP

Language


This is a simple attendance and payroll system using PHP and MySQLi-OOP as db driver. It has an attendance on the client side and payroll on the admin side. This system is written in pure PHP with no framework so it is understandable to beginners.

Features:

  • CRUD - Employee Attendance
  • CRUD - Employee
  • Employee Cash Advance
  • Employee Overtime
  • Employee Schedule
  • Payroll on Date Range
  • Payslip on Date Range

Plugins:

  • AdminLTE
  • TCPDF library

Installation

1. Download the source code using the Download button below.

2. Extract the downloaded file to your localhost folder ex. htdocs for XAMMP.

3. Import the included .sql file which is the database of the system. If you have no idea on how to import, please refer to my tutorial on How import .sql file to restore MySQL database.

4. After a successful import, open the extracted folder and open conn.php in both the root folder and in admin/includes folder. Edit the database name in the connection depending on the name of database you created in importing the included .sql file.

Accessing the Admin

You can access the admin side by adding /admin/. You should be able to navigate to admin login page.

You can then use the below admin credential:

Username: nurhodelta
Password: password

That's it. You should now be able to run the simple system :)

If you have any suggestions, comments or reactions, feel free to comment below or message me.

Happy Coding :)

*Updates: 05-21-18
1. Fixed dynamic buttons (edit, delete, etc ) not functioning on page2 or more of table.
2. Fixed time in showing late even on time.

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Submitted bybelal111 (not verified)on Mon, 05/14/2018 - 03:30

Field 'status' doesn't have a default value

Submitted byKul joseph (not verified)on Mon, 05/14/2018 - 20:59

Hi. I downloaded and wanted to explore this system but i cant login as admin..i used username and pswd in the database and even tried changing several times but it keeps saying incorrect pswd on the admin login page. Pls help

Submitted byCjkwani (not verified)on Sat, 05/19/2018 - 05:01

Hi there. After adding employees or positions and even the attendance..after going to the next page..the edit and delete buttons dont work from the second page. Kindly advise

Just change the button for edit and delete..

For edit:
$(document).on('click', '.edit', function(e){
e.preventDefault();
///the codes here
});

For delete
$(document).on('click', '.delete', function(e){
e.preventDefault();
///the codes here
});

Same goes for other dynamic buttons

Submitted byCjkwani (not verified)on Mon, 05/21/2018 - 02:51

Hey. Thanks so much, your earlier feedback worked perfectly for the edit and delete buttons. What should i do about the employee sign in..its now not working or submiting emp id. Ua help will be appreciated.

Submitted byCkmwani (not verified)on Tue, 05/22/2018 - 16:02

Hi. When i make changes say with the edit and delete buttons from page 2 onwards, the page always reloads to the first page. How can i make it to remain on the current page after changes. Thank u

Submitted byKul josephon Wed, 05/23/2018 - 04:23

Hi. The system doesnt record overtime unless i add it manually. Can it reflect automatically? Pls advise

Submitted byJames K (not verified)on Sat, 05/26/2018 - 22:03

How can i change the index/login page background color(currently grey-ish) to cover image and which file do i need to go to. Regards

Submitted byCjqwan (not verified)on Sun, 06/03/2018 - 18:08

Hello. I would like for the employee to be able to login using employee_id and passwd. Employee would be able to view his/her details e.g, attendance records of himself/herself,deductions, cash advance,schedule and position. How do i address this pls help

Submitted byShinsuke (not verified)on Wed, 06/13/2018 - 12:53

This system is useless without user mode, I suggest that when the user is login it will only see his/ her information.

Submitted byC.K. Patrick (not verified)on Sun, 06/24/2018 - 22:15

How would i change the background image of the index pages. Please help. Great system by the way.

Submitted byNorshami (not verified)on Wed, 09/05/2018 - 15:10

Fatal error: Call to undefined function password_verify() in C:\wamp\www\Downloaded Projects\apsystem_0\apsystem\admin\login.php on line 17
Call Stack
# Time Memory Function Location
1 0.0000 147984 {main}( ) ..\login.php:0

Submitted byusman123 (not verified)on Tue, 10/30/2018 - 20:00

In reply to by Norshami (not verified)

Fatal error: Call to undefined function password_verify() in C:\wamp\www\Downloaded Projects\apsystem_0\apsystem\admin\login.php on line 17
I am also facing this error

Submitted byAbraham kibet (not verified)on Mon, 11/12/2018 - 15:17

hi,kindly help me with the full documentation of this project.

Submitted byGokila (not verified)on Fri, 02/15/2019 - 16:25

Hi, i ran the code in wamp server but the page it viewed is only the employee login asking only two fields time-in or time-out and employee id.when i clicked on the sign-in option it showed "Time - in: 'and the name'" nothing else happened .So what should i have to do to run this project........ pls reply me....

Submitted byBashir Babatun… (not verified)on Tue, 02/19/2019 - 17:29

This is the error i get wen logging in as an administrator pls help
Fatal error: Call to undefined function password_verify() in C:\wamp\www\apsystem\admin\login.php on line 17

Submitted byenadrahc (not verified)on Wed, 03/13/2019 - 13:59

In reply to by Bashir Babatun… (not verified)

Use Php version 5.5.0 to avoid the problem

great information i received on this site.

Submitted byMonthon (not verified)on Mon, 04/15/2019 - 23:06

Thank you for the best source code. How to set width for modal?

Submitted bySaifuzaman (not verified)on Mon, 05/13/2019 - 13:28

How do I make the punch in and out details shown in same page as punch page?

So, user can see their punch in and out details on the spot. It is like the punch section on the top of page and the details at the bottom of page.

Submitted byPath path (not verified)on Sun, 05/19/2019 - 23:03

Hi, how can i run this source code? where? can you help me?

Submitted byManoj Perera (not verified)on Sat, 07/13/2019 - 10:43

Hi neovic,

I was eager to learn PHP dashboard concept but all tutorials i followed were not this much elaborated. It's very rare to find very good hearts like you in this world and I am taking this opportunity to thank you and may triple gems bless you and your family.

Please do send me your email to [email protected]

With Best Regards,
Manoj Perera

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\htdocs\apsystem_0\apsystem\tcpdf\tcpdf.php on line 17778
TCPDF ERROR: Some data has already been output, can't send PDF file

Submitted byWebDesignCritic (not verified)on Mon, 08/26/2019 - 01:21

How can the system calculate the overtime

Submitted byAnonymous (not verified)on Tue, 05/19/2020 - 14:46

Hi, When I Customized the html modal form and the length of the script is to long. When I clicked the value button of modal it doesn't show but when removed temporarily the other includes php modals html script it show the modal form

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.