D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
jobs
/
application
/
controllers
/
admin
/
Filename :
Dashboard.php
back
Copy
<?php /** * Description of Dashboard * * @author Softpro India Pvt. Ltd */ class Dashboard extends CI_Controller { //put your code here public function __construct() { parent::__construct(); $this->load->model("admin/CategoryManagement"); $this->load->model("admin/DepartmentManagement"); $this->load->model("admin/VacancyManagement"); $this->load->model("user/ApplicationManagement"); $this->load->model("admin/SessionManagement"); $this->load->model("admin/Reports/DashboardReports"); } public function index() { if ($this->sessionvalidator->validateSession()) { $viewData["sessions"] = $this->SessionManagement->getSessions('T', 'F')->result(); $viewData["totalCategoryCount"] = $this->DashboardReports->getTotalCategoryCount()->result(); $viewData["totalDepartmentCount"] = $this->DepartmentManagement->getDepartments()->result(); $viewData["totalOpeningCount"] = $this->DashboardReports->getTotalOpenings()->result(); $viewData["totalApplicationCount"] = $this->DashboardReports->getTotalApplicationCount()->result(); $viewData["openingsPerSession"] = $this->DashboardReports->getOpeningsPerSessionReportInJSON(); $viewData["applicationsPerDepartmentForCurrentSession"] = $this->DashboardReports->getApplicationPerDepartmentReportInJSON(); $viewData["applicationsPerCategoryForCurrentSession"] = $this->DashboardReports->getApplicationPerCategoryReportInJSON(); $viewData["applicationsPerDesignationForCurrentSession"] = $this->DashboardReports->getApplicationPerDesignationReportInJSON(); $viewData["selectedSessionId"]=0; //print_r($viewData["applicationsPerCategoryForCurrentSession"]); //exit; $this->load->view("admin/dashboard", $viewData); } else { redirect("admin"); } } public function differentSession() { if ($this->sessionvalidator->validateSession()) { $selectedSession = $this->input->post('session'); $viewData["sessions"] = $this->SessionManagement->getSessions('T', 'F')->result(); $viewData["totalCategoryCount"] = $this->DashboardReports->getTotalCategoryCount()->result(); $viewData["totalDepartmentCount"] = $this->DepartmentManagement->getDepartments()->result(); $viewData["totalOpeningCount"] = $this->DashboardReports->getTotalOpenings($selectedSession)->result(); $viewData["totalApplicationCount"] = $this->DashboardReports->getTotalApplicationCount($selectedSession)->result(); $viewData["openingsPerSession"] = $this->DashboardReports->getOpeningsPerSessionReportInJSON($selectedSession); $viewData["applicationsPerDepartmentForCurrentSession"] = $this->DashboardReports->getApplicationPerDepartmentReportInJSON($selectedSession); $viewData["applicationsPerCategoryForCurrentSession"] = $this->DashboardReports->getApplicationPerCategoryReportInJSON($selectedSession); $viewData["applicationsPerDesignationForCurrentSession"] = $this->DashboardReports->getApplicationPerDesignationReportInJSON($selectedSession); $viewData["selectedSessionId"]=$selectedSession; $this->load->view("admin/dashboard", $viewData); } else { redirect("admin"); } } }