D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
www
/
jobs
/
application
/
controllers
/
user
/
Filename :
Dashboard.php
back
Copy
<?php /** * * @author Softpro India Pvt. Ltd */ class Dashboard extends CI_Controller { //put your code here public function __construct() { parent::__construct(); $this->load->model("user/ApplicationManagement"); $this->load->model("user/DashboardManagement"); $this->load->model("user/VacancyManagement"); } public function index() { if ($this->sessionvalidator->validateSession("userData")) { $userData = $this->session->userdata("userData"); //echo $userData["user_id"]; // echo sizeof($this->ApplicationManagement->checkUserApplicationAvaibility($userData["user_id"])->result()); $uniqueApplicationID = $this->session->userdata("application_id"); $vacancy = $this->VacancyManagement->getVacancies($currentDate=date("Y-m-d"), $userData["user_id"])->result(); if (sizeof($vacancy) > 0) { $viewData["vacancyStatsIsNull"] = false; } else { $viewData["vacancyStatsIsNull"] = true; } if (sizeof($this->ApplicationManagement->checkUserApplicationAvaibility($userData["user_id"], $uniqueApplicationID)->result()) > 0) { $viewData["steps"] = $this->DashboardManagement->getStepsDetails()->result(); $viewData["firstStep"] = $this->DashboardManagement->getStepsDetails(1)->result()[0]; $viewData["firstLogin"] = false; $app_details = $this->ApplicationManagement->getUserApplicationDeatilsID($userData["user_id"])->result()[0]; $viewData["stepsStatusArray"] = array($app_details->step1, $app_details->step2, $app_details->step3, $app_details->step4, $app_details->step5, $app_details->step6); $viewData["app_details"] = $app_details; } else { $viewData["firstStep"] = $this->DashboardManagement->getStepsDetails(1)->result()[0]; $viewData["firstLogin"] = true; } $viewData["totalApplicationCount"]=$this->ApplicationManagement->getTotalAppliedApplications($userData["user_id"])->result(); $viewData["totalOpeningsCount"]=$this->VacancyManagement->getTotalOpenings(date("Y-m-d"))->result(); $viewData["totalDeclarationCount"]=$this->ApplicationManagement->getTotalAppliedApplicationsDeclarationStatus($userData["user_id"])->result(); $this->load->view("user/dashboard", $viewData); } else { redirect("Home"); } } }