Download Human Resource Management System Project in PHP MySQL CodeIgniter with Source Code

  • Version
  • Download 18325
  • File Size 0.00 KB
  • Create Date January 5, 2022
  • Verify CAPTCHA to Download

Download Free Source Code for project based on Human Resource Management System in PHP MySQL using CodeIgniter Framework.

Available Features:
  • Admin Panel
  • Employee Panel
  • Setup Department, Designation
  • Employee Management System
  • Set Inactive Employees
  • Employee Attendance System
  • Attendance Report
  • Employee Leave System
  • Employee Leave Report
  • Project Management
  • Assign Tasks, Field Visit
  • Manage Holidays, Earn Leaves
  • Payroll System
  • Set Employees' Salary
  • Print Invoices
  • Payroll Reports
  • Loan Management
  • Installment Loans
  • Asset Management
  • Manage Logistic Support
  • Make Announcements
  • Personal To-Do List
  • System Settings
  • Update Personal Profile

Instructions: How to Run?

  • After you finish downloading the project, unzip the project file and head over to your XAMPP directory.
  • There you’ll find a folder naming “htdocs”.
  • Inside the “htdocs” folder, paste the project folder (not the .zip one, but the extracted one).
  • Open your favorite browser; we recommend using Google Chrome or Mozilla Firefox.
  • Then, go to URL “http://localhost/phpmyadmin“.
  • Create a Database with a name that is provided inside the “01 LOGIN DETAILS & PROJECT INFO.txt”.
  • Click on the “Import” tab and choose the database file (.sql) which is provided under the folder naming “DATABASE FILE”.
  • After setting up all these, go to URL “http://localhost/[ PROJECT_FOLDER_NAME ]/“
  • All the login details are provided inside the project folder, check that out and enter in order to use it.

And there you have it, a full setup of the Human Resource Management System project in PHP CodeIgniter. For this particular PHP project, PHP Version 5.6 or Newer is required because the project does not operate with the oldest PHP version. So, users with the oldest PHP version (older than 5.6) might face various problems while operating it. As a result, you’ll need to manage your PHP version (only if you’re using the old version) at the moment. Also, Download Free HR Management System Project in PHP MySQL CodeIgniter Source Code. So, this human resource management system PHP project is a fully functional project for all the intermediate levels that broads vast knowledge into such PHP web applications. In conclusion, this whole PHP project with free source code is an absolute project and a meaningful way for the users to learn and explore more about it.

31 comments

  1. A PHP Error was encountered
    Severity: 8192

    Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with Session Handler Interface:: open(string $path, string $ name): bool, or the #[\Return TypeWillChange] attribute should be used to temporarily suppress the notice……………

    am facing that error can you help please????

    1. This looks like an error coming from your LATEST version of PHP. This particular project is tested only with PHP 7.4, so the latest PHP 8 might create these problems. Still, you can find related solutions for these problems online!

      1. Pls help me its showing again and again 404 page not found and the page you requested was not found

  2. Can i get the full documentation of this project wich includes ER diagram, flowcharts and all the other things.
    Please

  3. Hi,

    I got this error:

    Severity: Warning
    Message: mysqli::real_connect(): (HY000/2006): MySQL server has gone away
    Filename: mysqli/mysqli_driver.php
    Line Number: 201

    Unable to connect to your database server using the provided settings.
    Filename: D:/wamp/www/HRSystem-CI/system/database/DB_driver.php
    Line Number: 436

    Connection string also correct

  4. A PHP Error was encountered
    Severity: 8192

    Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice………………………

    1. This looks like an error coming from your LATEST version of PHP. This particular project is tested only with PHP 7.4, so the latest PHP 8 might create these problems. Still, you can find related solutions for these problems online!

  5. Hii, i was looking at the system and noticed that the add bulk attendance function isnt working when i tried it, it shows this error message:

    Severity: Notice

    Message: Undefined index: Check-in at

    Filename: controllers/Attendance.php

    Line Number: 240

    Backtrace:

    File: C:\xampp\htdocs\HRSystem-CI\application\controllers\Attendance.php
    Line: 240
    Function: _error_handler

    File: C:\xampp\htdocs\HRSystem-CI\index.php
    Line: 322
    Function: require_once

    I hope you can help me with this thank you very much

    1. You are encountering an “Undefined index” notice because you are trying to access the “Check-in at” index in the $row array without checking if it exists. To fix this issue and prevent the notice, you should add a check to see if the index exists before accessing it. Here’s an updated version of your code with the necessary check:

      load->database();
      $this->load->model(‘login_model’);
      $this->load->model(‘dashboard_model’);
      $this->load->model(’employee_model’);
      $this->load->model(‘loan_model’);
      $this->load->model(‘settings_model’);
      $this->load->model(‘leave_model’);
      $this->load->model(‘attendance_model’);
      $this->load->model(‘project_model’);
      $this->load->library(‘csvimport’);
      }

      public function Attendance()
      {
      if ($this->session->userdata(‘user_login_access’) != False) {
      #$data[’employee’] = $this->employee_model->emselect();
      $data[‘attendancelist’] = $this->attendance_model->getAllAttendance();
      $this->load->view(‘backend/attendance’, $data);
      } else {
      redirect(base_url(), ‘refresh’);
      }
      }

      public function Save_Attendance()
      {
      if ($this->session->userdata(‘user_login_access’) != False) {
      $data[’employee’] = $this->employee_model->emselect();
      $id = $this->input->get(‘A’);
      if (!empty($id)) {
      $data[‘attval’] = $this->attendance_model->em_attendanceFor($id);
      }
      #$data[‘attendancelist’] = $this->attendance_model->em_attendance();
      $this->load->view(‘backend/add_attendance’, $data);
      } else {
      redirect(base_url(), ‘refresh’);
      }
      }

      public function Attendance_Report()
      {
      if ($this->session->userdata(‘user_login_access’) != False) {

      $data[’employee’] = $this->employee_model->emselect();
      $id = $this->input->get(‘A’);
      if (!empty($id)) {
      $data[‘attval’] = $this->attendance_model->em_attendanceFor($id);
      }

      $this->load->view(‘backend/attendance_report’, $data);
      } else {
      redirect(base_url(), ‘refresh’);
      }
      }

      public function getPINFromID($employee_ID) {
      return $this->attendance_model->getPINFromID($employee_ID);
      }

      public function Get_attendance_data_for_report()
      {
      if ($this->session->userdata(‘user_login_access’) != False) {
      $date_from = $this->input->post(‘date_from’);
      $date_to = $this->input->post(‘date_to’);
      $employee_id = $this->input->post(’employee_id’);
      $employee_PIN = $this->getPINFromID($employee_id)->em_code;
      $attendance_data = $this->attendance_model->getAttendanceDataByID($employee_PIN, $date_from, $date_to);
      $data[‘attendance’] = $attendance_data;
      $attendance_hours = $this->attendance_model->getTotalAttendanceDataByID($employee_PIN, $date_from, $date_to);
      if(!empty($attendance_data)){
      $data[‘name’] = $attendance_data[0]->name;
      $data[‘days’] = count($attendance_data);
      $data[‘hours’] = $attendance_hours;
      }
      echo json_encode($data);

      /*foreach ($attendance_data as $row) {
      $row =

      $numbering
      $row->first_name $row->first_name
      $row->atten_date
      $row->signin_time
      $row->signout_time
      $row->working_hour
      Type
      “;
      }*/

      } else {
      redirect(base_url(), ‘refresh’);
      }
      }

      public function Add_Attendance()
      {
      if ($this->session->userdata(‘user_login_access’) != False) {
      $id = $this->input->post(‘id’);
      $em_id = $this->input->post(’emid’);
      $attdate = $this->input->post(‘attdate’);
      $signin = $this->input->post(‘signin’);
      $signout = $this->input->post(‘signout’);
      $place = $this->input->post(‘place’);

      $this->load->library(‘form_validation’);
      $this->form_validation->set_error_delimiters();
      $this->form_validation->set_rules(‘attdate’, ‘Date details’, ‘trim|required|xss_clean’);
      $this->form_validation->set_rules(’emid’, ‘Employee’, ‘trim|required|xss_clean’);
      $old_date = $attdate; // returns Saturday, January 30 10 02:06:34
      $old_date_timestamp = strtotime($old_date);
      $new_date = date(‘m/d/Y’, $old_date_timestamp);

      // CHANGING THE DATE FORMAT FOR DB UTILITY
      $new_date_changed = date(‘Y-m-d’, strtotime(str_replace(‘-‘, ‘/’, $new_date)));

      if ($this->form_validation->run() == FALSE) {
      echo validation_errors();
      #redirect(“loan/View”);
      } else {
      $sin = new DateTime($new_date . $signin);
      $sout = new DateTime($new_date . $signout);
      $hour = $sin->diff($sout);
      $work = $hour->format(‘%H h %i m’);
      if (empty($id)) {
      $day = date(“D”, strtotime($new_date_changed));
      if($day == “Fri”) {
      $duplicate = $this->attendance_model->getDuplicateVal($em_id,$new_date_changed);
      //print_r($duplicate);
      if(!empty($duplicate)){
      echo “Already Exist”;
      } else {
      $emcode = $this->employee_model->emselectByCode($em_id);
      $emid = $emcode->em_id;
      $earnval = $this->leave_model->emEarnselectByLeave($emid);
      $data = array();
      $data = array(
      ‘present_date’ => $earnval->present_date + 1,
      ‘hour’ => $earnval->hour + 480,
      ‘status’ => ‘1’
      );
      $success = $this->leave_model->UpdteEarnValue($emid, $data);
      $data = array();
      $data = array(
      ’emp_id’ => $em_id,
      ‘atten_date’ => $new_date_changed,
      ‘signin_time’ => $signin,
      ‘signout_time’ => $signout,
      ‘working_hour’ => $work,
      ‘place’ => $place,
      ‘status’ => ‘E’
      );
      $success = $this->attendance_model->Add_AttendanceData($data);
      echo “Successfully Updated!”;
      }
      } elseif($day != “Fri”) {
      $holiday = $this->leave_model->get_holiday_between_dates($new_date_changed);
      if($holiday) {
      $duplicate = $this->attendance_model->getDuplicateVal($em_id,$new_date_changed);
      //print_r($duplicate);
      if(!empty($duplicate)){
      echo “Already Exist”;
      } else {
      $emcode = $this->employee_model->emselectByCode($em_id);
      $emid = $emcode->em_id;
      $earnval = $this->leave_model->emEarnselectByLeave($emid);
      $data = array();
      $data = array(
      ‘present_date’ => $earnval->present_date + 1,
      ‘hour’ => $earnval->hour + 480,
      ‘status’ => ‘1’
      );
      $success = $this->leave_model->UpdteEarnValue($emid, $data);
      $data = array();
      $data = array(
      ’emp_id’ => $em_id,
      ‘atten_date’ => $new_date_changed,
      ‘signin_time’ => $signin,
      ‘signout_time’ => $signout,
      ‘working_hour’ => $work,
      ‘place’ => $place,
      ‘status’ => ‘E’
      );
      $this->attendance_model->Add_AttendanceData($data);
      echo “Successfully Added”;
      }
      } else {
      $duplicate = $this->attendance_model->getDuplicateVal($em_id,$new_date_changed);
      //print_r($duplicate);
      if(!empty($duplicate)){
      echo “Already Exist”;
      } else {
      //$date = date(‘Y-m-d’, $i);

      $data = array();
      $data = array(
      ’emp_id’ => $em_id,
      ‘atten_date’ => $new_date_changed,
      ‘signin_time’ => $signin,
      ‘signout_time’ => $signout,
      ‘working_hour’ => $work,
      ‘place’ => $place,
      ‘status’ => ‘A’
      );
      $this->attendance_model->Add_AttendanceData($data);
      echo “Successfully Added.”;
      }
      }
      }
      } else {
      $data = array();
      $data = array(
      ‘signin_time’ => $signin,
      ‘signout_time’ => $signout,
      ‘working_hour’ => $work,
      ‘place’ => $place,
      ‘status’ => ‘A’
      );
      $this->attendance_model->Update_AttendanceData($id, $data);
      echo “Successfully Updated.”;
      }
      }
      } else {
      redirect(base_url(), ‘refresh’);
      }
      }
      function import()
      {
      $this->load->library(‘csvimport’);
      $file_data = $this->csvimport->get_array($_FILES[“csv_file”][“tmp_name”]);

      foreach ($file_data as $row) {
      // Check if the “Check-in at” index exists in the $row array
      if (isset($row[“Check-in at”]) && $row[“Check-in at”] > ‘0:00:00’) {
      $date = date(‘Y-m-d’, strtotime($row[“Date”]));
      $duplicate = $this->attendance_model->getDuplicateVal($row[“Employee No”], $date);

      if (!empty($duplicate)) {
      $data = array(
      ‘signin_time’ => $row[“Check-in at”],
      ‘signout_time’ => $row[“Check-out at”],
      ‘working_hour’ => $row[“Work Duration”],
      ‘absence’ => $row[“Absence Duration”],
      ‘overtime’ => $row[“Overtime Duration”],
      ‘status’ => ‘A’,
      ‘place’ => ‘office’
      );
      $this->attendance_model->bulk_Update($row[“Employee No”], $date, $data);
      } else {
      $data = array(
      ’emp_id’ => $row[“Employee No”],
      ‘atten_date’ => date(‘Y-m-d’, strtotime($row[“Date”])),
      ‘signin_time’ => $row[“Check-in at”],
      ‘signout_time’ => $row[“Check-out at”],
      ‘working_hour’ => $row[“Work Duration”],
      ‘absence’ => $row[“Absence Duration”],
      ‘overtime’ => $row[“Overtime Duration”],
      ‘status’ => ‘A’,
      ‘place’ => ‘office’
      );
      $this->attendance_model->Add_AttendanceData($data);
      }
      } else {
      // Handle the case where “Check-in at” is not defined or not greater than ‘0:00:00’
      // You can add error handling code here if needed
      }
      }
      echo “Successfully Updated”;
      }

      }
      ?>

Leave a Reply

Your email address will not be published. Required fields are marked *