<div class="container-fluid mt-3 mb-3 bg-white">
    <div class="row">
        <div class="col-sm-12 pt-3 pb-3">
            <ul class="breadcrumb">
                <li class="breadcrumb-item">Home</li>
                <li class="breadcrumb-item">Exams</li>
                <li class="breadcrumb-item">All Exams</li>
            </ul>
        </div>
        <div class="col-sm-12">
            <a href="<?php echo base_url();?>Examination/add_new_exam" class="btn btn-sm btn-info mt-3 mb-3">Add New Exam</a>
            <a href="<?php echo base_url();?>Examination/dashboard" class="btn btn-sm btn-info mt-3 mb-3">All Courses</a>
        </div>
        <div class="col-sm-12">
            <div class="table-responsive">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Acedemic Session</th>
                            <th>Exam Title</th>
                            <th>Exam Type</th>
                            <th>Exam Shedule</th>
                            <th>View</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $exam_table='all_exams';
                        $all_exams=$this->NewExamModel->get_data($exam_table);
                        $count=0;
                        if($all_exams){
                            foreach($all_exams as $exams){
                                $count=$count + 1;
                                $acedemic_session=$exams['acedemic_session'];
                                $acedemic_session_table='academic_session_details';
                                
                                $year_long='';
                                
                                
                                
                                $get_acedemic_session_info=$this->NewExamModel->get_item_data($acedemic_session,$acedemic_session_table);
                                if($get_acedemic_session_info){
                                    foreach($get_acedemic_session_info as $acedemic_session_info){
                                        $year_long=$acedemic_session_info['year_long'];
                                    }
                                }
                        ?>
                        <tr>
                            <td><?php echo $count;?></td>
                            <td><?php echo $year_long;?></td>
                            <td><?php echo $exams['exam_title'];?></td>
                            <td><?php echo $exams['exam_type'];?></td>
                            <td><a href="<?php echo base_url()?>Examination/schedule/<?php echo $exams['id'];?>" class="btn btn-sm btn-info">View</a></td>
                            <td><a href="<?php echo base_url();?>Examination/exam_shift/<?php echo $exams['id']; ?>" class="btn btn-sm btn-info">Exam Shift</a></td>
                        </tr>
                        <?php
                            }
                        }
                        ?>
                    </tbody>
                </table>
            </div>
            
            
        </div>
    </div>
</div>