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

            <div class="table-responsive">
                <table class="table table-bordered table-striped" id="">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Roll No.</th>
                            <th>Sch No</th>
                            <th>Name</th>
                            <th>Father's Name</th>
                            <th>Class - Section</th>
                            <th>House</th>
                            <th>Action</th>
                            <th>Attendance</th>
                            <th>Report Card</th>
                            <th>#</th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php
                        $class=$this->session->userdata('class_teacher'); $section=$this->session->userdata('class_teacher_section');
                        $count=0; 
                        $my_class_students=$this->ExamModel->my_class_students($class,$section);
                        if($my_class_students){
                            foreach($my_class_students as $class_students){
                                $count=$count + 1;
                    ?>
                        <tr>
                            <td><?php echo $count;?></td>
                            <td><?php echo $class_students['roll_no'];?></td>
                            <td><?php echo  $class_students['sch_no'];?></td>
                            <td><?php echo  $class_students['student_name'];?></td>
                            <td><?php echo  $class_students['father_name'];?></td>
                            <td><?php echo $class_students['class']; echo "-"; echo $class_students['section'];?></td>
                            <td><?php echo $class_students['house'];?></td>
                            <td><a href="<?php echo base_url();?>Exam/exam_log/<?php echo $class_students['id'];  ?>" class="btn btn-sm btn-success">View</a></td>
                            <td><a href="<?php echo base_url();?>Exam/mark_attendance/<?php echo $class_students['id']; ?>" class="btn btn-sm btn-warning text-white">Attendance</a></td>

                            <td>
    
                                <?php
                                if($class =='PG' || $class == 'LKG' || $class =='UKG'){
                                ?>
                                    <a href="http://exam.mtmhss.edu.in/result/puffins-report.php/<?php echo $class_students['id'];?>" class="btn btn-sm btn-success">View</a>
                                <?php
                                }else if($class ==1 || $class == 2){
                                ?>
                                    <a href="http://exam.mtmhss.edu.in/result/primary-class-report-card.php/<?php echo $class_students['id'];?>" class="btn btn-sm btn-success">View</a>
                                <?php
                                }else if($class ==3 || $class == 4 || $class == 5 ){
                                ?>

                                <a href="http://exam.mtmhss.edu.in/result/class_3_to_5_report_card.php/<?php echo $class_students['id'];?>" class="btn btn-sm btn-success">View</a>
                                <?php
                                }else if($class == 6 || $class == 7){
?>
<a href="http://exam.mtmhss.edu.in/result/class_6_report.php/<?php echo $class_students['id'];?>" class="btn btn-sm btn-success">View</a>
<?php
}else if($class == 8){
?>
<a href="http://exam.mtmhss.edu.in/result/class_8_report_card.php/<?php echo $class_students['id'];?>" class="btn btn-sm btn-success">View</a>    
<?php
}else if($class == 9){
?>
<a href="http://exam.mtmhss.edu.in/result/class9_report_card.php/<?php echo $class_students['id'];?>" class="btn btn-sm btn-success">View</a>    
<?php
}else{
echo "<span class='text-warning'>Coming Soon !</span>";
}
?>


</td>
<td>
<form method="post">
<div class="input-group mb-3">
<input type="hidden" value="<?php echo $class_students['id'];?>" name="sid">
<input type="number" name="roll_no" class="form-control" placeholder="Enter Roll No" aria-label="Enter Roll No" aria-describedby="basic-addon2">
<div class="input-group-append">
<input type="submit" class="btn btn-success btn-sm" name="update_roll_no" value="Update">
<!--<span class="input-group-text" id="basic-addon2">Update Roll No</span>-->
  </div>
</div>
</form><br>

<form method="post">
<div class="input-group mb-3">
<input type="hidden" value="<?php echo $class_students['id'];?>" name="sid">
<!--<input type="number" name="house" class="form-control" placeholder="Enter House No" aria-label="Enter Roll No" aria-describedby="basic-addon2">-->
<select class="form-control" name="house_info">
<option value="MARS">MARS</option>
<option value="JUPITER">JUPITER</option>
<option value="URANUS">URANUS</option>
<option value="SATURN">SATURN</option>
</select>
<div class="input-group-append">
<input type="submit" class="btn btn-success btn-sm" name="update_house" value="Update House">
<!--<span class="input-group-text" id="basic-addon2">Update Roll No</span>-->
  </div>
</div>
</form>

</td>

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

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