D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
cas
/
application
/
controllers
/
admin
/
Filename :
Admin.php
back
Copy
<?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'); } } }