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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/dbcollege/www/cas/application/views/admin/student/enrollStudent.php
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>Add New Student | College Automation System | <?php echo $this->session->userdata("adminData")["branch_short_name"]; ?></title>
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/style.css"); ?>">
        <link rel="stylesheet" href="<?php echo base_url("assets/admin/css/jquery-ui.css"); ?>">
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,800,900&amp;display=swap">
        <link rel="image icon" href="<?php echo base_url("assets/admin/images/logo.png"); ?>">
        <script src="<?php echo base_url("assets/admin/js/jquery-1.10.2.min.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/jquery-ui.js"); ?>"></script>
        <script src="<?php echo base_url("assets/admin/js/bootstrap.min.js"); ?>"></script>
        <script>
            var csrfHash = '';
        </script>
    </head>
    <body>
        <div class="se-pre-con"></div>
        <section>
            <?php $this->load->view("admin/navAndHeader"); ?>
            <div class="main-content">
                <div class="container-fluid content-top-gap">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb my-breadcrumb">
                            <li class="breadcrumb-item"><a href="<?php echo site_url("admin/Dashboard"); ?>">Home</a></li>
                            <li class="breadcrumb-item" aria-current="page"><a href="<?php echo site_url("admin/Student/"); ?>">Student Management</a></li>
                            <li class="breadcrumb-item active" aria-current="page"><a href="<?php echo site_url("admin/Student/enrollStudent"); ?>">Enroll New 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> Enroll New Student</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/saveNewStudent'), ['name' => 'studentEnrollmentFrm', 'id' => 'studentEnrollmentFrm']); ?>
                                <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;
                                                }
                                                ?>
                                                <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">
                                            <option value="" <?php echo set_select("stuCourse", "") ?>>Select Course</option>
                                            <?php foreach ($courses as $course) { ?>
                                                <option value="<?php echo $course->course_id; ?>" <?php echo set_select("stuCourse", $course->course_id); ?>><?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 set_value('stuFormNo'); ?>" 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 set_value('stuEnrlNo'); ?>" 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 set_value('stuRollNo'); ?>" 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 set_value('stuName'); ?>" 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 set_value('stuMailingAddrLineOne'); ?>" 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 set_value('stuMailingAddrLineTwo'); ?>" 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 set_value('stuMailingAddrLineThree'); ?>" 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) { ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo set_select("stuMailingAddrState", $state->state_id); ?>><?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 set_value('stuMailingAddrZipCode'); ?>" 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 set_value('stuMobile'); ?>" 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 set_value('stuEmail'); ?>" 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 set_value('stuPermaAddrLineOne'); ?>" 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 set_value('stuPermaAddrLineTwo'); ?>" 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 set_value('stuPermaAddrLineThree'); ?>" 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) { ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo set_select("stuPermaAddrState", $state->state_id); ?>><?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 set_value('stuPermaAddrZipCode'); ?>" 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 set_value('stuParentLandline'); ?>" 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 set_value('stuParentMobile'); ?>" 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 set_radio('stuGen', "M"); ?>>&nbsp;<label for="stuGenMale">Male</label>
                                            <input type="radio" id="stuGenFemale" name="stuGen" value="F" <?php echo set_radio('stuGen', "F"); ?>>&nbsp;<label for="stuGenFemale">Female</label>
                                            <input type="radio" id="stuGenTrans" name="stuGen" value="T" <?php echo set_radio('stuGen', "T"); ?>>&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 set_value('stuDOB'); ?>" 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 set_select("stuCategory", ""); ?>>Select Category</option>
                                                <?php foreach ($categories as $category) { ?>
                                                    <option value="<?php echo addslashes($category['category_name']); ?>" <?php echo set_select("stuCategory", addslashes($category['category_name'])); ?>><?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 set_select("stuReligion", ""); ?>>Select Religion</option>
                                                <?php foreach ($religions as $religion) { ?>
                                                    <option value="<?php echo addslashes($religion['religion_name']); ?>" <?php echo set_select("stuReligion", addslashes($religion['religion_name'])); ?>><?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 set_value('stuFatherName'); ?>" placeholder="Enter Father's Name"  maxlength="200">
                                        </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 set_value('stuMotherName'); ?>" placeholder="Enter Mother's Name" maxlength="200">
                                        </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 set_value('stuAdmFormDate'); ?>" 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 set_value('stuEnrlDate'); ?>" 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 set_radio('stuDiffAbled', "T"); ?>>&nbsp;<label for="stuDiffAbledYes">Yes</label>
                                            <input type="radio" id="stuDiffAbledNo" name="stuDiffAbled" value="F" <?php echo set_radio('stuDiffAbled', "F"); ?>>&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 set_value('stuParentIncome'); ?>" 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 set_value('stuAadharNo'); ?>" placeholder="Enter Student's Aadhar Number"  maxlength="12">
                                        </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 set_value('stuPAN'); ?>" placeholder="Enter Student's PAN Number" maxlength="10">
                                        </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 set_value('stuCSTCNumber'); ?>" placeholder="Enter Student's Caste Certificate Number"  maxlength="15">
                                        </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 set_value('stuAICNumber'); ?>" placeholder="Enter Annual Income Certificate Number" maxlength="15">
                                        </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">

                                                </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 set_radio('stuProfExp', "T"); ?>>&nbsp;<label for="stuProfExpYes">Yes</label>
                                            <input type="radio" id="stuProfExpNo" name="stuProfExp" value="F" <?php echo set_radio('stuProfExp', "F"); ?> checked="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 set_value('stuProfExpInYears'); ?>" 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 set_value('stuProfOrgName'); ?>" 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 set_value('stuProfJobDesc'); ?></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 set_value('stuExtraCurricularAct'); ?></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>
                                                <tr>
                                                    <td>
                                                        <input type="text" class="form-control" name="stuFamBGName[]" value="<?php echo set_value('stuFamBGName[0]'); ?>" 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 set_select("stuFamBGRelation[0]", $relation->rel_id) ?>><?php echo addslashes($relation->rel_title); ?></option>
                                                                <?php
                                                            }
                                                            ?>
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control" name="stuFamBGDesignation[]" value="<?php echo set_value('stuFamBGDesignation[0]'); ?>" placeholder="Enter Family Member Designation" maxlength="200">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control" name="stuFamBGOrganization[]" value="<?php echo set_value('stuFamBGOrganization[0]'); ?>" placeholder="Enter Family Member Organization" maxlength="200">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <input type="text" class="form-control" name="stuFamBGName[]" value="<?php echo set_value('stuFamBGName[1]'); ?>" 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 set_select("stuFamBGRelation[1]", $relation->rel_id) ?>><?php echo addslashes($relation->rel_title); ?></option>
                                                                <?php
                                                            }
                                                            ?>
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control" name="stuFamBGDesignation[]" value="<?php echo set_value('stuFamBGDesignation[1]'); ?>" placeholder="Enter Family Member Designation" maxlength="200">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control" name="stuFamBGOrganization[]" value="<?php echo set_value('stuFamBGOrganization[1]'); ?>" placeholder="Enter Family Member Organization" maxlength="200">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <input type="text" class="form-control" name="stuFamBGName[]" value="<?php echo set_value('stuFamBGName[2]'); ?>" 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 set_select("stuFamBGRelation[2]", $relation->rel_id) ?>><?php echo addslashes($relation->rel_title); ?></option>
                                                                <?php
                                                            }
                                                            ?>
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control" name="stuFamBGDesignation[]" value="<?php echo set_value('stuFamBGDesignation[2]'); ?>" placeholder="Enter Family Member Designation" maxlength="200">
                                                    </td>
                                                    <td>
                                                        <input type="text" class="form-control" name="stuFamBGOrganization[]" value="<?php echo set_value('stuFamBGOrganization[2]'); ?>" placeholder="Enter Family Member Organization" maxlength="200">
                                                    </td>
                                                </tr>
                                            </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 set_radio('stuHowKnowSMS', "F"); ?>>&nbsp;<label for="stuHowKnowSMSFriend">Friends/Relative</label>
                                            <input type="radio" id="stuHowKnowSMSAdv" name="stuHowKnowSMS" value="A" <?php echo set_radio('stuHowKnowSMS', "A"); ?>>&nbsp;<label for="stuHowKnowSMSAdv">Advertisement</label>
                                            <input type="radio" id="stuHowKnowSMSTeacher" name="stuHowKnowSMS" value="T" <?php echo set_radio('stuHowKnowSMS', "T"); ?>>&nbsp;<label for="stuHowKnowSMSTeacher">Teachers</label>
                                            <input type="radio" id="stuHowKnowSMSInternet" name="stuHowKnowSMS" value="I" <?php echo set_radio('stuHowKnowSMS', "I"); ?>>&nbsp;<label for="stuHowKnowSMSInternet">Internet</label>
                                            <input type="radio" id="stuHowKnowSMSOther" name="stuHowKnowSMS" value="O" <?php echo set_radio('stuHowKnowSMS', "O"); ?>>&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 set_value('stuHowKnowSMSOtherDesc'); ?>" 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 set_value('stuEntranceExamRegNo'); ?>" 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 set_value('stuEntranceExamPercentage'); ?>" 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 set_value('stuEntranceExamRank'); ?>" 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 set_radio('stuResidChoice', "P"); ?>>&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 set_radio('stuResidChoice', "H"); ?>>&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 set_radio('stuResidChoice', "O"); ?>>&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 set_value('stuCommAddrLineOne'); ?>" 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 set_value('stuCommAddrLineTwo'); ?>" 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 set_value('stuCommAddrLineThree'); ?>" 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) { ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo set_select("stuCommAddrState", $state->state_id); ?>><?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 set_value('stuCommAddrZipCode'); ?>" 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 set_value('stuCommMobile'); ?>" 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 set_value('stuCommLandline'); ?>" 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 set_value('stuLocGuardName'); ?>" 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 set_value('stuLocGuardMobile'); ?>" 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 set_value('stuLocGuardLandline'); ?>" 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 set_value('stuLocGuardAddrLineOne'); ?>" 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 set_value('stuLocGuardAddrLineTwo'); ?>" 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 set_value('stuLocGuardAddrLineThree'); ?>" 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) { ?>
                                                    <option value="<?php echo $state->state_id; ?>" <?php echo set_select("stuLocGuardAddrState", $state->state_id); ?>><?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 set_value('stuLocGuardAddrZipCode'); ?>" 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>Select File To Upload (Allowed Extensions Are *.pdf, *.jpg, *.jpeg, *.png Of Max. Size 4 MB Each)</th>
                                                    </tr>
                                                </thead>
                                                <tbody id="documents">

                                                </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 set_radio('stuYearGap', "T"); ?>>&nbsp;<label for="stuYearGapYes">Yes</label>
                                            <input type="radio" id="stuYearGapNo" name="stuYearGap" value="F" <?php echo set_radio('stuYearGap', "F"); ?> checked="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 set_radio('stuClgSch', "T"); ?>>&nbsp;<label for="stuClgSchYes">Yes</label>
                                            <input type="radio" id="stuClgSchNo" name="stuClgSch" value="F" onClick="toggleScholarshipPercentage('F');" <?php echo set_radio('stuClgSch', "F"); ?> checked="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 set_select("stuSchPercentage", "0") ?>>Select Percentage</option>
                                                <option value="10" <?php echo set_select("stuSchPercentage", "10") ?>>10%</option>
                                                <option value="15" <?php echo set_select("stuSchPercentage", "15") ?>>15%</option>
                                                <option value="20" <?php echo set_select("stuSchPercentage", "20") ?>>20%</option>
                                                <option value="25" <?php echo set_select("stuSchPercentage", "25") ?>>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-9">
                                            <label for="stuStatus" class="input__label">Select Any One: </label>
                                            <select id="stuStatus" name="stuStatus" class="custom-select">
                                                <option value="NA" <?php echo set_select("stuStatus", "NA") ?>>NA(Not-Admitted)</option>
                                                <option value="DV" <?php echo set_select("stuStatus", "DV"); ?>>Documents Verified & Counselling Complete</option>
                                                <option value="D" <?php echo set_select("stuStatus", "D"); ?>>Drop Out</option>
                                                <option value="E" <?php echo set_select("stuStatus", "E"); ?>>Expelled(Name Cut-Off)</option>
                                                <option value="P" <?php echo set_select("stuStatus", "P"); ?>>Passout(Alumna)</option>
                                                <option value="CE" <?php echo set_select("stuStatus", "CE"); ?>>Currently Enrolled</option>
                                            </select>
                                        </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 set_select("stuRegFeeApplicable", "T"); ?>>Yes</option>
                                                <option value="F" <?php echo set_select("stuRegFeeApplicable", "F"); ?>>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>
                                            <input type="file" class="form-control" id="stuPhotograph" name="stuPhotograph">
                                        </div>
                                        <div class="form-group col-md-6">
                                            <label for="stuSignature" class="input__label">Signature</label>
                                            <input type="file" class="form-control" id="stuSignature" name="stuSignature">
                                        </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 set_value('stuRemarks'); ?></textarea>
                                        </div>
                                    </div>
                                </fieldset>
                                <button id="submitBtn" type="button" class="btn btn-primary btn-block btn-style mt-4"><i class="fa fa-user-plus"></i>&nbsp;Enroll Student</button>
                                <?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/checkFormNumberAvailability/') ?>',
                        data: {form_no: $("#stuFormNo").val(), 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);
                            } else {
                                $("#formNotAvail").css("display", "none");
                                $("#formNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#formNotAvail").css("display", "none");
                    $("#formNotAvail").html("");
                    $("#submitBtn").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/checkFormNumberAvailability/') ?>',
                        data: {form_no: $("#stuFormNo").val(), 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);
                            } else {
                                $("#formNotAvail").css("display", "none");
                                $("#formNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#formNotAvail").css("display", "none");
                    $("#formNotAvail").html("");
                    $("#submitBtn").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/checkRollNumberAvailability/') ?>',
                        data: {roll_no: $("#stuRollNo").val(), 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);
                            } else {
                                $("#RollNotAvail").css("display", "table-cell");
                                $("#RollNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#RollNotAvail").css("display", "none");
                    $("#RollNotAvail").html("");
                    $("#submitBtn").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/checkRollNumberAvailability/') ?>',
                        data: {roll_no: $("#stuRollNo").val(), 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);
                            } else {
                                $("#RollNotAvail").css("display", "table-cell");
                                $("#RollNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#RollNotAvail").css("display", "none");
                    $("#RollNotAvail").html("");
                    $("#submitBtn").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/checkEnrollmentNumberAvailability/') ?>',
                        data: {enrollment_no: $("#stuEnrlNo").val(), 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);
                            } else {
                                $("#enrlNotAvail").css("display", "table-cell");
                                $("#enrlNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#enrlNotAvail").css("display", "none");
                    $("#enrlNotAvail").html("");
                    $("#submitBtn").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/checkEnrollmentNumberAvailability/') ?>',
                        data: {enrollment_no: $("#stuEnrlNo").val(), 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);
                            } else {
                                $("#enrlNotAvail").css("display", "table-cell");
                                $("#enrlNotAvail").html("");
                                $("#submitBtn").prop("disabled", false);
                            }
                            csrfHash = availabilityInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#enrlNotAvail").css("display", "none");
                    $("#enrlNotAvail").html("");
                    $("#submitBtn").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;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#stuSession").html("<option>Select Session</option>");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#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/Exam/getAllExamsByCourseCategory/') ?>',
                        data: {course_id: $(this).val(), csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var examInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            if (examInfo.exams_found === 1) {
                                $("#exams").html('');
                                var htmlExamData = '';
                                for (var i = 0; i < examInfo.exam_list.length; i++) {
                                    var thisExam = examInfo.exam_list[i];
                                    htmlExamData += "<tr>";
                                    htmlExamData += "<td>" + thisExam.exam_name + "</td>";
                                    htmlExamData += "<td><input type='text' class='form-control' name='stuEduQualiBoardUniv[]'></td>";
                                    htmlExamData += "<td><select name='stuEduQualiStream[]' class='custom-select'><option value=''>Select Stream</option><option>Science</option><option>Arts</option><option>Commerce</option><option>Comp. App.</option><option>Others</option></select></td>";
                                    htmlExamData += "<td><select name='stuEduQualiYearOfExam[]' class='custom-select'><option value=''>Select Year</option>";
                                    for (var year = new Date().getFullYear(); year > new Date().getFullYear() - 37; year--) {
                                        htmlExamData += "<option>" + year + "</option>";
                                    }
                                    htmlExamData += "</select></td>";
                                    htmlExamData += "<td><input type='text' class='form-control' id='stuEduQualiMaxMarks" + i + "' name='stuEduQualiMaxMarks[]'></td>";
                                    htmlExamData += "<td><input type='text' class='form-control' id='stuEduQualiMarksObt" + i + "' name='stuEduQualiMarksObt[]'></td>";
                                    htmlExamData += "<td><input type='text' class='form-control' id='stuEduQualiPercntCGPA" + i + "' name='stuEduQualiPercntCGPA[]' onFocus='calPercAndDiv(" + i + ");'></td>";
                                    htmlExamData += "<td><select name='stuEduQualiDiv[]' class='custom-select' id='stuEduQualiDiv" + i + "'><option value=''>Select Div.</option><option>I-Div</option><option>II-Div</option><option>III-Div</option></select></td>";
                                    htmlExamData += "<input type='hidden' class='form-control' name='stuEduQualiExamId[]' value='" + thisExam.exam_id + "'>";
                                    htmlExamData += "</tr>";
                                }
                                $("#exams").html(htmlExamData);
                            } else {
                                $("#exams").html(examInfo.message);
                            }
                            csrfHash = examInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#exams").html("");
                    $(".se-pre-con").fadeOut("slow");
                }
            });

            $("#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/Document/getAllDocumentsByCourseCategory/') ?>',
                        data: {course_id: $(this).val(), csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var docInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            if (docInfo.docs_found === 1) {
                                $("#documents").html('');
                                var htmlDocumentData = '';
                                for (var i = 0; i < docInfo.doc_list.length; i++) {
                                    var thisDocument = docInfo.doc_list[i];
                                    htmlDocumentData += "<tr>";
                                    htmlDocumentData += "<td>" + thisDocument.doc_name + "</td>";
                                    htmlDocumentData += "<td><input type='checkbox' value='NA' name='stuDocumentFileApplicable" + thisDocument.doc_id + "'> Not Applicable</td>";
                                    htmlDocumentData += "<td><input type='file' class='form-control' name='stuDocumentFile" + thisDocument.doc_id + "'></td>";
                                    htmlDocumentData += "<input type='hidden' class='form-control' name='stuDocumentFileId[]' value='" + thisDocument.doc_id + "'>";
                                    htmlDocumentData += "</tr>";
                                }
                                $("#documents").html(htmlDocumentData);
                            } else {
                                $("#documents").html(docInfo.message);
                            }
                            csrfHash = docInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                } else {
                    $("#documents").html("");
                    $(".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;
                            studentEnrollmentFrm.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;
                            studentEnrollmentFrm.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;
                            studentEnrollmentFrm.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;
                            studentEnrollmentFrm.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;
                            studentEnrollmentFrm.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
            });

            $("#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);
            });

            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");
                }
            }

            $("#submitBtn").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 {
                    $("#studentEnrollmentFrm").submit();
                }
            });

            $(document).ready(function () {
                setEntranceExamInfoFields('UC');
                if ($("#stuCourse").val() !== "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Sessions/getSessionByCourseAndBranch/') ?>',
                        data: {branch_id: $("#stuBranch").val(), course_id: $("#stuCourse").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;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                    $.ajax({
                        url: '<?php echo site_url('admin/Exam/getAllExamsByCourseCategory/') ?>',
                        data: {course_id: $("#stuCourse").val(), csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var examInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            if (examInfo.exams_found === 1) {
                                $("#exams").html('');
                                var htmlExamData = '';
                                for (var i = 0; i < examInfo.exam_list.length; i++) {
                                    var thisExam = examInfo.exam_list[i];
                                    htmlExamData += "<tr>";
                                    htmlExamData += "<td>" + thisExam.exam_name + "</td>";
                                    htmlExamData += "<td><input type='text' class='form-control' name='stuEduQualiBoardUniv[]'></td>";
                                    htmlExamData += "<td><select name='stuEduQualiStream[]' class='custom-select'><option selected>Science</option><option>Arts</option><option>Commerce</option><option>Comp. App.</option><option>Others</option></select></td>";
                                    htmlExamData += "<td><select name='stuEduQualiYearOfExam[]' class='custom-select'>";
                                    for (var year = new Date().getFullYear(); year > new Date().getFullYear() - 31; year--) {
                                        htmlExamData += "<option>" + year + "</option>";
                                    }
                                    htmlExamData += "</select></td>";
                                    htmlExamData += "<td><input type='text' class='form-control' name='stuEduQualiMaxMarks[]'></td>";
                                    htmlExamData += "<td><input type='text' class='form-control' name='stuEduQualiMarksObt[]'></td>";
                                    htmlExamData += "<td><input type='text' class='form-control' name='stuEduQualiPercntCGPA[]'></td>";
                                    htmlExamData += "<td><select name='stuEduQualiDiv[]' class='custom-select'><option selected>I-Div</option><option>II-Div</option><option>III-Div</option></select></td>";
                                    htmlExamData += "<input type='hidden' class='form-control' name='stuEduQualiExamId[]' value='" + thisExam.exam_id + "'>";
                                    htmlExamData += "</tr>";
                                }
                                $("#exams").html(htmlExamData);
                            } else {
                                $("#exams").html(examInfo.message);
                            }
                            csrfHash = examInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                    $.ajax({
                        url: '<?php echo site_url('admin/Document/getAllDocumentsByCourseCategory/') ?>',
                        data: {course_id: $("#stuCourse").val(), csrf_token: csrfHash},
                        type: 'POST',
                        async: false,
                        success: function (result) {
                            var docInfo = JSON.parse(result);
                            $(".se-pre-con").fadeOut("slow");
                            if (docInfo.docs_found === 1) {
                                $("#documents").html('');
                                var htmlDocumentData = '';
                                for (var i = 0; i < docInfo.doc_list.length; i++) {
                                    var thisDocument = docInfo.doc_list[i];
                                    htmlDocumentData += "<tr>";
                                    htmlDocumentData += "<td>" + thisDocument.doc_name + "</td>";
                                    htmlDocumentData += "<td><input type='file' class='form-control' name='stuDocumentFile" + thisDocument.doc_id + "'></td>";
                                    htmlDocumentData += "<input type='hidden' class='form-control' name='stuDocumentFileId[]' value='" + thisDocument.doc_id + "'>";
                                    htmlDocumentData += "</tr>";
                                }
                                $("#documents").html(htmlDocumentData);
                            } else {
                                $("#documents").html(docInfo.message);
                            }
                            csrfHash = docInfo.csrfHash;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#stuMailingAddrState").val() !== "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByState/') ?>',
                        data: {state_id: $("#stuMailingAddrState").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;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#stuPermaAddrState").val() !== "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByState/') ?>',
                        data: {state_id: $("#stuPermaAddrState").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;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#stuCommAddrState").val() !== "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByState/') ?>',
                        data: {state_id: $("#stuCommAddrState").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;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

                if ($("#stuLocGuardAddrState").val() !== "") {
                    $(".se-pre-con").fadeIn("slow");
                    if (csrfHash === '') {
                        csrfHash = '<?php echo $this->security->get_csrf_hash(); ?>';
                    }
                    $.ajax({
                        url: '<?php echo site_url('admin/Locations/getActiveCitiesByState/') ?>',
                        data: {state_id: $("#stuLocGuardAddrState").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;
                            studentEnrollmentFrm.csrf_token.value = csrfHash;
                        }
                    });
                }

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

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

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

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

                if ($("#stuRollNo").val() !== "") {
                    $("#stuFormNo").trigger("blur");
                }
            });
        </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>

Youez - 2016 - github.com/yon3zu
LinuXploit