<div class="content-wrapper">
   <!-- Content Header (Page header) -->
   <div class="content-header">
      <div class="container-fluid">
         <div class="row mb-2">
            <div class="col-sm-6">
               <h4 class="m-0">Exams Management Module (Dashboard)</h4>
            </div>
            <!-- /.col -->
            <div class="col-sm-6">
               <ol class="breadcrumb float-sm-right">
                  <li class="breadcrumb-item">Dashboard</li>
                  <li class="breadcrumb-item active">Exams Management</li>
               </ol>
            </div>
            <!-- /.col -->
         </div>
         <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
   </div>
   <section class="content">
      <div class="container-fluid">
         <div class="row">
            <div class="col-md-3 col-sm-6 col-12">
               <div class="info-box">
                  <span class="info-box-icon bg-info"><i class="far fa-pen"></i></span>
                  <div class="info-box-content">
                     <button class="btn btn-info btn-info" data-toggle="modal" data-target="#classteachersmodal">Manage Class Teachers Teachers</button>
                  </div>
                  <!-- /.info-box-content -->
               </div>
               <!-- /.info-box -->
            </div>
            <div class="col-md-3 col-sm-6 col-12">
               <div class="info-box">
                  <span class="info-box-icon bg-secondary"><i class="far fa-layer-group"></i></span>
                  <div class="info-box-content">
                     <button class="btn btn-info btn-default" data-toggle="modal" data-target="#Examsmodal">Add Exam</button>
                  </div>
                  <!-- /.info-box-content -->
               </div>
               <!-- /.info-box -->
            </div>
            <div class="col-md-3 col-sm-6 col-12">
               <div class="info-box">
                  <span class="info-box-icon bg-warning"><i class="far fa-file-spreadsheet"></i>
                  </span>
                  <div class="info-box-content">
                     <button class="btn btn-warning"  data-toggle="modal"  data-target="#ExamEntry">Exam Scores</button>
                  </div>
                  <!-- /.info-box-content -->
               </div>
               <!-- /.info-box -->
            </div>
            <div class="col-md-3 col-sm-6 col-12">
               <div class="info-box">
                  <span class="info-box-icon bg-warning"><i class="fa fa-chart-line"></i>
                  </span>
                  <div class="info-box-content">
                     <a class="btn btn-info btn-danger" href="Exams.php?page=E_Results">Exam Results</a>
                  </div>
                  <info-box-content >
               </div>
            </div>
         </div>
      </div>
   </section>
   <section class="content">
      <div class="row">
         <div class="col-md-7">
            <form method="POST" action="" id="" enctype="multipart/form-data" novalidate onsubmit="return false;">
               <div class="row">
                  <div class="col-md-12">
                     <div class="card card-primary">
                        <div class="card-header">
                           <h3 class="card-title">Latest Exams</h3>
                           <div class="card-tools">
                              <button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
                              <i class="fas fa-minus"></i>
                              </button>
                           </div>
                        </div>
                        <div class="card-body">
                           <table class="table table-hover table-success" id="tableexams" style="font-size:11px">
                              <thead>
                                 <tr>
                                    <th>#</th>
                                    <th>Exam Title</th>
                                    <th>Exam Period</th>
                                    <th>Start Date</th>
                                    <th>End Date</th>
                                    <th>Action</th>
                                 </tr>
                              </thead>
                              <tbody>
                                 <?php
                                    $query=mysqli_query($con,"select * from Exam ORDER BY id DESC");
                                    $cnt=1;
                                    while($row=mysqli_fetch_array($query))
                                    {
                                      ?>  
                                 <tr class="">
                                    <td><?php echo $cnt; ?></td>
                                    <td><strong><?php echo $row["Title"]; ?></strong></td>
                                    <td><?php echo $row["Period"]; ?></td>
                                    <td><?php echo $row["StartDate"]; ?></td>
                                    <td><?php echo $row["EndDate"]; ?></td>
                                    <td>
                                       <input type="hidden" value="<?php echo $row["id"]; ?>" class="examidd" />
                                       <i class="fa fa-edit text-green btn exedit" title="Edit Exam Data" style="font-size:10px"></i> <i class="fa fa-trash btn text-danger exadelete" style="font-size:10px" id="exadelete" title="Click to remove exam">
                                       </i>
                                    </td>
                                 </tr>
                                 <?php 
                                    $cnt=$cnt+1;
                                    }
                                    ?>
                              </tbody>
                           </table>
                        </div>
                        <!-- /.card-body -->
                     </div>
                     <!-- /.card -->
                  </div>
               </div>
            </form>
         </div>
         <div class="col-md-5">
            <div class="card">
               <div class="card-header border-0">
                  <h3 class="card-title">
                     <i class="fas fa-graph mr-1"></i>
                     Pupils Distribution
                  </h3>
                  <!-- card tools -->
                  <div class="card-tools">
                     <button type="button" class="btn btn-primary btn-sm daterange" title="Date range">
                     <i class="far fa-calendar-alt"></i>
                     </button>
                     <button type="button" class="btn btn-primary btn-sm" data-card-widget="collapse" title="Collapse">
                     <i class="fas fa-minus"></i>
                     </button>
                  </div>
                  <!-- /.card-tools -->
               </div>
               <div class="card-body">
                  <div class="chart-container pie-chart">
                     <canvas id="pie_chart"></canvas>
                  </div>
               </div>
               <!-- /.card-body-->
            </div>
         </div>
      </div>
   </section>
</div>