<style>
</style>

<div class="container mt-3 mb-3 pt-3 pb-3 bg-white">
    <div class="row">
        <div class="col-sm-12">


            <div class="all-subjects-section">
                <h5 class="text-center">All Subjects</h5>
                <div class="table-responsive">
                    <table class="table table-bordered table-striped">
                        <thead> 
                            <tr>
                                <th>#</th>
                                <th>Subject</th>
                                <th>MM</th>
                                <th>Exam Type</th>
                                <th>Subject Type</th>
                                <th>Subject Order</th>
                                <th>Action</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td colspan="7">
                                    <?php 
                                    if($success){
                                    ?>
                                        <div class="alert alert-success" role="alert">
                                    <?php echo $success;?>
                                    </div>
                                    <?php    
                                    }
                                    if($error){
                                    ?>
                                        <div class="alert alert-danger" role="alert">
                                            <?php echo $error;?>
                                        </div>
                                    <?php
                                    }
                                    ?>
                                </td>
</tr>
<?php  
$eclass=$this->uri->segment('3');
$all_subjects=$this->ExamModel->get_active_subject_data($eclass);
$count=0;
if($all_subjects){
foreach($all_subjects as $subjects_data){
$count=$count + 1;
?>
<tr>
<td><?php echo $count; ?></td>
<td><?php echo $subjects_data['subject'];?></td>
<td><?php echo $subjects_data['MM'];?></td>
<td class="text-uppercase"><?php echo $subjects_data['exam_type'];?></td>
<td class="text-uppercase"><?php echo $subjects_data['subject_type'];?></td>
<td><?php echo $subjects_data['subject_order'];?></td>
<td>
<form method="post">

    
<div class="form-group">
<input type="hidden" name="subject_id" value="<?php echo $subjects_data['id'];?>">
<select class="form-control" name="subject_type">
<option value="main_subject">Main Stream Subject</option>
<option value="additional_subject">Additional Subject</option>
</select>
</div>

<div class="form-group">
<input type="submit" class="btn btn-sm btn-warning text-white" value="Update" name="update_subject_type">
</div>

</form>
</td>

</tr>
<?php
}
}
?>
</tbody>
</table>
</div>


</div>

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