<style>
 a .btn-warning{text-decoration:none;color:#fff;}    
</style>
<div class="container-fluid mt-3 mb-3 bg-white">
    <div class="row">
        <div class="col-sm-12">
        <?php
        $my_class=$this->session->userdata('class_teacher');
        $class_teacher_section=$this->session->userdata('class_teacher_section');
        ?>    
        <ul class="breadcrumb">
            <li class="breadcrumb-item"><a href="#">Home</a></li>
            <li class="breadcrumb-item"><a href="#"><?php echo $this->session->userdata('teacher_name');?></a></li>
            <li class="breadcrumb-item"><a href="#"><?php echo $my_class; ?></a></li>
            <li class="breadcrumb-item"><a href="#"><?php echo $class_teacher_section; ?></a></li>
        </ul>    
    

        <div class="table-responsive">
            <table class="table table-bordered table-striped" id="mytable">
                <thead>
                    <tr>
                        <th>Count</th>
                        <th>Sch. No.</th>
                        <th>Name</th>
                        <th>Fathers Name</th>
                        <th>D.O.B.</th>
                        <th>Contact No.</th>
                        <th>Alt. No.</th>
                        <th>View</th>
                        <th>Update</th>
                        <th>Exam</th>
                    </tr>    
                </thead>    
                <tbody>

                    <?php
                    $acedemic_session=$this->session->userdata('acedemic_session');
                    $student_table='student';
                    $get_data=$this->WelcomeModel->class_section_students($my_class,$class_teacher_section,$acedemic_session);
                    // $get_data=$this->WelcomeModel->get_data_in_alp_order($student_table);
                    $count=0;
                    if($get_data){
                        foreach($get_data as $students){
                            $sid=$students['id'];
                            // $get_student_courses_data=$this->WelcomeModel->get_student_in_acedemic_session($sid,$acedemic_session);
                            // if($get_student_courses_data){
                            //     foreach($get_student_courses_data as $student_courses_data){
                            //         if($students['status'] ==1 && $student_courses_data['class'] == $my_class){
                                    $count=$count + 1
                    ?>
                    <tr>
                        <td><?php echo $count; ?></td>
                        <td><?php echo $students['sch_no']; ?></td>
                        <td><?php echo $students['student_name']; ?></td>
                        <td><?php echo $students['father_name']; ?></td>
                        <td><?php echo date('d-m-Y',strtotime($students['dob'])); ?></td>
                        <td><?php echo $students['contact_no']; ?></td>
                        <td><?php echo $students['alternate_no']; ?></td>
                        <td><a href="<?php echo base_url(); ?>School/student_profile/<?php echo $students['id'];?>"><button class="btn btn-sm btn-warning">View</button></a></td>
                        <td>
                            <form style="text-align: right;" id="myForm" action="<?php echo base_url();?>student/add_new_student/<?php echo $students['id'];?>" method="post">
                                <button class="btn btn-sm btn-danger edit" name="edit" value="<?php echo $students['id']; ?>" type="submit">Edit</button>
                            </form>
                        </td>
                        <td><a href="<?php echo base_url();?>Examination/exam_log/<?php echo $sid;?>" class="btn btn-sm btn-warning text-white">Exam</a></td>
                    </tr>
                    <?php
                            //         }
                            //     }
                            // }
                    
                        }
                    }
                    ?>
                </tbody>
            </table>    
    
    
    
            </div>
    
        </div>    
    </div>
</div>  