public function index() { // check for logged in user $LC = new LoginCredentials(); $LC->checkAuthorization(); // this checks if the logged in user is staff, if its not then do not permit to show // the dataform page if ($LC->isHROrAdmin() == TRUE) { echo "<center><h2>You do not have permission to access this page.</h2></center>"; return; } // get the list of educational attainment data needed for the dropdown $data['educationAttainmentList'] = $this->Db_educattainment_model->educattainmentSelectAll(); // load the employee form data $data['formData'] = $this->Dataform_model->getEmployeeDataByID($this->session->userRec['employee_id']); // load the dependents data $data['dependentsData'] = $this->Dataform_model->getDependentsDataByID($this->session->userRec['employee_id']); // load the emergency contacts data $data['emergencyContactsData'] = $this->Dataform_model->getEmergencyContactsDataByID($this->session->userRec['employee_id']); // load the educRecord Data $data['acadStatusList'] = $this->Dataform_model->getEducRecordsDataByID($this->session->userRec['employee_id']); // display the pages with the passed data $this->load->view('templates/Header'); $this->load->view('dataform/Dataform', $data); $this->load->view('templates/Footer'); }
public function index() { // check for logged in user $LC = new LoginCredentials(); $LC->checkAuthorization(); // this checks if the logged in user is HR, if its not then do not permit to show // the datalist page if ($LC->isHROrAdmin() == FALSE) { echo "<center><h2>You do not have permission to access this page.</h2></center>"; return; } // get the list of educational attainment data needed for the dropdown $data['educationAttainmentList'] = $this->Db_educattainment_model->educattainmentSelectAll(); // get the list of employment status data needed for the dropdown $data['employmentStatus'] = $this->Db_employmentstatus_model->employmentStatusSelectAll(); // get the list of employment position data needed for the dropdown $data['employmentPosition'] = $this->Db_employment_position_model->employmentPositionSelectAll(); // get the list of departments data needed for the dropdown $data['departments'] = $this->Db_departments_model->departmentsSelectAll(); // get the list of taxstatus data needed for the dropdown $data['taxStatusList'] = $this->Db_taxstatus_model->taxStatusSelectAll(); // get the list of clients data needed for dropdown $data['clientList'] = $this->Db_clients_model->clientsSelectAll(); // load the employee datalist $data['listData'] = $this->Datalist_model->getEmployeeDataByUserID(); // display the pages with the passed data $this->load->view('templates/Header'); $this->load->view('datalist/Datalist', $data); $this->load->view('templates/Footer'); }
public function index() { // check for logged in user $LC = new LoginCredentials(); $LC->checkAuthorization(); // this gets all the users list on the user control $data['usersList'] = $this->Usercontrol_model->getAllUsersList(); // this gets all the departments list for the user control dropdown $data['userTypeList'] = $this->Usercontrol_model->getAllUserType(); // get the HR position status of the currently logged in user $data['isHROrAdmin'] = $LC->isHROrAdmin(); // used for viewing the pages and passing data $this->load->view('templates/Header'); $this->load->view('usercontrol/Usercontrol', $data); $this->load->view('templates/Footer'); }