D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
alumni
/
application
/
controllers
/
user
/
Filename :
Dashboard.php
back
Copy
<?php /** * Description of User * * @author Softpro India Pvt. Ltd. */ class Dashboard extends CI_Controller { //put your code here public function __construct() { parent::__construct(); $this->load->model("admin/reports/DashboardReport"); $this->load->model("admin/NotificationManagement"); } public function index() { if ($this->sessionvalidator->validateSession('userData')) { $userData = $this->session->userdata("userData"); $viewData["notificationList"] = $this->NotificationManagement->getNotificationsForUserDashboard($userData["userid"], $userData["user_role"])->result(); $studentCountPerCourse = $this->DashboardReport->getStudentCountReportInJSON(); $alumniCountPerCourse = $this->DashboardReport->getAlumniCountReportInJSON(); $totalAlumni = $this->DashboardReport->getTotalAlumniResgistered()[0]->totalAlumni; $totalStudent = $this->DashboardReport->getTotalStudentResgistered()[0]->totalStudent; $viewData["notifications"] = $this->NotificationManagement->getNotifications()->result(); $viewData["studentCountPerCourse"] = $studentCountPerCourse; $viewData["alumniCountPerCourse"] = $alumniCountPerCourse; $viewData["totalAlumni"] = $totalAlumni; $viewData["totalStudent"] = $totalStudent; $viewData["userSessionData"] = $this->session->userdata("userData"); $this->load->view("user/dashboard", $viewData); } else { redirect("Home#loginModal"); } } }