 
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <br>
    <section class="content-header" >
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <a><strong>Student information</strong></a>
          </div> 
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="admin.php?page=dashboad">Home</a></li> 
              <li class="breadcrumb-item active">Students information</li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section> 
   <!-- Main content -->
    <section class="content">
      <div class="container-fluid">
        <div class="row"> 
          <!-- /.col -->
          <div class="col-md-12">
            <div class="card">
              <div class="card-header p-2">
                <ul class="nav nav-pills ">
                  <li class="nav-item"><a class="nav-link active" href="#teacher" data-toggle="tab"><i class="fas fa-th-list"></i> Student List</a></li>  
                </ul>
              </div>
              <!-- /.card-header --> 
              <div class="card-body"> 
              <div class="tab-content">
              <!-- /.tab-pane -->
              <div class="active tab-pane" id="teacher">
              <div class="container-fluid">
                <div class="row">
                  <div class="col-sm-12"> 
                  <div class="row"> 
                        <!-- ./col -->
                         <?php   
                            $T_id=$q['teacher_roll_no'];  
                            $selected_teacher = mysqli_query($conn," SELECT * FROM teacher_course ,class_srms WHERE class_srms.class_id=teacher_course.class_id AND teacher_course.teacher_roll_no='$T_id' ");
                              while($row = mysqli_fetch_array($selected_teacher)){ 
                              $cl_id=$row['class_id']; 
                            ?>  
                            <div class="col-lg-3 col-6">
                              <!-- small card -->
                              <div class="small-box bg-info">
                                <div class="inner"> 
                                  <h3><?php
                                  $count = mysqli_query($conn,"SELECT count(student_roll_no) as no_3 FROM student_srms where class_id='$cl_id'");
                                    $no_2 = mysqli_fetch_array($count);
                                   echo $no_2['no_3']; ?></h3> 
                                  <p>A STUDENT OF <?php echo $row['class_name']; ?></p>
                                </div>
                                <div class="icon">
                                  <i class="fas fa-edit"></i>
                                </div> 
                                <a href="admin.php?page=student_list&Id_2=<?php echo $row['class_id']; ?>" class="small-box-footer">
                                  More info <i class="fas fa-arrow-circle-right"></i>
                                </a> 
                              </div>
                            </div> 
                          <?php }?>
                      </div>
                      <br> 
                    <div class="card">  
                      <div class="card-header">
                      <h3 class="card-title">Student List</h3> 
                    </div>
                  <div class="card-body">
                <div class="table-responsive">
                    <table id="example1" class="table table-striped display table-bordered" >
                      <thead>
                        <tr>
                            <th>#</th> 
                            <th>Reg No</th>
                            <th>Student Name</th>
                            <th>Class Name</th>  
                            <th>Gender</th>  
                        </tr>
                        </thead>
                        <tbody>
                          <?php 
                           $id=$_GET['Id_2'];
                            $i = 1;
                            $selected = mysqli_query($conn,"SELECT *  FROm  student_srms,class_srms WHERE student_srms.class_id=class_srms.class_id AND student_srms.class_id='$id'");
                             while($row = mysqli_fetch_array($selected)){ 
                              $MD5=$row['student_roll_no'];
                        
                            ?> 
                        <tr>
                          <td class="text-center"><?php echo $i++ ?></td> 
                          <td><?php echo $MD5; ?></td>
                          <td><?php echo $row['student_name']; ?></td>
                          <td><?php echo $row['class_name']; ?></td>  
                          <td><?php echo $row['student_gender']; ?></td>  
                      </tr> 
                      <?php }?> 
                        </tbody>
                        <tfoot>
                        <tr>
                            <th>#</th> 
                            <th>Reg No</th>
                            <th>Student Name</th>
                            <th>Class Name</th>  
                            <th>Gender</th>  
                        </tr>
                      </tfoot>
                    </table> 
                 </div>
               </div>
              </div> <!-- end card body-->
            </div> <!-- end card --> 
            </div>
            <!-- /.card -->
          </div>
          </div> 
             
             </div>
                <!-- /.tab-content -->
             </div><!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div><!-- /.container-fluid -->
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
 <script src="../stp_con/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../stp_con/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables  & Plugins -->
<script src="../stp_con/datatables/jquery.dataTables.min.js"></script>
<script src="../stp_con/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="../stp_con/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="../stp_con/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="../stp_con/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="../stp_con/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="../stp_con/jszip/jszip.min.js"></script> 
<script src="../stp_con/pdfmake/pdfmake.min.js"></script>
<script src="../stp_con/pdfmake/vfs_fonts.js"></script> 
<script src="../stp_con/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="../stp_con/datatables-buttons/js/buttons.print.min.js"></script>
<script src="../stp_con/datatables-buttons/js/buttons.colVis.min.js"></script>
 
<script src="../assets/js/adminlte.min.js"></script> 
 <script>
  $(function () {
    $("#example1").DataTable({
      "responsive": true, "lengthChange": false, "autoWidth": false,
      "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
    }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)'); 
  });
  $(function () {
    $("#example2").DataTable({
      "responsive": true, "lengthChange": false, "autoWidth": false,
      "buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
    }).buttons().container().appendTo('#example2_wrapper .col-md-6:eq(0)'); 
  });
</script>