D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
www
/
cas
/
application
/
controllers
/
student
/
Filename :
Dashboard.php
back
Copy
<?php /** * Dashboard Controller For Student Module * * @author Softpro India Pvt. Ltd. */ defined('BASEPATH') OR exit('No direct script access allowed'); class Dashboard extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model("admin/FeeManagement"); $this->load->model("admin/HolidayManagement"); $this->load->model("admin/NotificationManagement"); } public function index() { if ($this->sessionvalidator->isStudentLoggedIn()) { $viewData['wishMessage'] = $this->getWishMessage(); /* Holiday Calendar Data */ $viewData["holiday"] = $this->HolidayManagement->getAllHolidays()->result(); /* Holiday Calendar Data */ /*Notice Data*/ $viewData['notices'] = $this->NotificationManagement->getAllNotificationBy("S")->result(); /*Notice Data*/ $this->load->view('student/dashboard', $viewData); } else { redirect("student/"); } } public function getWishMessage() { $time = date("H"); if ($time < "12") { return "Good morning "; } else if ($time >= "12" && $time < "17") { return "Good afternoon "; } else { return "Good evening "; } } }