GIF89a; CRX
KBHT HEHE
Server IP : 172.26.0.195  /  Your IP : 3.142.171.100
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/student/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/jnclnmuac/public_html/web/../admission/../cas/application/views/admin/student/editStudent.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 <?php echo stripslashes($stuPersonalInfoWithPicAndSign->tspi_name); ?> | 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="image icon" href="<?php echo base_url("assets/admin/images/logo.png"); ?>">
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&amp;display=swap">
        <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/Student/"); ?>">Student Management</a></li>
                            <li class="breadcrumb-item active" aria-current="page"><a href="<?php echo site_url("admin/Student/editStudent/" . $stuPersonalInfoWithPicAndSign->tspi_id); ?>">Edit Student</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-address-book-o"></i> Edit Student => <b><?php echo stripslashes($stuPersonalInfoWithPicAndSign->tspi_name); ?></b></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_multipart(site_url('admin/Student/updateStudent'), ['name' => 'studentEnrollmentEditFrm', 'id' => 'studentEnrollmentEditFrm']); ?>
                                <div class="form-row">
                                    <div class="form-group col-md-3">
                                        <label for="stuBranch" class="input__label">Branch <span class="required">*</span></label>
                                        <select id="stuBranch" name="stuBranch" class="custom-select">
                                            <option value="">Select Branch</option>
                                            <?php
                                            $selected = (sizeof($branches) > 2) ? "" : "selected";
                                            foreach ($branches as $branch) {
                                                if ($branch->branch_id == 0 || $branch->branch_id == '0') {
                                                    continue;
                                                }
                                                $selected = ($branch->branch_id == $stuPersonalInfoWithPicAndSign->branch_id) ? "selected" : "";
                                                ?>
                                                <option value="<?php echo $branch->branch_id; ?>" <?php echo set_select("stuBranch", $branch->branch_id); ?> <?php echo $selected; ?>><?php echo stripslashes($branch->branch_name); ?></option>
                                            <?php }
                                            ?>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-3">
                                        <label for="stuCourse" class="input__label">Course <span class="required">*</span></label>
                                        <select id="stuCourse" name="stuCourse" class="custom-select readonly">
                                            <option value="" <?php echo set_select("stuCourse", "") ?>>Select Course</option>
                                            <?php
                                            foreach ($courses as $course) {
                                                $selected = ($course->course_id == $stuPersonalInfoWithPicAndSign->course_id) ? "selected" : "";
                                                ?>
                                                <option value="<?php echo $course->course_id; ?>" <?php echo $selected; ?>><?php echo stripslashes($course->course_name); ?></option>
                                            <?php }
                                            ?>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-3">
                                        <label for="stuSession" class="input__label">Session <span class="required">*</span></label>
                                        <select id="stuSession" name="stuSession" class="custom-select">
                                            <option value="">Select Session</option>
                                        </select>
                                    </div>
                                    <div class="form-group col-md-3">
                                        <label for="stuEntryType" class="input__label">Entry Type <span class="required">*</span></label>
                                        <select id="stuEntryType" name="stuEntryType" class="custom-select">
                                            <option value="">Select Entry Type</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-row">
                                    <div class="form-group col-md-4">
                                        <label for="stuFormNo" class="input__label">Form No <span class="required">*</span></label>
                                        <input type="text" class="form-control" id="stuFormNo" name="stuFormNo" value="<?php echo $stuPersonalInfoWithPicAndSign->tspi_form_no; ?>" placeholder="Enter Form No." autocomplete="off" maxlength="15">
                                        <small id="formNotAvail" style="color:#FF0000;font-weight: bold;"></small>
                                    </div>
                                    <div class="form-group col-md-4">
                                        <label for="stuEnrlNo" class="input__label">Enrl. No.</label>
                                        <input type="text" class="form-control" id="stuEnrlNo" name="stuEnrlNo" value="<?php echo ($stuPersonalInfoWithPicAndSign->tspi_enrollment_no == $stuPersonalInfoWithPicAndSign->tspi_form_no) ? "" : stripslashes($stuPersonalInfoWithPicAndSign->tspi_enrollment_no); ?>" placeholder="Enter Enrl. No." autocomplete="off" maxlength="20">
                                        <small id="enrlNotAvail" style="color:#FF0000;font-weight: bold;"></small>
                                    </div>
                                    <div class="form-group col-md-4">
                                        <label for="stuRollNo" class="input__label">Roll No.</label>
                                        <input type="text" class="form-control" id="stuRollNo" name="stuRollNo" value="<?php echo ($stuPersonalInfoWithPicAndSign->tspi_rollNumber == $stuPersonalInfoWithPicAndSign->tspi_form_no) ? "" : $stuPersonalInfoWithPicAndSign->tspi_rollNumber; ?>" placeholder="Enter Roll No." autocomplete="off" maxlength="20">
                                        <small id="RollNotAvail" style="color:#FF0000;font-weight: bold;"></small>
                                    </div>
                                </div>
                                <hr>
                                <fieldset>
                                    <legend><b>PERSONAL DETAILS</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <label for="stuName" class="input__label">Applicant's Name <span class="required">*</span></label>
                                            <input type="text" class="form-control" id="stuName" name="stuName" value="<?php echo $stuPersonalInfoWithPicAndSign->tspi_name; ?>" placeholder="Enter Student's Name" maxlength="150">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="stuMailingAddrLineOne" class="input__label">Mailing Address Line 1</label>
                                            <input type="text" class="form-control" id="stuMailingAddrLineOne" name="stuMailingAddrLineOne" value="<?php echo stripslashes($stuContactInfo->tsci_resid_address_line_one); ?>" placeholder="Enter Mailing Address Line 1" maxlength="200">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuMailingAddrLineTwo" class="input__label">Mailing Address Line 2</label>
                                            <input type="text" class="form-control" id="stuMailingAddrLineTwo" name="stuMailingAddrLineTwo" value="<?php echo stripslashes($stuContactInfo->tsci_resid_address_line_two); ?>" placeholder="Enter Mailing Address Line 2" maxlength="200">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuMailingAddrLineThree" class="input__label">Mailing Address Line 3</label>
                                            <input type="text" class="form-control" id="stuMailingAddrLineThree" name="stuMailingAddrLineThree" value="<?php echo stripslashes($stuContactInfo->tsci_resid_address_line_three); ?>" placeholder="Enter Mailing Address Line 3"  maxlength="200">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="stuMailingAddrState" class="input__label">State</label>
                                            <select id="stuMailingAddrState" name="stuMailingAddrState" class="custom-select">
                                                <option value="">Select State</option>
                                                <?php
                                                foreach ($states as $state) {
                                                    $selected = ($state->state_id == $stuContactInfo->tsci_resid_state) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo $selected; ?>><?php echo stripslashes($state->state_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuMailingAddrCity" class="input__label">City</label>
                                            <select id="stuMailingAddrCity" name="stuMailingAddrCity" class="custom-select">
                                                <option value="">Select City</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuMailingAddrZipCode" class="input__label">Zip Code</label>
                                            <input type="text" class="form-control" id="stuMailingAddrZipCode" name="stuMailingAddrZipCode" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuContactInfo->tsci_resid_zipcode; ?>" placeholder="Enter Mailing Address Zip Code"  maxlength="6">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuMobile" class="input__label">Applicant's Mobile <span class="required">*</span></label>
                                            <input type="text" class="form-control" id="stuMobile" name="stuMobile" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuPersonalInfoWithPicAndSign->tspi_mobile; ?>" placeholder="Enter Student's Mobile"  maxlength="10">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuEmail" class="input__label">Applicant's Email</label>
                                            <input type="text" class="form-control" id="stuEmail" name="stuEmail" value="<?php echo $stuPersonalInfoWithPicAndSign->tspi_email; ?>" placeholder="Enter Student's Email"  maxlength="100">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <input type="checkbox" name="permaSameAsMailing" id="permaSameAsMailing" value="T" <?php echo set_radio("permaSameAsMailing", "T"); ?>>&nbsp;<label for="permaSameAsMailing"><strong>Permanent Address Same As Mailing Address</strong></label>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="stuPermaAddrLineOne" class="input__label">Permanent Address Line 1</label>
                                            <input type="text" class="form-control" id="stuPermaAddrLineOne" name="stuPermaAddrLineOne" value="<?php echo stripslashes($stuContactInfo->tsci_perma_address_line_one); ?>" placeholder="Enter Permanent Address Line 1" maxlength="200">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuPermaAddrLineTwo" class="input__label">Permanent Address Line 2</label>
                                            <input type="text" class="form-control" id="stuPermaAddrLineTwo" name="stuPermaAddrLineTwo" value="<?php echo stripslashes($stuContactInfo->tsci_perma_address_line_two); ?>" placeholder="Enter Permanent Address Line 2" maxlength="200">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuPermaAddrLineThree" class="input__label">Permanent Address Line 3</label>
                                            <input type="text" class="form-control" id="stuPermaAddrLineThree" name="stuPermaAddrLineThree" value="<?php echo stripslashes($stuContactInfo->tsci_perma_address_line_three); ?>" placeholder="Enter Permanent Address Line 3"  maxlength="200">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="stuPermaAddrState" class="input__label">State</label>
                                            <select id="stuPermaAddrState" name="stuPermaAddrState" class="custom-select">
                                                <option value="">Select State</option>
                                                <?php
                                                foreach ($states as $state) {
                                                    $selected = ($state->state_id == $stuContactInfo->tsci_perma_state) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo $selected; ?>><?php echo stripslashes($state->state_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuPermaAddrCity" class="input__label">City</label>
                                            <select id="stuPermaAddrCity" name="stuPermaAddrCity" class="custom-select">
                                                <option value="">Select City</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuPermaAddrZipCode" class="input__label">Zip Code</label>
                                            <input type="text" class="form-control" id="stuPermaAddrZipCode" name="stuPermaAddrZipCode" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuContactInfo->tsci_perma_zipcode; ?>" placeholder="Enter Permanent Address Zip Code"  maxlength="6">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuParentLandline" class="input__label">Parent's Landline</label>
                                            <input type="text" class="form-control" id="stuParentLandline" name="stuParentLandline" value="<?php echo $stuContactInfo->tsci_parent_landline; ?>" placeholder="Enter Parent's Landline"  maxlength="12">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuParentMobile" class="input__label">Parent's Mobile</label>
                                            <input type="text" class="form-control" id="stuParentMobile" name="stuParentMobile" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuContactInfo->tsci_parent_mobile; ?>" placeholder="Enter Parent's Mobile"  maxlength="10">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label class="input__label">Gender <span class="required">*</span></label><br>
                                            <input type="radio" id="stuGenMale" name="stuGen" value="M" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_gender == "M") ? "checked" : ""; ?>>&nbsp;<label for="stuGenMale">Male</label>
                                            <input type="radio" id="stuGenFemale" name="stuGen" value="F" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_gender == "F") ? "checked" : ""; ?>>&nbsp;<label for="stuGenFemale">Female</label>
                                            <input type="radio" id="stuGenTrans" name="stuGen" value="T" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_gender == "T") ? "checked" : ""; ?>>&nbsp;<label for="stuGenTrans">Transgender</label>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuDOB" class="input__label">D.O.B. <span class="required">*</span></label>
                                            <input type="text" class="form-control" id="stuDOB" name="stuDOB" value="<?php echo ($stuPersonalInfoWithPicAndSign->tspi_dob == "" || $stuPersonalInfoWithPicAndSign->tspi_dob == NULL) ? "" : date("d/m/Y", strtotime($stuPersonalInfoWithPicAndSign->tspi_dob)); ?>" placeholder="Choose Student's DOB" autocomplete="off" maxlength="10">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuCategory" class="input__label">Category <span class="required">*</span></label>
                                            <select id="stuCategory" name="stuCategory" class="custom-select">
                                                <option value="" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_category == "") ? "selected" : ""; ?>>Select Category</option>
                                                <?php foreach ($categories as $category) { ?>
                                                    <option value="<?php echo addslashes($category['category_name']); ?>" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_category == addslashes($category['category_name'])) ? "selected" : ""; ?>><?php echo stripslashes($category['category_name']); ?></option>
                                                    <?php
                                                }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuReligion" class="input__label">Religion <span class="required">*</span></label>
                                            <select id="stuReligion" name="stuReligion" class="custom-select">
                                                <option value="" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_religion == "") ? "selected" : ""; ?>>Select Religion</option>
                                                <?php foreach ($religions as $religion) { ?>
                                                    <option value="<?php echo addslashes($religion['religion_name']); ?>" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_religion == addslashes($religion['religion_name'])) ? "selected" : ""; ?>><?php echo stripslashes($religion['religion_name']); ?></option>
                                                    <?php
                                                }
                                                ?>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuFatherName" class="input__label">Father's Name</label>
                                            <input type="text" class="form-control" id="stuFatherName" name="stuFatherName" value="<?php echo $stuFatherName; ?>" placeholder="Enter Father's Name"  maxlength="200">
                                            <input type="hidden" class="form-control" name="stuFatherFamBGId" value="<?php echo $stuFatherFamBGId; ?>">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuMotherName" class="input__label">Mother's Name</label>
                                            <input type="text" class="form-control" id="stuMotherName" name="stuMotherName" value="<?php echo $stuMotherName; ?>" placeholder="Enter Mother's Name" maxlength="200">
                                            <input type="hidden" class="form-control" name="stuMotherFamBGId" value="<?php echo $stuMotherFamBGId; ?>">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuAdmFormDate" class="input__label">Admission Form Date</label>
                                            <input type="text" class="form-control" id="stuAdmFormDate" name="stuAdmFormDate" value="<?php echo ($stuPersonalInfoWithPicAndSign->tspi_admission_date == "" || $stuPersonalInfoWithPicAndSign->tspi_admission_date == NULL) ? "" : date("d/m/Y", strtotime($stuPersonalInfoWithPicAndSign->tspi_admission_date)); ?>" placeholder="Choose Admission Form Date" autocomplete="off"  maxlength="10">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuEnrlDate" class="input__label">Enrollment Date</label>
                                            <input type="text" class="form-control" id="stuEnrlDate" name="stuEnrlDate" value="<?php echo ($stuPersonalInfoWithPicAndSign->tspi_enrollment_date == "" || $stuPersonalInfoWithPicAndSign->tspi_enrollment_date == NULL) ? "" : date("d/m/Y", strtotime($stuPersonalInfoWithPicAndSign->tspi_enrollment_date)); ?>" placeholder="Choose Enrollment Date" maxlength="10">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label class="input__label">Differently Abled</label><br>
                                            <input type="radio" id="stuDiffAbledYes" name="stuDiffAbled" value="T" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_is_diff_abled == "T") ? "checked" : ""; ?>>&nbsp;<label for="stuDiffAbledYes">Yes</label>
                                            <input type="radio" id="stuDiffAbledNo" name="stuDiffAbled" value="F" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_is_diff_abled == "F") ? "checked" : ""; ?>>&nbsp;<label for="stuDiffAbledNo">No</label>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuParentIncome" class="input__label">Parent's Annual Income</label>
                                            <input type="text" class="form-control" id="stuParentIncome" name="stuParentIncome" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuPersonalInfoWithPicAndSign->tspi_parent_annual_income; ?>" placeholder="Enter Parent's Annual Income" maxlength="15">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuAadharNo" class="input__label">Aadhar Number</label>
                                            <input type="text" class="form-control" id="stuAadharNo" name="stuAadharNo" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuAadharNumber; ?>" placeholder="Enter Student's Aadhar Number"  maxlength="12">
                                            <input type="hidden" class="form-control" name="stuAadharInfoId" value="<?php echo $stuAadharInfoId; ?>">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuPAN" class="input__label">PAN Number</label>
                                            <input type="text" class="form-control" id="stuPAN" name="stuPAN" value="<?php echo $stuPANNumber; ?>" placeholder="Enter Student's PAN Number" maxlength="10">
                                            <input type="hidden" class="form-control" name="stuPANInfoId" value="<?php echo $stuPANInfoId; ?>">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuCSTCNumber" class="input__label">Caste Certificate Number</label>
                                            <input type="text" class="form-control" id="stuCSTCNumber" name="stuCSTCNumber" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuCSTCNumber; ?>" placeholder="Enter Student's Caste Certificate Number"  maxlength="15">
                                            <input type="hidden" class="form-control" name="stuCSTCInfoId" value="<?php echo $stuCSTCInfoId; ?>">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuAICNumber" class="input__label">Annual Income Certificate Number</label>
                                            <input type="text" class="form-control" id="stuAICNumber" name="stuAICNumber" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuAICNumber; ?>" placeholder="Enter Annual Income Certificate Number" maxlength="15">
                                            <input type="hidden" class="form-control" name="stuAICInfoId" value="<?php echo $stuAICInfoId; ?>">
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>EDUCATIONAL QUALIFICATION</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <table id="eduQualifications" class="table-active table-responsive-sm table-striped table-hover" style="width:100%">
                                                <thead>
                                                    <tr>
                                                        <th>Name Of Examination</th>
                                                        <th>Board/University/Institute</th>
                                                        <th>Stream</th>
                                                        <th>Year Of Exam</th>
                                                        <th>Max. Marks/CGPA</th>
                                                        <th>Marks/CGPA Obtained</th>
                                                        <th>% of Marks/CGPA Obtained</th>
                                                        <th>Class/Division Obtained</th>
                                                    </tr>
                                                </thead>
                                                <tbody id="exams">
                                                    <?php
                                                    for ($i = 0; $i < sizeof($stuEduQualifInfo); $i++) {
                                                        ?>
                                                        <tr>
                                                            <td><?php echo $stuEduQualifInfo[$i]->exam_name; ?></td>
                                                            <td><input type='text' class='form-control' name='stuEduQualiBoardUniv[]' value="<?php echo $stuEduQualifInfo[$i]->tesi_board; ?>"></td>
                                                            <td>
                                                                <select name='stuEduQualiStream[]' class='custom-select'>
                                                                    <option <?php echo ($stuEduQualifInfo[$i]->tesi_stream == "") ? "selected" : ""; ?>>Select Stream</option>
                                                                    <option <?php echo ($stuEduQualifInfo[$i]->tesi_stream == "Science") ? "selected" : ""; ?>>Science</option>
                                                                    <option <?php echo ($stuEduQualifInfo[$i]->tesi_stream == "Arts") ? "selected" : ""; ?>>Arts</option>
                                                                    <option <?php echo ($stuEduQualifInfo[$i]->tesi_stream == "Commerce") ? "selected" : ""; ?>>Commerce</option>
                                                                    <option <?php echo ($stuEduQualifInfo[$i]->tesi_stream == "Comp. App.") ? "selected" : ""; ?>>Comp. App.</option>
                                                                    <option <?php echo ($stuEduQualifInfo[$i]->tesi_stream == "Others") ? "selected" : ""; ?>>Others</option>
                                                                </select>
                                                            </td>
                                                            <td>
                                                                <select name='stuEduQualiYearOfExam[]' class='custom-select'>
                                                                    <option value=''>Select Year</option>
                                                                    <?php for ($year = date('Y'); $year > (date('Y') - 37); $year--) { ?>
                                                                        <option <?php echo ($year == $stuEduQualifInfo[$i]->tesi_passing_year) ? "selected" : ""; ?>><?php echo $year; ?></option>
                                                                    <?php }
                                                                    ?>
                                                                </select>
                                                            </td>
                                                            <td><input type='text' class='form-control' id='stuEduQualiMaxMarks<?php echo $i; ?>' name='stuEduQualiMaxMarks[]' value="<?php echo $stuEduQualifInfo[$i]->tesi_max_marks_cgpa; ?>"></td>
                                                            <td><input type='text' class='form-control' id='stuEduQualiMarksObt<?php echo $i; ?>' name='stuEduQualiMarksObt[]' value="<?php echo $stuEduQualifInfo[$i]->tesi_cgpa; ?>"></td>
                                                            <td><input type='text' class='form-control' id='stuEduQualiPercntCGPA<?php echo $i; ?>' name='stuEduQualiPercntCGPA[]' onFocus='calPercAndDiv(<?php echo $i; ?>);' value="<?php echo $stuEduQualifInfo[$i]->tesi_percnt; ?>"></td>
                                                            <td>
                                                                <select name='stuEduQualiDiv[]' id='stuEduQualiDiv<?php echo $i; ?>' class='custom-select'>
                                                                    <option <?php echo ($stuEduQualifInfo[$i]->tesi_division == "I-Div") ? "selected" : "" ?>>I-Div</option>
                                                                    <option <?php echo ($stuEduQualifInfo[$i]->tesi_division == "II-Div") ? "selected" : "" ?>>II-Div</option>
                                                                    <option <?php echo ($stuEduQualifInfo[$i]->tesi_division == "III-Div") ? "selected" : "" ?>>III-Div</option>
                                                                </select>
                                                            </td>
                                                    <input type="hidden" class='form-control' name='stuEduQualiInfoId[]' value="<?php echo $stuEduQualifInfo[$i]->tesi_id; ?>">
                                                    </tr>
                                                    <?php
                                                }
                                                ?>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>PROFESSIONAL EXPERIENCE</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <label class="input__label">Have Any Professional Experience:</label>
                                            <input type="radio" id="stuProfExpYes" name="stuProfExp" value="T" <?php echo ($stuEntranceExamAndProfExpInfo->tsevi_is_prof_exp == "T") ? "checked" : ""; ?>>&nbsp;<label for="stuProfExpYes">Yes</label>
                                            <input type="radio" id="stuProfExpNo" name="stuProfExp" value="F" <?php echo ($stuEntranceExamAndProfExpInfo->tsevi_is_prof_exp == "F") ? "checked" : ""; ?>>&nbsp;<label for="stuProfExpNo">No</label>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuProfExpInYears" class="input__label">Experience(In Years)</label>
                                            <input type="text" class="form-control" id="stuProfExpInYears" name="stuProfExpInYears" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuEntranceExamAndProfExpInfo->tsevi_no_of_years; ?>" placeholder="Enter Total Experience (In Years)" maxlength="5" readonly="true">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuProfOrgName" class="input__label">Organization</label>
                                            <input type="text" class="form-control" id="stuProfOrgName" name="stuProfOrgName" value="<?php echo stripslashes($stuEntranceExamAndProfExpInfo->tsevi_organization); ?>" placeholder="Enter Organization Name" maxlength="100" readonly="true">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <label for="stuProfJobDesc" class="input__label">Job Description</label>
                                            <textarea class="form-control" name="stuProfJobDesc" id="stuProfJobDesc" placeholder="Enter Job Description (Max. 200 Characters)" maxlength="200" readonly="true"><?php echo stripslashes($stuEntranceExamAndProfExpInfo->tsevi_job_desc); ?></textarea>
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>EXTRA-CURRICULAR ACTIVITIES/GAMES/SPORTS</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <textarea class="form-control" name="stuExtraCurricularAct" id="stuExtraCurricularAct" placeholder="Enter Extra Curricular Activites (Not More Than 500 Chars)" maxlength="500"><?php echo stripslashes($stuEntranceExamAndProfExpInfo->tsevi_extra_activities); ?></textarea>
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>FAMILY BACKGROUND</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <table id="familyBackground" class="table-active table-responsive-sm table-striped table-hover" style="width:100%">
                                                <tr>
                                                    <th>Name</th>
                                                    <th>Relationship</th>
                                                    <th>Designation</th>
                                                    <th>Organization</th>
                                                </tr>
                                                <?php
                                                $remainingNewRow = 3 - sizeof($stuFamilyBGInfo);
                                                for ($famBG = 0; $famBG < sizeof($stuFamilyBGInfo); $famBG++) {
                                                    ?>
                                                    <tr>
                                                        <td>
                                                            <input type="text" class="form-control" name="stuFamBGName[]" value="<?php echo stripslashes($stuFamilyBGInfo[$famBG]->tfbi_name); ?>" placeholder="Enter Family Member Name" maxlength="200">
                                                        </td>
                                                        <td>
                                                            <select name="stuFamBGRelation[]" class="custom-select">
                                                                <option value="">Select Relation</option>
                                                                <?php
                                                                foreach ($relations as $relation) {
                                                                    $selected = ($relation->rel_id == $stuFamilyBGInfo[$famBG]->tfbi_relation) ? "selected" : "";
                                                                    ?>
                                                                    <option value="<?php echo $relation->rel_id; ?>" <?php echo $selected; ?>><?php echo addslashes($relation->rel_title); ?></option>
                                                                    <?php
                                                                }
                                                                ?>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control" name="stuFamBGDesignation[]" value="<?php echo stripslashes($stuFamilyBGInfo[$famBG]->tfbi_designation); ?>" placeholder="Enter Family Member Designation" maxlength="200">
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control" name="stuFamBGOrganization[]" value="<?php echo stripslashes($stuFamilyBGInfo[$famBG]->tfbi_organization); ?>" placeholder="Enter Family Member Organization" maxlength="200">
                                                        </td>
                                                    <input type="hidden" name="famBGId[]" value="<?php echo $stuFamilyBGInfo[$famBG]->tfbi_id; ?>">
                                                    </tr>
                                                    <?php
                                                }
                                                ?>
                                                <?php for ($remRow = 0; $remRow < $remainingNewRow; $remRow++) { ?>
                                                    <tr>
                                                        <td>
                                                            <input type="text" class="form-control" name="stuFamBGName[]" value="" placeholder="Enter Family Member Name" maxlength="200">
                                                        </td>
                                                        <td>
                                                            <select name="stuFamBGRelation[]" class="custom-select">
                                                                <option value="">Select Relation</option>
                                                                <?php
                                                                foreach ($relations as $relation) {
                                                                    ?>
                                                                    <option value="<?php echo $relation->rel_id; ?>"><?php echo addslashes($relation->rel_title); ?></option>
                                                                    <?php
                                                                }
                                                                ?>
                                                            </select>
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control" name="stuFamBGDesignation[]" value="" placeholder="Enter Family Member Designation" maxlength="200">
                                                        </td>
                                                        <td>
                                                            <input type="text" class="form-control" name="stuFamBGOrganization[]" value="" placeholder="Enter Family Member Organization" maxlength="200">
                                                        </td>
                                                    <input type="hidden" name="famBGId[]" value="-1">
                                                    </tr>
                                                    <?php
                                                }
                                                ?>
                                            </table>
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>HOW DID YOU COME TO KNOW ABOUT COLLEGE?</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <input type="radio" id="stuHowKnowSMSFriend" name="stuHowKnowSMS" value="F" <?php echo ($stuEntranceExamAndProfExpInfo->tsevi_how_know_sms == "F") ? "checked" : ""; ?>>&nbsp;<label for="stuHowKnowSMSFriend">Friends/Relative</label>
                                            <input type="radio" id="stuHowKnowSMSAdv" name="stuHowKnowSMS" value="A" <?php echo ($stuEntranceExamAndProfExpInfo->tsevi_how_know_sms == "A") ? "checked" : ""; ?>>&nbsp;<label for="stuHowKnowSMSAdv">Advertisement</label>
                                            <input type="radio" id="stuHowKnowSMSTeacher" name="stuHowKnowSMS" value="T" <?php echo ($stuEntranceExamAndProfExpInfo->tsevi_how_know_sms == "T") ? "checked" : ""; ?>>&nbsp;<label for="stuHowKnowSMSTeacher">Teachers</label>
                                            <input type="radio" id="stuHowKnowSMSInternet" name="stuHowKnowSMS" value="I" <?php echo ($stuEntranceExamAndProfExpInfo->tsevi_how_know_sms == "I") ? "checked" : ""; ?>>&nbsp;<label for="stuHowKnowSMSInternet">Internet</label>
                                            <input type="radio" id="stuHowKnowSMSOther" name="stuHowKnowSMS" value="O" <?php echo ($stuEntranceExamAndProfExpInfo->tsevi_how_know_sms != "I" && $stuEntranceExamAndProfExpInfo->tsevi_how_know_sms != "T" && $stuEntranceExamAndProfExpInfo->tsevi_how_know_sms != "A" && $stuEntranceExamAndProfExpInfo->tsevi_how_know_sms != "F") ? "checked" : ""; ?>>&nbsp;<label for="stuHowKnowSMSOther">Any Other</label>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <input type="text" class="form-control" id="stuHowKnowSMSOtherDesc" name="stuHowKnowSMSOtherDesc" value="<?php echo ($stuEntranceExamAndProfExpInfo->tsevi_how_know_sms != "I" && $stuEntranceExamAndProfExpInfo->tsevi_how_know_sms != "T" && $stuEntranceExamAndProfExpInfo->tsevi_how_know_sms != "A" && $stuEntranceExamAndProfExpInfo->tsevi_how_know_sms != "F") ? stripslashes($stuEntranceExamAndProfExpInfo->tsevi_how_know_sms) : ""; ?>" placeholder="Please Mention The Source In Case Of 'Any Other'" maxlength="150">
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>SELECT WHICHEVER IS APPLICABLE (Leave Blank If Not Applicable)</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuEntranceExamRegNo" class="input__label">Exam:</label>
                                            <input type="radio" id="stuEntranceExamUC" onClick="setEntranceExamInfoFields('UC');" name="stuEntranceExam" value="University Counselling" <?php echo set_radio('stuEntranceExam', "University Counselling"); ?>>&nbsp;<label for="stuEntranceExamUC">University Counselling</label>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuEntranceExamRegNo" class="input__label">Registration/Form No.</label>
                                            <input type="text" class="form-control" id="stuEntranceExamRegNo" name="stuEntranceExamRegNo" value="<?php echo $stuEntranceExamAndProfExpInfo->tsevi_form_no; ?>" placeholder="Enter Registration Number" maxlength="50" readonly="true">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="stuEntranceExamPercentage" class="input__label">Percentage</label>
                                            <input type="text" class="form-control" id="stuEntranceExamPercentage" name="stuEntranceExamPercentage" value="<?php echo $stuEntranceExamAndProfExpInfo->tsevi_percntage; ?>" placeholder="Enter Obtained Percentage" maxlength="6" readonly="true">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="stuEntranceExamRank" class="input__label">Rank/Merit</label>
                                            <input type="text" class="form-control" id="stuEntranceExamRank" name="stuEntranceExamRank" value="<?php echo $stuEntranceExamAndProfExpInfo->tsevi_rank; ?>" placeholder="Enter Rank" maxlength="10" readonly="true">
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>RESIDENCE DESIRED</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <input type="radio" id="stuResidChoiceParents" name="stuResidChoice" onClick="setStudentResidenceFields('P');" value="P" <?php echo ($stuHostelAndResidInfo->tshri_resid_choice == "P") ? "checked" : ""; ?>>&nbsp;<label for="stuResidChoiceParents">Will Stay With Parents In City</label>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <input type="radio" id="stuResidChoiceHostel" name="stuResidChoice" onClick="setStudentResidenceFields('H');" value="H" <?php echo ($stuHostelAndResidInfo->tshri_resid_choice == "H") ? "checked" : ""; ?>>&nbsp;<label for="stuResidChoiceHostel">Will Stay In College Hostel</label>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <input type="radio" id="stuResidChoiceOwn" name="stuResidChoice" onClick="setStudentResidenceFields('O');" value="O" <?php echo ($stuHostelAndResidInfo->tshri_resid_choice == "O") ? "checked" : ""; ?>>&nbsp;<label for="stuResidChoiceOwn">Will Stay In City Having Own Arrangements</label>
                                            &nbsp;&nbsp;&nbsp;<i id="deselectResideChoice" class="fa fa-times" style="color:#FF0000;cursor:pointer;" title="Click To De-Select"></i>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <input type="checkbox" name="commAddrSameAsMailing" id="commAddrSameAsMailing" value="T" <?php echo set_radio("commAddrSameAsMailing", "T"); ?> class="readonly">&nbsp;<label id="commAddrSameAsMailingLbl" for="commAddrSameAsMailing" class="readonly"><strong>Communication Address Same As Mailing Address</strong></label>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="stuCommAddrLineOne" class="input__label">Communication Address Line 1</label>
                                            <input type="text" class="form-control" id="stuCommAddrLineOne" name="stuCommAddrLineOne" value="<?php echo stripslashes($stuHostelAndResidInfo->tshri_comm_address_line_one); ?>" placeholder="Enter Communication Address Line 1" maxlength="200" readonly="true">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuCommAddrLineTwo" class="input__label">Communication Address Line 2</label>
                                            <input type="text" class="form-control" id="stuCommAddrLineTwo" name="stuCommAddrLineTwo" value="<?php echo stripslashes($stuHostelAndResidInfo->tshri_comm_address_line_two); ?>" placeholder="Enter Communication Address Line 2" maxlength="200" readonly="true">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuCommAddrLineThree" class="input__label">Communication Address Line 3</label>
                                            <input type="text" class="form-control" id="stuCommAddrLineThree" name="stuCommAddrLineThree" value="<?php echo stripslashes($stuHostelAndResidInfo->tshri_comm_address_line_three); ?>" placeholder="Enter Communication Address Line 3"  maxlength="200" readonly="true">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="stuCommAddrState" class="input__label">State</label>
                                            <select id="stuCommAddrState" name="stuCommAddrState" class="custom-select readonly">
                                                <option value="">Select State</option>
                                                <?php
                                                foreach ($states as $state) {
                                                    $selected = ($state->state_id == $stuHostelAndResidInfo->tshri_comm_state) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo $selected; ?>><?php echo stripslashes($state->state_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuCommAddrCity" class="input__label">City</label>
                                            <select id="stuCommAddrCity" name="stuCommAddrCity" class="custom-select readonly">
                                                <option value="">Select City</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuCommAddrZipCode" class="input__label">Zip Code</label>
                                            <input type="text" class="form-control" id="stuCommAddrZipCode" name="stuCommAddrZipCode" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuHostelAndResidInfo->tshri_comm_zipcode; ?>" placeholder="Enter Communication Address Zip Code"  maxlength="6" readonly="true">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuCommMobile" class="input__label">Mobile</label>
                                            <input type="text" class="form-control" id="stuCommMobile" name="stuCommMobile" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuHostelAndResidInfo->tshri_comm_mobile; ?>" placeholder="Enter Mobile Number"  maxlength="10" readonly="true">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuCommLandline" class="input__label">Landline</label>
                                            <input type="text" class="form-control" id="stuCommLandline" name="stuCommLandline" value="<?php echo $stuHostelAndResidInfo->tshri_comm_tel_no; ?>" placeholder="Enter Landline Number"  maxlength="12" readonly="true">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <label for="stuLocGuardName" class="input__label">Guardian Name</label>
                                            <input type="text" class="form-control" id="stuLocGuardName" name="stuLocGuardName" value="<?php echo stripslashes($stuHostelAndResidInfo->tshri_loc_guard_name); ?>" placeholder="Enter Local Guardian's Name"  maxlength="100" readonly="true">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuLocGuardMobile" class="input__label">Guardian Mobile</label>
                                            <input type="text" class="form-control" id="stuLocGuardMobile" name="stuLocGuardMobile" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuHostelAndResidInfo->tshri_loc_guard_mob; ?>" placeholder="Enter Local Guardian's Mobile Number"  maxlength="10" readonly="true">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuLocGuardLandline" class="input__label">Guardian Landline</label>
                                            <input type="text" class="form-control" id="stuLocGuardLandline" name="stuLocGuardLandline" value="<?php echo $stuHostelAndResidInfo->tshri_loc_guard_tel_no; ?>" placeholder="Enter Local Guardian's Landline Number"  maxlength="12" readonly="true">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <input type="checkbox" name="locGuardAddrSameAsComm" id="locGuardAddrSameAsComm" value="T" <?php echo set_radio("locGuardAddrSameAsComm", "T"); ?> class="readonly">&nbsp;<label id="locGuardAddrSameAsCommLbl" for="locGuardAddrSameAsComm" class="readonly"><strong>Local Guardian Address Same As Communication Address</strong></label>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="stuLocGuardAddrLineOne" class="input__label">Local Guardian Address Line 1</label>
                                            <input type="text" class="form-control" id="stuLocGuardAddrLineOne" name="stuLocGuardAddrLineOne" value="<?php echo stripslashes($stuHostelAndResidInfo->tshri_loc_guard_address_line_one); ?>" placeholder="Enter Local Guardian's Address Line 1" maxlength="200" readonly="true">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuLocGuardAddrLineTwo" class="input__label">Local Guardian Address Line 2</label>
                                            <input type="text" class="form-control" id="stuLocGuardAddrLineTwo" name="stuLocGuardAddrLineTwo" value="<?php echo stripslashes($stuHostelAndResidInfo->tshri_loc_guard_address_line_two); ?>" placeholder="Enter Local Guardian's Address Line 2" maxlength="200" readonly="true">
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuLocGuardAddrLineThree" class="input__label">Local Guardian Address Line 3</label>
                                            <input type="text" class="form-control" id="stuLocGuardAddrLineThree" name="stuLocGuardAddrLineThree" value="<?php echo stripslashes($stuHostelAndResidInfo->tshri_loc_guard_address_line_three); ?>" placeholder="Enter Local Guardian's Address Line 3"  maxlength="200" readonly="true">
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label for="stuLocGuardAddrState" class="input__label">State</label>
                                            <select id="stuLocGuardAddrState" name="stuLocGuardAddrState" class="custom-select readonly">
                                                <option value="">Select State</option>
                                                <?php
                                                foreach ($states as $state) {
                                                    $selected = ($state->state_id == $stuHostelAndResidInfo->tshri_loc_guard_state) ? "selected" : "";
                                                    ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo $selected; ?>><?php echo stripslashes($state->state_name); ?></option>
                                                <?php }
                                                ?>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuLocGuardAddrCity" class="input__label">City</label>
                                            <select id="stuLocGuardAddrCity" name="stuLocGuardAddrCity" class="custom-select readonly">
                                                <option value="">Select City</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label for="stuLocGuardAddrZipCode" class="input__label">Zip Code</label>
                                            <input type="text" class="form-control" id="stuLocGuardAddrZipCode" name="stuLocGuardAddrZipCode" onkeypress="return event.charCode >= 48 && event.charCode <= 57" value="<?php echo $stuHostelAndResidInfo->tshri_loc_guard_zipcode; ?>" placeholder="Enter Local Guardian's Address Zip Code"  maxlength="6" readonly="true">
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>DOCUMENTS SUBMITTED</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <small id="documentSubmissionInstruction" style="color:#0000FF;font-weight: bold;">Upload All Available Documents</small>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <table id="documentSubmitted" class="table-active table-responsive-sm table-striped table-hover" style="width:100%">
                                                <thead>
                                                    <tr>
                                                        <th>Document(s)</th>
                                                        <th>Document Applicability</th>
                                                        <th>Uploaded File(If Any)</th>
                                                        <th>Action</th>
                                                        <th>Select File To Upload (Allowed Extensions Are *.pdf, *.jpg, *.jpeg, *.png Of Max. Size 4 MB Each)</th>
                                                    </tr>
                                                </thead>
                                                <tbody id="documents">
                                                    <?php
                                                    for ($docs = 0; $docs < sizeof($stuDocumentInfo); $docs++) {
                                                        $thisDocument = $stuDocumentInfo[$docs];
                                                        ?>
                                                        <tr>
                                                            <td><?php echo $thisDocument['doc_name']; ?></td>
                                                            <td><input type="checkbox" value="NA" name="stuDocumentFileApplicable<?php echo $thisDocument['doc_id']; ?>" <?php echo ($thisDocument['is_uploaded'] && ($thisDocument['file_name'] == "na.png")) ? "checked" : ""; ?>> Not Applicable</td>
                                                            <td>
                                                                <?php
                                                                if ($thisDocument['is_uploaded'] == 1 || $thisDocument['is_uploaded'] == '1') {
                                                                    if ($thisDocument['file_name'] != "na.png") {
                                                                        ?>
                                                                        <a href="<?php echo base_url("assets/admin/uploads/studentData/" . $thisDocument['file_name']); ?>" target="_blank" title="Click To View"><i class="fa fa-check-square" style="color:#00FF00;"></i>&nbsp;<i class="fa fa-file"></i></a>
                                                                    <?php } else {
                                                                        ?>
                                                                        <i class="fa fa-times" style="color:#FF0000;"></i>&nbsp;Not Applicable
                                                                        <?php
                                                                    }
                                                                } else {
                                                                    ?>
                                                                    <i class="fa fa-times" style="color:#FF0000;"></i>&nbsp;Not Uploaded
                                                                    <?php
                                                                }
                                                                ?>
                                                            </td>
                                                            <td>
                                                                <?php
                                                                if ($thisDocument['is_uploaded'] == 1 || $thisDocument['is_uploaded'] == '1') {
                                                                    if ($thisDocument['file_name'] != "na.png") {
                                                                        ?>
                                                                        <i class='fa fa-times-circle-o' style='color:#FF0000;cursor: pointer;' title="Click To Remove" onClick="removeDocument(<?php echo $thisDocument['tddi_id']; ?>,<?php echo $stuPersonalInfoWithPicAndSign->tspi_id; ?>);"  ></i>
                                                                        <?php
                                                                    } else {
                                                                        echo "-";
                                                                    }
                                                                } else {
                                                                    echo "-";
                                                                }
                                                                ?>
                                                            </td>
                                                            <td><input type='file' class='form-control' name="stuDocumentFile<?php echo $thisDocument['doc_id']; ?>"></td>
                                                    <input type='hidden' class='form-control' name='stuDocumentFileId[]' value="<?php echo $thisDocument['doc_id']; ?>">    
                                                    <input type="hidden" name="docPrevFile[]" value="<?php echo $thisDocument['file_name']; ?>">
                                                    <input type="hidden" name="docInfoId[]" value="<?php echo $thisDocument['tddi_id']; ?>">
                                                    </tr>
                                                    <?php
                                                }
                                                ?>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-4">
                                            <label class="input__label">Is Year Gap Applicable</label><br>
                                            <input type="radio" id="stuYearGapYes" name="stuYearGap" value="T" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_ygap_applied == "T") ? "checked" : ""; ?>>&nbsp;<label for="stuYearGapYes">Yes</label>
                                            <input type="radio" id="stuYearGapNo" name="stuYearGap" value="F" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_ygap_applied == "F") ? "checked" : ""; ?>>&nbsp;<label for="stuYearGapNo">No</label>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label class="input__label">Is Eligible For College Scholarship</label><br>
                                            <input type="radio" id="stuClgSchYes" name="stuClgSch" value="T" onClick="toggleScholarshipPercentage('T');" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_scholarship_eligible == "T") ? "checked" : ""; ?>>&nbsp;<label for="stuClgSchYes">Yes</label>
                                            <input type="radio" id="stuClgSchNo" name="stuClgSch" value="F" onClick="toggleScholarshipPercentage('F');" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_scholarship_eligible == "F") ? "checked" : ""; ?>>&nbsp;<label for="stuClgSchNo">No</label>
                                        </div>
                                        <div class="form-group col-md-4">
                                            <label class="input__label">Percentage</label>
                                            <select id="stuSchPercentage" name="stuSchPercentage" class="custom-select readonly">
                                                <option value="0" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_scholarship_percentage == "0") ? "selected" : ""; ?>>Select Percentage</option>
                                                <option value="10" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_scholarship_percentage == "10") ? "selected" : "" ?>>10%</option>
                                                <option value="15" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_scholarship_percentage == "15") ? "selected" : "" ?>>15%</option>
                                                <option value="20" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_scholarship_percentage == "20") ? "selected" : "" ?>>20%</option>
                                                <option value="25" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_scholarship_percentage == "25") ? "selected" : "" ?>>25%</option>
                                            </select>
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>CURRENT STATUS OF STUDENT</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <small id="studentStatusInstruction" style="color:#0000FF;font-weight: bold;">Select Any One Of The Status, If Applicable</small>
                                        </div>
                                    </div>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuStatus" class="input__label">Select Any One: </label>
                                            <select id="stuStatus" name="stuStatus" class="custom-select">
                                                <option value="NA" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_status == "NA") ? "selected" : "" ?>>NA(Not-Admitted)</option>
                                                <option value="DV" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_status == "DV") ? "selected" : "" ?>>Documents Verified & Counselling Complete</option>
                                                <option value="D" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_status == "D") ? "selected" : "" ?>>Drop Out</option>
                                                <option value="E" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_status == "E") ? "selected" : "" ?>>Expelled(Name Cut-Off)</option>
                                                <option value="P" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_status == "P") ? "selected" : "" ?>>Passout(Alumna)</option>
                                                <option value="CE" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_status == "CE") ? "selected" : "" ?>>Currently Enrolled</option>
                                            </select>
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="stuDropOutDate" class="input__label">Drop Out Date</label>
                                            <input type="text" class="form-control readonly" id="stuDropOutDate" name="stuDropOutDate" value="<?php echo ($stuPersonalInfoWithPicAndSign->tspi_log_date == "" || $stuPersonalInfoWithPicAndSign->tspi_log_date == NULL && ($stuPersonalInfoWithPicAndSign->tspi_status != "D")) ? "" : date("d/m/Y", strtotime($stuPersonalInfoWithPicAndSign->tspi_log_date)); ?>" placeholder="Choose Drop Out Date" autocomplete="off"  maxlength="10">
                                        </div>
                                        <div class="form-group col-md-3">
                                            <label for="stuRegFeeApplicable" class="input__label">Is Reg. Fee Applicable</label>
                                            <select id="stuRegFeeApplicable" name="stuRegFeeApplicable" class="custom-select">
                                                <option value="T" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_is_reg_fee_applicable == "T") ? "selected" : "" ?>>Yes</option>
                                                <option value="F" <?php echo ($stuPersonalInfoWithPicAndSign->tspi_is_reg_fee_applicable == "F") ? "selected" : "" ?>>No</option>
                                            </select>
                                        </div>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>PHOTO & SIGNATURE</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <label for="stuPhotograph" class="input__label">Photograph</label>
                                            <center><img src="<?php echo base_url("assets/admin/uploads/studentData/" . $stuPersonalInfoWithPicAndSign->studentPhoto); ?>" height="100px" width="100px"></center>
                                            <input type="file" class="form-control" id="stuPhotograph" name="stuPhotograph">
                                            <input type="hidden" name="stuPhotoPrevFile" value="<?php echo $stuPersonalInfoWithPicAndSign->studentPhoto; ?>">
                                            <input type="hidden" name="stuPhotoDocInfoId" value="<?php echo $stuPersonalInfoWithPicAndSign->studentPhotoId; ?>">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuSignature" class="input__label">Signature</label>
                                            <center><img src="<?php echo base_url("assets/admin/uploads/studentData/" . $stuPersonalInfoWithPicAndSign->studentSign); ?>" height="100px" width="30%"></center>
                                            <input type="file" class="form-control" id="stuSignature" name="stuSignature">
                                            <input type="hidden" name="stuSignPrevFile" value="<?php echo $stuPersonalInfoWithPicAndSign->studentSign; ?>">
                                            <input type="hidden" name="stuSignDocInfoId" value="<?php echo $stuPersonalInfoWithPicAndSign->studentSignId; ?>">
                                        </div>
                                        <small id="photoAndSignInstruction" style="color:#0000FF;font-weight: bold;">Max File Size For Photo & Signature Is 500KB And Allowed Extensions Are *.png, *.jpg, *.jpeg.</small>
                                    </div>
                                </fieldset>
                                <br>
                                <fieldset>
                                    <legend><b>REMARKS (If-Any)</b></legend>
                                    <hr>
                                    <div class="form-row">
                                        <div class="form-group col-md-12">
                                            <textarea class="form-control" name="stuRemarks" id="stuRemarks" placeholder="Enter Remarks If Any (Not More Than 1000 Chars)" maxlength="1000"><?php echo stripslashes($stuPersonalInfoWithPicAndSign->tspi_remarks); ?></textarea>
                                        </div>
                                    </div>
                                </fieldset>
                                <input type="hidden" name="tspiId" value="<?php echo $stuPersonalInfoWithPicAndSign->tspi_id; ?>">
                                <div class="form-row">
                                    <div class="form-group col-md-4">
                                        <button id="saveAndMove" name="saveAndMove" type="button" class="btn btn-primary btn-block btn-style mt-4 saveBtn"><i class="fa fa-save"></i> | <i class="fa fa-close"></i>&nbsp;Save & Close</button>
                                    </div>
                                    <div class="form-group col-md-4">
                                        <button id="submitBtn" name="submitBtn" type="button" class="btn btn-success btn-block btn-style mt-4 saveBtn"><i class="fa fa-save"></i> | <i class="fa fa-eye"></i>&nbsp;Save & Display</button>
                                    </div>
                                    <div class="form-group col-md-4">
                                        <a  href="<?php echo site_url("admin/Student/"); ?>" class="btn btn-danger btn-block btn-style mt-4"><i class="fa fa-ban"></i>&nbsp;Cancel</a>
                                    </div>
                                </div>
                                <?php echo form_close(); ?>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </section>
        <script>
            $("#stuFormNo").on("keyup", function () {
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() !== "") {
                    $.ajax({
                        url: '<?php echo site_url('admin/Student/checkFormNumberAvailabilityForEdit/') ?>',
                        data: {form_no: $("#stuFormNo").val(), tspi_id: '<?php echo $stuPersonalInfoWithPicAndSign->tspi_id ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var availabilityInfo = JSON.parse(result);
                            if (availabilityInfo.doFormNoAvailable === 1) {
                                $("#formNotAvail").css("display", "table-cell");
                                $("#formNotAvail").html("This Form Number Already Exits!");
                                $("#submitBtn").prop("disabled", true);
                                $("#saveAndMove").prop("disabled", true);
                            } else {
                                $("#formNotAvail").css("display", "none");
                                $("#formNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                                $("#saveAndMove").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#formNotAvail").css("display", "none");
                    $("#formNotAvail").html("");
                    $("#submitBtn").prop("disabled", false);
                    $("#saveAndMove").prop("disabled", false);
                }
            });

            $("#stuFormNo").on("blur", function () {
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() !== "") {
                    $(".se-pre-con").fadeIn("slow");
                    $.ajax({
                        url: '<?php echo site_url('admin/Student/checkFormNumberAvailabilityForEdit/') ?>',
                        data: {form_no: $("#stuFormNo").val(), tspi_id: '<?php echo $stuPersonalInfoWithPicAndSign->tspi_id ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var availabilityInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            if (availabilityInfo.doFormNoAvailable === 1) {
                                $("#formNotAvail").css("display", "table-cell");
                                $("#formNotAvail").html("This Form Number Already Exits!");
                                $("#submitBtn").prop("disabled", true);
                                $("#saveAndMove").prop("disabled", true);
                            } else {
                                $("#formNotAvail").css("display", "none");
                                $("#formNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                                $("#saveAndMove").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#formNotAvail").css("display", "none");
                    $("#formNotAvail").html("");
                    $("#submitBtn").prop("disabled", false);
                    $("#saveAndMove").prop("disabled", false);
                }
            });

            $("#stuRollNo").on("keyup", function () {
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() !== "") {
                    $.ajax({
                        url: '<?php echo site_url('admin/Student/checkRollNumberAvailabilityForEdit/') ?>',
                        data: {roll_no: $("#stuRollNo").val(), tspi_id: '<?php echo $stuPersonalInfoWithPicAndSign->tspi_id ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var availabilityInfo = JSON.parse(result);
                            if (availabilityInfo.doRollNoAvailable === 1) {
                                $("#RollNotAvail").css("display", "table-cell");
                                $("#RollNotAvail").html("This Roll Number Already Exits!");
                                $("#submitBtn").prop("disabled", true);
                                $("#saveAndMove").prop("disabled", true);
                            } else {
                                $("#RollNotAvail").css("display", "table-cell");
                                $("#RollNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                                $("#saveAndMove").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#RollNotAvail").css("display", "none");
                    $("#RollNotAvail").html("");
                    $("#submitBtn").prop("disabled", false);
                    $("#saveAndMove").prop("disabled", false);
                }
            });

            $("#stuRollNo").on("blur", function () {
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() !== "") {
                    $(".se-pre-con").fadeIn("slow");
                    $.ajax({
                        url: '<?php echo site_url('admin/Student/checkRollNumberAvailabilityForEdit/') ?>',
                        data: {roll_no: $("#stuRollNo").val(), tspi_id: '<?php echo $stuPersonalInfoWithPicAndSign->tspi_id ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var availabilityInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            if (availabilityInfo.doRollNoAvailable === 1) {
                                $("#RollNotAvail").css("display", "table-cell");
                                $("#RollNotAvail").html("This Roll Number Already Exits!");
                                $("#submitBtn").prop("disabled", true);
                                $("#saveAndMove").prop("disabled", true);
                            } else {
                                $("#RollNotAvail").css("display", "table-cell");
                                $("#RollNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                                $("#saveAndMove").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#RollNotAvail").css("display", "none");
                    $("#RollNotAvail").html("");
                    $("#submitBtn").prop("disabled", false);
                    $("#saveAndMove").prop("disabled", false);
                }
            });

            $("#stuEnrlNo").on("keyup", function () {
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() !== "") {
                    $.ajax({
                        url: '<?php echo site_url('admin/Student/checkEnrollmentNumberAvailabilityForEdit/') ?>',
                        data: {enrollment_no: $("#stuEnrlNo").val(), tspi_id: '<?php echo $stuPersonalInfoWithPicAndSign->tspi_id ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var availabilityInfo = JSON.parse(result);
                            if (availabilityInfo.doEnrlmntAvailable === 1) {
                                $("#enrlNotAvail").css("display", "table-cell");
                                $("#enrlNotAvail").html("This Enrl. No. Already Exits!");
                                $("#submitBtn").prop("disabled", true);
                                $("#saveAndMove").prop("disabled", true);
                            } else {
                                $("#enrlNotAvail").css("display", "table-cell");
                                $("#enrlNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                                $("#saveAndMove").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#enrlNotAvail").css("display", "none");
                    $("#enrlNotAvail").html("");
                    $("#submitBtn").prop("disabled", false);
                    $("#saveAndMove").prop("disabled", false);
                }
            });

            $("#stuEnrlNo").on("blur", function () {
                if (csrfHash === '') {
                    csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                }
                if ($(this).val().trim() !== "") {
                    $(".se-pre-con").fadeIn("slow");
                    $.ajax({
                        url: '<?php echo site_url('admin/Student/checkEnrollmentNumberAvailabilityForEdit/') ?>',
                        data: {enrollment_no: $("#stuEnrlNo").val(), tspi_id: '<?php echo $stuPersonalInfoWithPicAndSign->tspi_id ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var availabilityInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            if (availabilityInfo.doEnrlmntAvailable === 1) {
                                $("#enrlNotAvail").css("display", "table-cell");
                                $("#enrlNotAvail").html("This Enrl. No. Already Exits!");
                                $("#submitBtn").prop("disabled", true);
                                $("#saveAndMove").prop("disabled", true);
                            } else {
                                $("#enrlNotAvail").css("display", "table-cell");
                                $("#enrlNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                                $("#saveAndMove").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#enrlNotAvail").css("display", "none");
                    $("#enrlNotAvail").html("");
                    $("#submitBtn").prop("disabled", false);
                    $("#saveAndMove").prop("disabled", false);
                }
            });

            $("#stuCourse").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/Sessions/getSessionByCourseAndBranch/') ?>',
                        data: {branch_id: $("#stuBranch").val(), course_id: $(this).val(), csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var sessionInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#stuSession").html(sessionInfo.session_List);
                            csrfHash = sessionInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#stuSession").html("<option>Select Session</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#stuSession").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/Course/getEntryTypesOfGivenCourseSessionAndBranch/') ?>',
                        data: {branch_id: $("#stuBranch").val(), course_id: $("#stuCourse").val(), session_id: $(this).val(), csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var sessionInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            $("#stuEntryType").html(sessionInfo.entry_types);
                            csrfHash = sessionInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#stuEntryType").html("<option>Select Entry Type</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#stuMailingAddrState").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");
                            $("#stuMailingAddrCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#stuMailingAddrCity").html("<option>Select City</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#stuPermaAddrState").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");
                            $("#stuPermaAddrCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#stuPermaAddrCity").html("<option>Select City</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#stuCommAddrState").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");
                            $("#stuCommAddrCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#stuCommAddrCity").html("<option>Select City</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#stuLocGuardAddrState").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");
                            $("#stuLocGuardAddrCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#stuLocGuardAddrCity").html("<option>Select City</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

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

            $("#stuEnrlDate").datepicker({
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true,
                yearRange: '1995:+0',
                numberOfMonths: 1
            });

            $("#stuAdmFormDate").datepicker({
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true,
                yearRange: '1995:+0',
                numberOfMonths: 1
            });

            $("#stuDropOutDate").datepicker({
                dateFormat: "dd/mm/yy",
                changeMonth: true,
                changeYear: true,
                yearRange: '1995:+0',
                numberOfMonths: 1
            });

            $("#permaSameAsMailing").on("click", function () {
                if ($(this).is(":checked")) {
                    $("#stuPermaAddrLineOne").val($("#stuMailingAddrLineOne").val());
                    $("#stuPermaAddrLineTwo").val($("#stuMailingAddrLineTwo").val());
                    $("#stuPermaAddrLineThree").val($("#stuMailingAddrLineThree").val());
                    $("#stuPermaAddrState").val($("#stuMailingAddrState").val());
                    $("#stuPermaAddrState").trigger("change");
                    $("#stuPermaAddrCity").val($("#stuMailingAddrCity").val());
                    $("#stuPermaAddrZipCode").val($("#stuMailingAddrZipCode").val());
                } else {
                    $("#stuPermaAddrLineOne").val("");
                    $("#stuPermaAddrLineTwo").val("");
                    $("#stuPermaAddrLineThree").val("");
                    $("#stuPermaAddrState").val("");
                    $("#stuPermaAddrCity").val("");
                    $("#stuPermaAddrZipCode").val("");
                }
            });

            $("#commAddrSameAsMailing").on("click", function () {
                if ($(this).is(":checked")) {
                    $("#stuCommAddrLineOne").val($("#stuMailingAddrLineOne").val());
                    $("#stuCommAddrLineTwo").val($("#stuMailingAddrLineTwo").val());
                    $("#stuCommAddrLineThree").val($("#stuMailingAddrLineThree").val());
                    $("#stuCommAddrState").val($("#stuMailingAddrState").val());
                    $("#stuCommAddrState").trigger("change");
                    $("#stuCommAddrCity").val($("#stuMailingAddrCity").val());
                    $("#stuCommAddrZipCode").val($("#stuMailingAddrZipCode").val());
                } else {
                    $("#stuCommAddrLineOne").val("");
                    $("#stuCommAddrLineTwo").val("");
                    $("#stuCommAddrLineThree").val("");
                    $("#stuCommAddrState").val("");
                    $("#stuCommAddrCity").val("");
                    $("#stuCommAddrZipCode").val("");
                }
            });

            $("#locGuardAddrSameAsComm").on("click", function () {
                if ($(this).is(":checked")) {
                    $("#stuLocGuardAddrLineOne").val($("#stuCommAddrLineOne").val());
                    $("#stuLocGuardAddrLineTwo").val($("#stuCommAddrLineTwo").val());
                    $("#stuLocGuardAddrLineThree").val($("#stuCommAddrLineThree").val());
                    $("#stuLocGuardAddrState").val($("#stuCommAddrState").val());
                    $("#stuLocGuardAddrState").trigger("change");
                    $("#stuLocGuardAddrCity").val($("#stuMailingAddrCity").val());
                    $("#stuLocGuardAddrZipCode").val($("#stuCommAddrZipCode").val());
                } else {
                    $("#stuLocGuardAddrLineOne").val("");
                    $("#stuLocGuardAddrLineTwo").val("");
                    $("#stuLocGuardAddrLineThree").val("");
                    $("#stuLocGuardAddrState").val("");
                    $("#stuLocGuardAddrCity").val("");
                    $("#stuLocGuardAddrZipCode").val("");
                }
            });

            $("#stuProfExpYes").on("click", function () {
                $("#stuProfExpInYears").prop("readonly", false);
                $("#stuProfOrgName").prop("readonly", false);
                $("#stuProfJobDesc").prop("readonly", false);
            });

            $("#stuProfExpNo").on("click", function () {
                $("#stuProfExpInYears").val("");
                $("#stuProfOrgName").val("");
                $("#stuProfJobDesc").val("");
                $("#stuProfExpInYears").prop("readonly", true);
                $("#stuProfOrgName").prop("readonly", true);
                $("#stuProfJobDesc").prop("readonly", true);
            });

            $("#stuStatus").on("change", function () {
                if ($("#stuStatus").val() === 'D') {
                    $("#stuDropOutDate").val("<?php echo ($stuPersonalInfoWithPicAndSign->tspi_log_date == "" || $stuPersonalInfoWithPicAndSign->tspi_log_date == NULL && ($stuPersonalInfoWithPicAndSign->tspi_status != "D")) ? "" : date("d/m/Y", strtotime($stuPersonalInfoWithPicAndSign->tspi_log_date)); ?>");
                    document.getElementById("stuDropOutDate").classList.remove("readonly");
                } else {
                    $("#stuDropOutDate").val("");
                    document.getElementById("stuDropOutDate").classList.add("readonly");
                }
            });

            function calPercAndDiv(index) {
                var maxMarks = parseFloat($("#stuEduQualiMaxMarks" + index).val().trim());
                var obtMarks = parseFloat($("#stuEduQualiMarksObt" + index).val().trim());
                if (isNaN(maxMarks) && maxMarks !== '') {
                    alert("Only Numbers Are Accepted In Maximum Marks/CGPA Field.");
                    $("#stuEduQualiMaxMarks" + index).val("");
                    $("#stuEduQualiMaxMarks" + index).focus();
                } else if (isNaN(obtMarks) && obtMarks !== '') {
                    alert("Only Numbers Are Accepted In Marks/CGPA Obtained Field.");
                    $("#stuEduQualiMarksObt" + index).val("");
                    $("#stuEduQualiMarksObt" + index).focus();
                } else if (obtMarks > maxMarks) {
                    alert("Obtained Marks/CGPA Can Not Be Greater Than Maximum Marks/CGPA.");
                    $("#stuEduQualiMarksObt" + index).val("");
                    $("#stuEduQualiMarksObt" + index).focus();
                } else {
                    var percentage = ((obtMarks / maxMarks) * 100).toFixed(2);
                    $("#stuEduQualiPercntCGPA" + index).val(percentage);
                    if (percentage >= 60.00) {
                        $("#stuEduQualiDiv" + index).val("I-Div");
                    } else if (percentage >= 45.00 && percentage < 60.00) {
                        $("#stuEduQualiDiv" + index).val("II-Div");
                    } else {
                        $("#stuEduQualiDiv" + index).val("III-Div");
                    }
                }
            }

            function setEntranceExamInfoFields(selectedExam) {
                if (selectedExam === 'UC') {
                    $("#stuEntranceExamUC").prop("checked", "checked");
                    $("#stuEntranceExamRegNo").prop("readonly", false);
                    $("#stuEntranceExamPercentage").prop("readonly", false);
                    $("#stuEntranceExamRank").prop("readonly", false);
                }
            }

            $("#deselectResideChoice").on("click", function () {
                $("#stuResidChoiceParents").prop("checked", false);
                $("#stuResidChoiceHostel").prop("checked", false);
                $("#stuResidChoiceOwn").prop("checked", false);
                $("#stuCommAddrLineOne").val("");
                $("#stuCommAddrLineTwo").val("");
                $("#stuCommAddrLineThree").val("");
                $("#stuCommAddrZipCode").val("");
                $("#stuCommMobile").val("");
                $("#stuCommLandline").val("");
                $("#stuLocGuardName").val("");
                $("#stuLocGuardMobile").val("");
                $("#stuLocGuardLandline").val("");
                $("#stuLocGuardAddrLineOne").val("");
                $("#stuLocGuardAddrLineTwo").val("");
                $("#stuLocGuardAddrLineThree").val("");
                $("#stuLocGuardAddrZipCode").val("");
                $("#stuLocGuardAddrLineOne").val("");
                $("#commAddrSameAsMailing").val("");
                $("#stuCommAddrState").val("");
                $("#stuCommAddrCity").val("");
                $("#locGuardAddrSameAsComm").val("");
                $("#stuLocGuardAddrState").val("");
                $("#stuLocGuardAddrCity").val("");
                $("#stuCommAddrLineOne").prop("readonly", true);
                $("#stuCommAddrLineTwo").prop("readonly", true);
                $("#stuCommAddrLineThree").prop("readonly", true);
                $("#stuCommAddrZipCode").prop("readonly", true);
                $("#stuCommMobile").prop("readonly", true);
                $("#stuCommLandline").prop("readonly", true);
                $("#stuLocGuardName").prop("readonly", true);
                $("#stuLocGuardMobile").prop("readonly", true);
                $("#stuLocGuardLandline").prop("readonly", true);
                $("#stuLocGuardAddrLineOne").prop("readonly", true);
                $("#stuLocGuardAddrLineTwo").prop("readonly", true);
                $("#stuLocGuardAddrLineThree").prop("readonly", true);
                $("#stuLocGuardAddrZipCode").prop("readonly", true);
                $("#stuLocGuardAddrLineOne").prop("readonly", true);
                document.getElementById("commAddrSameAsMailingLbl").classList.add("readonly");
                document.getElementById("locGuardAddrSameAsCommLbl").classList.add("readonly");
                document.getElementById("commAddrSameAsMailing").classList.add("readonly");
                document.getElementById("stuCommAddrState").classList.add("readonly");
                document.getElementById("stuCommAddrCity").classList.add("readonly");
                document.getElementById("locGuardAddrSameAsComm").classList.add("readonly");
                document.getElementById("stuLocGuardAddrState").classList.add("readonly");
                document.getElementById("stuLocGuardAddrCity").classList.add("readonly");
            });

            function setStudentResidenceFields(residChoice) {
                if (residChoice === 'O') {
                    $("#stuCommAddrLineOne").prop("readonly", false);
                    $("#stuCommAddrLineTwo").prop("readonly", false);
                    $("#stuCommAddrLineThree").prop("readonly", false);
                    $("#stuCommAddrZipCode").prop("readonly", false);
                    $("#stuCommMobile").prop("readonly", false);
                    $("#stuCommLandline").prop("readonly", false);
                    $("#stuLocGuardName").prop("readonly", false);
                    $("#stuLocGuardMobile").prop("readonly", false);
                    $("#stuLocGuardLandline").prop("readonly", false);
                    $("#stuLocGuardAddrLineOne").prop("readonly", false);
                    $("#stuLocGuardAddrLineTwo").prop("readonly", false);
                    $("#stuLocGuardAddrLineThree").prop("readonly", false);
                    $("#stuLocGuardAddrZipCode").prop("readonly", false);
                    $("#stuLocGuardAddrLineOne").prop("readonly", false);
                    document.getElementById("commAddrSameAsMailingLbl").classList.remove("readonly");
                    document.getElementById("locGuardAddrSameAsCommLbl").classList.remove("readonly");
                    document.getElementById("commAddrSameAsMailing").classList.remove("readonly");
                    document.getElementById("stuCommAddrState").classList.remove("readonly");
                    document.getElementById("stuCommAddrCity").classList.remove("readonly");
                    document.getElementById("locGuardAddrSameAsComm").classList.remove("readonly");
                    document.getElementById("stuLocGuardAddrState").classList.remove("readonly");
                    document.getElementById("stuLocGuardAddrCity").classList.remove("readonly");
                } else {
                    $("#stuCommAddrLineOne").val("");
                    $("#stuCommAddrLineTwo").val("");
                    $("#stuCommAddrLineThree").val("");
                    $("#stuCommAddrZipCode").val("");
                    $("#stuCommMobile").val("");
                    $("#stuCommLandline").val("");
                    $("#stuLocGuardName").val("");
                    $("#stuLocGuardMobile").val("");
                    $("#stuLocGuardLandline").val("");
                    $("#stuLocGuardAddrLineOne").val("");
                    $("#stuLocGuardAddrLineTwo").val("");
                    $("#stuLocGuardAddrLineThree").val("");
                    $("#stuLocGuardAddrZipCode").val("");
                    $("#stuLocGuardAddrLineOne").val("");
                    $("#commAddrSameAsMailing").val("");
                    $("#stuCommAddrState").val("");
                    $("#stuCommAddrCity").val("");
                    $("#locGuardAddrSameAsComm").val("");
                    $("#stuLocGuardAddrState").val("");
                    $("#stuLocGuardAddrCity").val("");
                    $("#stuCommAddrLineOne").prop("readonly", true);
                    $("#stuCommAddrLineTwo").prop("readonly", true);
                    $("#stuCommAddrLineThree").prop("readonly", true);
                    $("#stuCommAddrZipCode").prop("readonly", true);
                    $("#stuCommMobile").prop("readonly", true);
                    $("#stuCommLandline").prop("readonly", true);
                    $("#stuLocGuardName").prop("readonly", true);
                    $("#stuLocGuardMobile").prop("readonly", true);
                    $("#stuLocGuardLandline").prop("readonly", true);
                    $("#stuLocGuardAddrLineOne").prop("readonly", true);
                    $("#stuLocGuardAddrLineTwo").prop("readonly", true);
                    $("#stuLocGuardAddrLineThree").prop("readonly", true);
                    $("#stuLocGuardAddrZipCode").prop("readonly", true);
                    $("#stuLocGuardAddrLineOne").prop("readonly", true);
                    document.getElementById("commAddrSameAsMailingLbl").classList.add("readonly");
                    document.getElementById("locGuardAddrSameAsCommLbl").classList.add("readonly");
                    document.getElementById("commAddrSameAsMailing").classList.add("readonly");
                    document.getElementById("stuCommAddrState").classList.add("readonly");
                    document.getElementById("stuCommAddrCity").classList.add("readonly");
                    document.getElementById("locGuardAddrSameAsComm").classList.add("readonly");
                    document.getElementById("stuLocGuardAddrState").classList.add("readonly");
                    document.getElementById("stuLocGuardAddrCity").classList.add("readonly");
                }
            }

            function toggleScholarshipPercentage(schFlag) {
                if (schFlag === "T") {
                    document.getElementById("stuSchPercentage").classList.remove("readonly");
                } else {
                    $("#stuSchPercentage").val("0");
                    document.getElementById("stuSchPercentage").classList.add("readonly");
                }
            }

            function removeDocument(tddi_id, tspi_id) {
                if (confirm("Do You Want To Remove This Uploaded Document? This Action Can Not Be Rolled Back!")) {
                    window.location.href = '<?php echo site_url('admin/Student/deleteStudentDocument/'); ?>' + tddi_id + '/' + tspi_id;
                }
            }

            $(".saveBtn").on("click", function () {
                if ($("#stuBranch").val().trim() === "") {
                    $("#modalErr").html("Please Select Any Branch.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuCourse").val().trim() === "") {
                    $("#modalErr").html("Please Select Any Course.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuSession").val().trim() === "") {
                    $("#modalErr").html("Please Select Any Session.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuEntryType").val().trim() === "") {
                    $("#modalErr").html("Please Select Any Entry Type.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuFormNo").val().trim() === "") {
                    $("#modalErr").html("Please Enter Form Number.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuName").val().trim() === "") {
                    $("#modalErr").html("Applicant's Name Is Required.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuMobile").val().trim() === "") {
                    $("#modalErr").html("Applicant's Mobile Number Is Required.");
                    $("#validateFormModal").modal('show');
                } else if (isNaN($("#stuMobile").val().trim())) {
                    $("#modalErr").html("Only Numbers Are Allowed In Mobile Number Field.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuMobile").val().trim().length === "") {
                    $("#modalErr").html("Only 10 Digit Numbers Are Allowed In Mobile Number Field.");
                    $("#validateFormModal").modal('show');
                } else if (!($('#stuGenMale').is(':checked') || $('#stuGenFemale').is(':checked') || $('#stuGenTrans').is(':checked'))) {
                    $("#modalErr").html("Applicant's Gender Is Required.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuDOB").val().trim() === "") {
                    $("#modalErr").html("Applicant's DOB Is Required.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuCategory").val().trim() === "") {
                    $("#modalErr").html("Applicant's Category Is Required.");
                    $("#validateFormModal").modal('show');
                } else if ($("#stuReligion").val().trim() === "") {
                    $("#modalErr").html("Applicant's Religion Is Required.");
                    $("#validateFormModal").modal('show');
                } else {
                    $("#studentEnrollmentEditFrm").submit();
                }
            });

            $(document).ready(function () {
                if ($("#stuCourse").val() !== "") {
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Sessions/getSessionByCourseAndBranchSelected/') ?>',
                        data: {branch_id: $("#stuBranch").val(), course_id: $("#stuCourse").val(), session_id: '<?php echo $stuPersonalInfoWithPicAndSign->session_id ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var sessionInfo = JSON.parse(result);
                            $("#stuSession").html(sessionInfo.session_List);
                            csrfHash = sessionInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#stuSession").val() !== "") {
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Course/getEntryTypesOfGivenCourseSessionAndBranchSelected/') ?>',
                        data: {branch_id: $("#stuBranch").val(), course_id: $("#stuCourse").val(), session_id: '<?php echo $stuPersonalInfoWithPicAndSign->session_id ?>', ucs_map_id: '<?php echo $stuPersonalInfoWithPicAndSign->ucs_map_id ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var sessionInfo = JSON.parse(result);
                            $("#stuEntryType").html(sessionInfo.entry_types);
                            csrfHash = sessionInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#stuMailingAddrState").val() !== "") {
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByStateSelected/') ?>',
                        data: {state_id: $("#stuMailingAddrState").val(), city_id: '<?php echo $stuContactInfo->tsci_resid_city; ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var cityInfo = JSON.parse(result);
                            $("#stuMailingAddrCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#stuPermaAddrState").val() !== "") {
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByStateSelected/') ?>',
                        data: {state_id: $("#stuPermaAddrState").val(), city_id: '<?php echo $stuContactInfo->tsci_perma_city; ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var cityInfo = JSON.parse(result);
                            $("#stuPermaAddrCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#stuCommAddrState").val() !== "") {
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByStateSelected/') ?>',
                        data: {state_id: $("#stuCommAddrState").val(), city_id: '<?php echo $stuHostelAndResidInfo->tshri_comm_city; ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var cityInfo = JSON.parse(result);
                            $("#stuCommAddrCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#stuLocGuardAddrState").val() !== "") {
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByStateSelected/') ?>',
                        data: {state_id: $("#stuLocGuardAddrState").val(), city_id: '<?php echo $stuHostelAndResidInfo->tshri_loc_guard_city; ?>', csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var cityInfo = JSON.parse(result);
                            $("#stuLocGuardAddrCity").html(cityInfo.city_list);
                            csrfHash = cityInfo.csrfHash;
                            studentEnrollmentEditFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if (studentEnrollmentEditFrm.stuResidChoice.value !== "") {
                    setStudentResidenceFields(studentEnrollmentEditFrm.stuResidChoice.value);
                }

                if (studentEnrollmentEditFrm.stuEntranceExam.value !== "") {
                    setEntranceExamInfoFields(studentEnrollmentEditFrm.stuEntranceExam.value);
                }

                if ($("#stuFormNo").val() !== "") {
                    $("#stuFormNo").trigger("blur");
                }

                if ($("#stuEnrlNo").val() !== "") {
                    $("#stuEnrlNo").trigger("blur");
                }

                if ($("#stuRollNo").val() !== "") {
                    $("#stuFormNo").trigger("blur");
                }

                if ($("#stuStatus").val() === 'D') {
                    $("#stuStatus").trigger("change");
                }

                if ('<?php $stuPersonalInfoWithPicAndSign->tspi_scholarship_eligible; ?>' === "T") {
                    document.getElementById("stuSchPercentage").classList.add("readonly");
                } else {
                    document.getElementById("stuSchPercentage").classList.remove("readonly");
                }

                if ('<?php echo $stuEntranceExamAndProfExpInfo->tsevi_is_prof_exp; ?>' === "T") {
                    $("#stuProfExpYes").trigger("click");
                }
            });</script>
        <?php $this->load->view("admin/footer"); ?>
        <!-- Form Validation Modal Starts -->
        <div class="modal fade" id="validateFormModal" role="dialog" data-backdrop="static" data-keyboard="false">
            <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-header">
                        <h4 class="modal-title"><b>Incomplete Or Invalid Form Data !!</b></h4>
                        <button type="button" class="close" data-dismiss="modal">&times;</button>
                    </div>
                    <div class="modal-body" style="max-height: calc(100vh - 160px);overflow-y: auto;">
                        <b><span id="modalErr" style='color:#FF0000;font-weight: bold;font-size: larger;'></span></b><br><br><br>
                        <center>
                            <button class="btn btn-info" data-dismiss="modal">OK</button>
                        </center>
                    </div>
                </div>
            </div>
        </div>
        <!-- Form Validation Modal Ends -->
    </body>
</html>

KBHT - 2023