<?php
$exam_id=$this->uri->segment('3');
$exam_table='all_exams';
$get_exam_info=$this->NewExamModel->get_item_data($exam_id,$exam_table);
if($get_exam_info){
    foreach($get_exam_info as $exam_info){
        $acedemic_session=$exam_info['acedemic_session'];
        $acedemic_session_table='academic_session_details';
        $acedemic_session_info=$this->NewExamModel->get_item_data($acedemic_session,$acedemic_session_table);
?>

<div class="container mt-3 mb-3 bg-white pt-3 pb-3">
    <div class="row">
        <div class="col-sm-12">
            <ul class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo base_url();?>Welcome">Home</a></li>
                <li class="breadcrumb-item"><a href="<?php echo base_url();?>Examination">Exam</a></li>
                <li class="breadcrumb-item"><a href="<?php echo base_url();?>Examination/exam_shift/<?php echo $exam_id;?>">Exam Shift</a></li>
                <li class="breadcrumb-item">Add Exam Shift</li>
            </ul>
            
            <div class="">
                
                <form method="post" action="#">
                    <div class="form-group">
                        <input type="hidden" name="exam_id" value="<?php echo $exam_id; ?>">
                        <input type="hidden" name="acedemic_session" value="<?php echo $acedemic_session; ?>">
                        <label>Exam Title</label>
                        <input type="text" name="exam_title" value="<?php echo $exam_info['exam_title'];?>" class="form-control" readonly>
                    </div>
                    
                    <div class="form-group">
                        <label>Exam Type</label>
                        <input type="text" name="exam_type" value="<?php echo $exam_info['exam_type'];?>" class="form-control" readonly>
                    </div>
                    
                    <div class="form-group">
                        <label>Acedemic Session</label>
                        <?php 
                        if($acedemic_session_info){
                            foreach($acedemic_session_info as $ac_session_info){
                        ?>
                        <input type="text" name="acedemic_session_info" value="<?php echo $ac_session_info['year_long'];?>" class="form-control" readonly>
                        <?php
                            }
                        }
                        ?>
                    </div>
                    <div class="form-group">
                        <label>Exam Start Time</label>
                        <input type="time" name="exam_start_time" class="form-control" required>
                    </div>
                    <div class="form-group">
                        <label>Exam End Time</label>
                        <input type="time" name="exam_end_time" class="form-control" required>
                    </div>
                    
                    <div class="form-group">
                        <button type="submit" name="add_exam_shift" class="btn btn-sm btn-info">Add Exam Shift</button>
                    </div>
                    
                </form>
                
            </div>
            
        </div>
    </div>
</div>
<?php
    }
}
?>