<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 Results</h4>
            </div>
            <!-- /.col -->
            <div class="col-sm-6">
               <ol class="breadcrumb float-sm-right">
                  <li class="breadcrumb-item">Dashboard</li>
                  <li class="breadcrumb-item">Exams Management</li>
                  <li class="breadcrumb-item active">Exams Results</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-content">
                  <a class="btn btn-info btn-success" href="Exams.php?page=Home"> <i class="fa fa-arrow-left"></i> Exams Management
                  </a>
               </div>
               <!-- /.info-box-content -->
               <!-- /.info-box -->
            </div>
         </div>
      </div>
   </section>
   <section class="content">
      <div class="row">
         <div class="col-md-12">
            <div class="card ">
               <div class="card-header">
                  <h3 class="card-title">Filter Results Per Class</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 class="card-body">
                     <div class="table-responsive" id='divstaffss'>
                        <form method="POST" action="" id="" enctype="multipart/form-data" novalidate onsubmit="return false">
                           <table class="table" style="font-size:12px">
                              <tbody>
                                 <tr>
                                    <td style="width:500px">
                                       <div class="form-group">
                                          <label for="inputStatus">Select Exam <span class="requireds">*</span></label>
                                          <select id="examu" class="form-control custom-select" required>
                                             <option selected value="">---</option>
                                             <?php                  
                                                $query=mysqli_query($con,"select * FROM Exam ORDER BY id DESC");
                                                while($row=mysqli_fetch_array($query))
                                                {
                                                ?>
                                             <option value="<?php echo $row['id']; ?>"> <?php echo $row['Title'].' '.'('.$row['Month'].' '.$row['Year'].')';  ?></option>
                                             <?php
                                                }
                                                ?>
                                          </select>
                                       </div>
                                    </td>
                                    <td>
                                       <div class="form-group">
                                          <label for="inputStatus">Grade <span class="requireds">*</span></label>
                                          <select id="klas" class="form-control custom-select" required>
                                             <option selected disabled value="">Select ---</option>
                                             <option value="GRADE 1">GRADE 1</option>
                                             <option value="GRADE 2">GRADE 2</option>
                                             <option value="GRADE 3">GRADE 3</option>
                                             <option value="GRADE 4">GRADE 4</option>
                                             <option value="GRADE 5">GRADE 5</option>
                                             <option value="GRADE 6">GRADE 6</option>
                                             <option value="GRADE 7">GRADE 7</option>
                                             <option value="GRADE 8">GRADE 8</option>
                                             <option value="GRADE 9">GRADE 9</option>
                                          
                                          </select>
                                       </div>
                                    </td>
                                    <td>
                                       <div class="form-group">
                                          <label for="inputStatus">.</label>
                                          <button class="btn btn-success btn-sm form-control" id="filterclass"> <i class="fa fa-funnel"></i> Filter
                                          </button>
                                       </div>
                                    </td>
                                 </tr>
                              </tbody>
                           </table>
                        </form>
                     </div>
                     <div class="row">
                        <div class="col-md-10">
                           <div class="divexamresult table-responsive">
                              <?php
                                 $ex=$_SESSION['exa'];
                                 $kla=$_SESSION['kla']; 
                                 
                                 $query=mysqli_query($con,"select * from Exam where id='$ex'");
                                 while($row=mysqli_fetch_array($query))
                                 {
                                 $ename=$row["Title"];
                                 $sd=$row["StartDate"];
                                 $ed=$row["EndDate"];
                                 }
                                 ?> 
                              <input type="hidden" value="<?php echo $ename.' '.$kla ?>" id="txtexamname" />
                              <label>Results for: <strong>Exam -> <span class="badge bg-primary"><?php echo $ename; ?></span>| Class -> <?php  echo $kla; ?> | <span class="badge bg-warning"><?php echo $sd.' - '.$ed; ?></span></strong></label>
                              <?php
                                 if($kla=='GRADE 1' || $kla=='GRADE 2' || $kla=='GRADE 3')
                                  {
                                    include("GR13.php");   
                                  }else if($kla=='GRADE 4' || $kla=='GRADE 5' || $kla=='GRADE 6')
                                  {
                                    include("GR46.php");
                                  }else if($kla=='GRADE 7' || $kla=='GRADE 8' || $kla=='GRADE 9')
                                  {
                                     include("GR79.php"); 
                                  }
                                  else
                                  {
                                   echo 'No results to display';
                                  }
                                  ?>
                           </div>
                        </div>
                        <div class="col-md-2">
                           <h5><u>ASSESSMENT RUBRIC</u></h5>

                            <table class="table" style="font-size:11px;">
                            <thead>
                            <tr>
                             <th>Level </th>
                             <th>Raw Marks</th>
                             <th>Points </th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                             <td colspan="1"> EE 1 </td>
                             <td><strong> 90 - 99 </strong></td>
                             <td><strong> 4.0 </strong></td>
                            </tr>
                            
                            <tr>
                             <td style="border-bottom:1px solid #000" colspan="1"> EE 2 </td>
                             <td style="border-bottom:1px solid #000"><strong> 80 - 89 </strong></td>
                             <td style="border-bottom:1px solid #000"><strong>3.5 </strong></td>
                            </tr>
                            
                            <tr>
                              <td> ME 1  </td>
                             <td><strong> 65 - 79 </strong></td>
                             <td><strong>3.0 </strong></td>
                            </tr>
                            
                            <tr>
                             <td style="border-bottom:1px solid #000"> ME 2 </td>
                             <td style="border-bottom:1px solid #000"><strong> 50 - 64 </strong></td>
                             <td style="border-bottom:1px solid #000"><strong>2.5</strong></td>
                            </tr>
                            
                            <tr>
                             <td> AE 1 </td>
                             <td><strong> 40 - 49 </strong></td>
                             <td><strong>2.0</strong></td>
                            </tr>
                            
                            <tr>
                             <td style="border-bottom:1px solid #000"> AE 2 </td>
                             <td style="border-bottom:1px solid #000"><strong> 30 - 39 </strong></td>
                             <td style="border-bottom:1px solid #000"><strong>1.5</strong></td>
                            </tr>
                            
                            <tr>
                             <td> BE 1 </td>
                             <td><strong> 20 - 29 </strong></td>
                             <td><strong>1.0</strong></td>
                            </tr>
                            
                            <tr>
                             <td> BE 2 </td>
                             <td><strong> 0 - 20 </strong></td>
                             <td><strong>0.5</strong></td>
                            </tr>
                            </tbody>
                            </table>

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