GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 18.119.120.59
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/../admission/../jobs/application/controllers/user/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../admission/../jobs/application/controllers/user/Report.php
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Report
 *
 * @author Softpro India Pvt. Ltd
 */
class Report extends CI_Controller {

    //put your code here
    public function __construct() {
        parent::__construct();
        $this->load->model("admin/DesignationManagement");
        $this->load->model("admin/DepartmentManagement");
        $this->load->model("user/ReportManagement");
        $this->load->model("admin/SessionManagement");
        $this->load->model("user/DashboardManagement");
    }

    public function index() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $viewData = array();
            $applications = array();
            $userData=$this->session->userdata("userData");
            
            $app_details = $this->ReportManagement->getApplicationsDetails($userData["user_id"])->result();
            //echo $this->db->last_query();
            //print_r(sizeof($app_details));
            //exit;
            if (sizeof($app_details) > 0) {
                for ($i = 0; $i < sizeof($app_details); $i++) {
                    $record = $app_details[$i];
                    $vacancies = $this->ReportManagement->getAppliedVacanies($record->app_details_id)->result();
                    $depts = array();
                    $desigs = array();
                    $applicationFormNo;
                    for ($v = 0; $v < sizeof($vacancies); $v++) {
                        $vac = $vacancies[$v];
                        array_push($desigs, $vac->desig_name);
                        array_push($depts, $vac->dm_name);
                        $applicationFormNo = $vac->am_disp_id;
                    }
                    $apps = array(
                        "photo" => $record->photo,
                        "sign" => $record->sig,
                        "name" => $record->cper,
                        "gender" => ($record->gender == "M") ? "Male" : (($record->gender == "F") ? "Female" : "Transgender"),
                        "m_status" => ($record->m_status == "M") ? "Married" : "Unmarried",
                        "fanm" => $record->fanm,
                        "mail_add" => $record->mailadd,
                        "mailing_city" => $record->mailing_city,
                        "mailing_state" => $record->mailing_state,
                        "mailing_pin" => $record->cpin,
                        "per_add" => $record->peradd,
                        "per_city" => $record->per_city,
                        "per_state" => $record->per_state,
                        "per_pin" => $record->ppin,
                        "mobile" => $record->pno,
                        "email" => $record->email,
                        "pan" => ($record->pan == null || $record->pan == "") ? "N/A" : $record->pan,
                        "adh" => ($record->adh == null || $record->adh == "") ? "N/A" : $record->adh,
                        "dob" => date('d-m-Y', strtotime($record->cdate)),
                        "exam10" => $record->exam10,
                        "univ10" => $record->univ10,
                        "subject10" => $record->subject10,
                        "per10" => $record->per10,
                        "div10" => $record->div10,
                        "year10" => $record->year10,
                        "exam12" => $record->exam12,
                        "univ12" => $record->univ12,
                        "subject12" => $record->subject12,
                        "per12" => $record->per12,
                        "div12" => $record->div12,
                        "year12" => $record->year12,
                        "exam1" => $record->grad,
                        "univ1" => $record->univ1,
                        "subject1" => $record->subject1,
                        "per1" => $record->per1,
                        "div1" => $record->div1,
                        "year1" => $record->year1,
                        "other1" => ($record->other1 == null || $record->other1 == "") ? "" : $record->other1,
                        "exam2" => $record->post,
                        "univ2" => $record->univ2,
                        "subject2" => $record->subject2,
                        "per2" => $record->per2,
                        "div2" => $record->div2,
                        "year2" => $record->year2,
                        "other2" => ($record->other2 == null || $record->other2 == "") ? "" : $record->other2,
                        "exam0" => ($record->exam0 == null || $record->exam0 == "") ? "" : $record->exam0,
                        "univ0" => ($record->univ0 == null || $record->univ0 == "") ? "" : $record->univ0,
                        "subject0" => ($record->subject0 == null || $record->subject0 == "") ? "" : $record->subject0,
                        "per0" => ($record->per0 == null || $record->per0 == "") ? "" : $record->per0,
                        "div0" => ($record->div0 == null || $record->div0 == "") ? "" : $record->div0,
                        "year0" => ($record->year0 == null || $record->year0 == "") ? "" : $record->year0,
                        "other0" => ($record->other0 == null || $record->other0 == "") ? "" : $record->other0,
                        "phd" => ($record->phd == null || $record->phd == "") ? "" : $record->phd,
                        "phuniv" => ($record->phuniv == null || $record->phuniv == "") ? "" : $record->phuniv,
                        "phtopic" => ($record->phtopic == null || $record->phtopic == "") ? "" : $record->phtopic,
                        "phstream" => ($record->phstream == null || $record->phstream == "") ? "" : $record->phstream,
                        "phyear" => ($record->phyear == null || $record->phyear == "") ? "" : $record->phyear,
                        "phother" => ($record->phother == null || $record->phother == "") ? "" : $record->phother,
                        "net" => ($record->net == null || $record->net == "") ? "" : $record->net,
                        "netstream" => ($record->netstream == null || $record->netstream == "") ? "" : $record->netstream,
                        "netyear" => ($record->netyear == null || $record->netyear == "") ? "" : $record->netyear,
                        "netother" => ($record->netother == null || $record->netother == "") ? "" : $record->netother,
                        "docs" => ($record->docs == null || $record->docs == "") ? "" : $record->docs,
                        "departments" => implode(",", $depts),
                        "designations" => implode(",", $desigs),
                        "employer1" => $record->emp1,
                        "desig1" => $record->desig1,
                        "location1" => $record->loc1,
                        "duration1" => $record->duration1,
                        "employer2" => $record->emp2,
                        "desig2" => $record->desig2,
                        "location2" => $record->loc2,
                        "duration2" => $record->duration2,
                        "journal" => ($record->journal == null || $record->journal == "") ? 0 : $record->journal,
                        "workshop" => ($record->workshop == null || $record->workshop == "") ? 0 : $record->workshop,
                        "books" => ($record->books == null || $record->books == "") ? 0 : $record->books,
                        "chapters" => ($record->chapters == null || $record->chapters == "") ? 0 : $record->chapters,
                        "seminar" => ($record->seminar == null || $record->seminar == "") ? 0 : $record->seminar,
                        "conference" => ($record->conference == null || $record->conference == "") ? 0 : $record->conference,
                        "extra" => ($record->extra == null || $record->extra == "") ? "" : $record->extra,
                        "ref1" => ($record->ref1 == null || $record->ref1 == "") ? "" : $record->ref1,
                        "ref2" => ($record->ref2 == null || $record->ref2 == "") ? "" : $record->ref2,
                        "applicationFormNo" => $applicationFormNo,
                        "regdt" => date("d-m-Y", strtotime($record->regdt)),
                        "academic" => ($record->academic == null || $record->academic == "") ? 0 : $record->academic,
                        "industry" => ($record->industry == null || $record->industry == "") ? 0 : $record->industry,
                        "app_details_id" => $record->app_details_id
                    );
                    array_push($applications, $apps);
                }
            }
            //print_r(sizeof($applications));
            //print_r($applications);
            //exit;
            $viewData["report"] = $applications;
            $viewData["firstStep"] = $this->DashboardManagement->getStepsDetails(1)->result()[0];
            $this->load->view("user/applicationReport", $viewData);
        } else {
            redirect("Home");
        }
    }

    public function applicationDetails($app_details_id) {
        if ($this->sessionvalidator->validateSession("userData")) {
            $app_details = $this->ReportManagement->getApplicationsDetails('',$app_details_id)->result();
            $applications = array();
            //echo $this->db->last_query();
            if (sizeof($app_details) > 0) {
                for ($i = 0; $i < sizeof($app_details); $i++) {
                    $record = $app_details[$i];
                    $vacancies = $this->ReportManagement->getAppliedVacanies($record->app_details_id)->result();
                    $depts = array();
                    $desigs = array();
                    $applicationFormNo;
                    for ($v = 0; $v < sizeof($vacancies); $v++) {
                        $vac = $vacancies[$v];
                        array_push($desigs, $vac->desig_name);
                        array_push($depts, $vac->dm_name);
                        $applicationFormNo = $vac->am_disp_id;
                    }
                    $apps = array(
                        "photo" => $record->photo,
                        "sign" => $record->sig,
                        "name" => $record->cper,
                        "gender" => ($record->gender == "M") ? "Male" : (($record->gender == "F") ? "Female" : "Transgender"),
                        "m_status" => ($record->m_status == "M") ? "Married" : "Unmarried",
                        "fanm" => $record->fanm,
                        "mail_add" => $record->mailadd,
                        "mailing_city" => $record->mailing_city,
                        "mailing_state" => $record->mailing_state,
                        "mailing_pin" => $record->cpin,
                        "per_add" => $record->peradd,
                        "per_city" => $record->per_city,
                        "per_state" => $record->per_state,
                        "per_pin" => $record->ppin,
                        "mobile" => $record->pno,
                        "email" => $record->email,
                        "pan" => ($record->pan == null || $record->pan == "") ? "N/A" : $record->pan,
                        "adh" => ($record->adh == null || $record->adh == "") ? "N/A" : $record->adh,
                        "dob" => date('d-m-Y', strtotime($record->cdate)),
                        "exam10" => $record->exam10,
                        "univ10" => $record->univ10,
                        "subject10" => $record->subject10,
                        "per10" => $record->per10,
                        "div10" => $record->div10,
                        "year10" => $record->year10,
                        "exam12" => $record->exam12,
                        "univ12" => $record->univ12,
                        "subject12" => $record->subject12,
                        "per12" => $record->per12,
                        "div12" => $record->div12,
                        "year12" => $record->year12,
                        "exam1" => $record->grad,
                        "univ1" => $record->univ1,
                        "subject1" => $record->subject1,
                        "per1" => $record->per1,
                        "div1" => $record->div1,
                        "year1" => $record->year1,
                        "other1" => ($record->other1 == null || $record->other1 == "") ? "" : $record->other1,
                        "exam2" => $record->post,
                        "univ2" => $record->univ2,
                        "subject2" => $record->subject2,
                        "per2" => $record->per2,
                        "div2" => $record->div2,
                        "year2" => $record->year2,
                        "other2" => ($record->other2 == null || $record->other2 == "") ? "" : $record->other2,
                        "exam0" => ($record->exam0 == null || $record->exam0 == "") ? "" : $record->exam0,
                        "univ0" => ($record->univ0 == null || $record->univ0 == "") ? "" : $record->univ0,
                        "subject0" => ($record->subject0 == null || $record->subject0 == "") ? "" : $record->subject0,
                        "per0" => ($record->per0 == null || $record->per0 == "") ? "" : $record->per0,
                        "div0" => ($record->div0 == null || $record->div0 == "") ? "" : $record->div0,
                        "year0" => ($record->year0 == null || $record->year0 == "") ? "" : $record->year0,
                        "other0" => ($record->other0 == null || $record->other0 == "") ? "" : $record->other0,
                        "phd" => ($record->phd == null || $record->phd == "") ? "" : $record->phd,
                        "phuniv" => ($record->phuniv == null || $record->phuniv == "") ? "" : $record->phuniv,
                        "phtopic" => ($record->phtopic == null || $record->phtopic == "") ? "" : $record->phtopic,
                        "phstream" => ($record->phstream == null || $record->phstream == "") ? "" : $record->phstream,
                        "phyear" => ($record->phyear == null || $record->phyear == "") ? "" : $record->phyear,
                        "phother" => ($record->phother == null || $record->phother == "") ? "" : $record->phother,
                        "net" => ($record->net == null || $record->net == "") ? "" : $record->net,
                        "netstream" => ($record->netstream == null || $record->netstream == "") ? "" : $record->netstream,
                        "netyear" => ($record->netyear == null || $record->netyear == "") ? "" : $record->netyear,
                        "netother" => ($record->netother == null || $record->netother == "") ? "" : $record->netother,
                        "docs" => ($record->docs == null || $record->docs == "") ? "" : $record->docs,
                        "departments" => $depts,
                        "designations" => $desigs,
                        "employer1" => $record->emp1,
                        "desig1" => $record->desig1,
                        "location1" => $record->loc1,
                        "duration1" => $record->duration1,
                        "employer2" => $record->emp2,
                        "desig2" => $record->desig2,
                        "location2" => $record->loc2,
                        "duration2" => $record->duration2,
                        "journal" => ($record->journal == null || $record->journal == "") ? 0 : $record->journal,
                        "workshop" => ($record->workshop == null || $record->workshop == "") ? 0 : $record->workshop,
                        "books" => ($record->books == null || $record->books == "") ? 0 : $record->books,
                        "chapters" => ($record->chapters == null || $record->chapters == "") ? 0 : $record->chapters,
                        "seminar" => ($record->seminar == null || $record->seminar == "") ? 0 : $record->seminar,
                        "conference" => ($record->conference == null || $record->conference == "") ? 0 : $record->conference,
                        "extra" => ($record->extra == null || $record->extra == "") ? "" : $record->extra,
                        "ref1" => ($record->ref1 == null || $record->ref1 == "") ? "" : $record->ref1,
                        "ref2" => ($record->ref2 == null || $record->ref2 == "") ? "" : $record->ref2,
                        "applicationFormNo" => $applicationFormNo,
                        "regdt" => date("d-m-Y", strtotime($record->regdt)),
                        "academic" => ($record->academic == null || $record->academic == "") ? 0 : $record->academic,
                        "industry" => ($record->industry == null || $record->industry == "") ? 0 : $record->industry,
                        "docs" => $record->docs,
                        "app_details_id"=>$record->app_details_id
                    );
                    array_push($applications, $apps);
                }
            } else {
                
            }
            $viewData["application_details"] = $applications;
            $viewData["firstStep"] = $this->DashboardManagement->getStepsDetails(1)->result()[0];
            $this->load->view("user/applicationDetails", $viewData);
        } else {
            redirect("Home");
        }
    }

}

KBHT - 2023