<script>

    //Create a boolean variable to check for a valid Internet Explorer instance.
    var xmlhttp = false;
//Check if we are using IE.
    try {
        //If the Javascript version is greater than 5.
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        //alert ("You are using Microsoft Internet Explorer.");
    } catch (e) {

        //If not, then use the older active x object.
        try {
            //If we are using Internet Explorer.
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            //alert ("You are using Microsoft Internet Explorer");
        } catch (E) {
            //Else we must be using a non-IE browser.
            xmlhttp = false;
        }
    }
//If we are using a non-IE browser, create a javascript instance of the object.
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
        xmlhttp = new XMLHttpRequest();
        //alert ("You are not using Microsoft Internet Explorer");
    }
</script>

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="">
        <a href="<?php echo base_url(); ?>super_admin">Dashboard</a>
        <span>Add Student</span>
    </div>
    <hr>
    <h2 class="page-header">Student Form</h2>
    <p>
        <?php
        $message = $this->session->userdata('message');
        $this->session->unset_userdata('message');
        if ($message) {
            echo $message;
        }
        ?>
    </p>
    <div class="table-responsive col-sm-12">
        <div role="tabpanel">
            <!-- Nav tabs -->
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class="<?php
                if ($tab == '1') {
                    echo 'active';
                }
                ?>"><a href="#person" aria-controls="person" role="tab" data-toggle="tab">Person Information</a></li>
                <li role="presentation" class="<?php
                if ($tab == '2') {
                    echo 'active';
                }
                ?>"><a href="#course" aria-controls="course" role="tab" data-toggle="tab" disable>Select Course</a></li>

                <li role="presentation" class="<?php
                if ($tab == '3') {
                    echo 'active';
                }
                ?>"><a href="#payment" aria-controls="payment" role="tab" data-toggle="tab" disable>Payment Information</a></li>
            </ul>



            <div class="tab-content">
                <div role="tabpanel" class="tab-pane  col-sm-12 <?php
                if ($tab == '1') {
                    echo 'active';
                }
                ?>" id="person">
                     <?php
                     if ($tab == '1') {
                         echo $form_person;
                     } else {
                         echo '<br><br><p style="padding:10px;color:red; font-size:20px;"> Student is All ready Enroled<p>';
                         echo $form_person;
                     }
                     ?>
                </div>

                <div role="tabpanel" class="tab-pane col-sm-12 <?php
                if ($tab == '2') {
                    echo 'active';
                }
                ?>" id="course">
                     <?php
                     if ($tab == '2') {
                         echo $form_course;
                     } else {
                         echo '<br><br><p style="padding:10px;color:red; font-size:20px;"> Please First Submit Student Personal Information<p>';
                         echo $form_course;
                     }
                     ?>
                </div>

                <div role="tabpanel" class="tab-pane col-sm-12 <?php
                if ($tab == '3') {
                    echo 'active';
                }
                ?>" id="payment">
                    <?php
                    if ($tab == '3') {
                        echo $form_payment;
                    } else {
                        echo '<br><br><p style="padding:10px;color:red; font-size:20px;"> Please First Submit Student Personal Information<p>';
                        echo $form_payment;
                    }
                    ?>
                </div>
            </div>


        </div>
    </div>
</div>