<?php
include "../include/config.php";
session_start();
$userlogin=$_SESSION['fullname'];
$school=$_SESSION['school'];
if (isset($_SESSION['email'])){?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Students</title>
      <link rel="preconnect" href="https://fonts.googleapis.com">
    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title></title>
      <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300&family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
   <link rel="icon" href="favicon.png" type="image/png">
    <meta name="theme-color" content="">
      <script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>
      <script src='https://kit.fontawesome.com/a076d05399.js' crossorigin='anonymous'></script>
      <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
</head>
<style>
    body{
        padding: 0px;
        margin:0px;
        
  font-size:16px;
  width:100%;
  background:white;
    }
    .iterm{
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
        margin-top:10px;
        margin-top: 230px;
        color: white;
        overflow: scroll;
        height:100%;
    }
    .iterm_box{
        width:40%;
        height :25%;
        box-shadow:rgba(99, 99, 99, 0.4) 0px 2px 8px 0px;
        padding: 5px;
        text-align: center;
        border-radius: 5px;
        margin: 5px;
        background: white;
        padding: 10px;
    }
    nav{
        line-height: 65px;
        background: #556DCF;
        position :fixed;
        width:100%;
        margin: auto ;
    }
    


    label{
        color: whit;
        font-size: 30px;
        margin-left: 10px;
    }
    .header{
        background:#556DCF url(images/1.png);
        background-size:cover;
        background-blend-mode: darken;
        height: 220px;
        margin-top: 10px;
        border-radius: 0px 0px 30px 30px;
        
        color: white;
        padding: px;
        text-align: center ;
    
      
        
    }

    .header{
      position: fixed;
      width:100%;
    }
    part{
      margin-top: -50px;
      position: absolute;
      background: white;
      width:93%;
      height:210px;
      top: 60px;
      left: 50%;
      transform: translate(-50%);
      color: gray;
      display: block;
      border-radius: 6px;
    }
.header img{
  width:80px;
  height: 80px;
  border-radius: 50%;
  border: 5px solid white;
  
}
    
    .iterm_box img{
      
    }
    nav i{
      float :;
      color: white;
    }
    .iterm i{
      font-size: 30px;
      background: #556DCF;
      padding: 9px;
      border-radius: 5px;
    }
    .iterm_box p{
      font-size: 13px;
      margin-top: 5px;
      color: #3F4044;
      margin-bottom: 10px;
    }
    .btn{
      background: #556DCF;
      border:none;
      border-radius:2px;
      padding: 15px;
      margin: 10px;
      color: white;
    }
    .dash{
      color: white;
      font-weight: 900px;
      text-align : center ;
    }
    .bn{
      padding: 10px;
      text-align: ;
    }
    .table{
      background: white;
      border:1px solid #556DCF;
      border-radius :5px;
      height: 65vh;
      box-shadow: 2px;
    }
    .table i{
      font-size: 20px;
    }
    
    {
      font-size: 2px;
    }
</style>
<body>
<?php include "../include/nav.php";?>
<div class="bn" style="padding:15px">
<table id="myTable" class="table table-striped table-bordered table-responsive table-hover">
  <h4><i class="fa fa-users"></i> Students List</h4>
  <thead>
    <tr>
      <th>StudentID</th>
      <th>Name</th>
      <th>Intake</th>
      <th>Action</th>
    </tr>
  </thead>
  <tbody>
  <?php
  $query=mysqli_query($conn,"SELECT *FROM students" );
   while($row=mysqli_fetch_array($query)){?>
    <tr>
      <td> <?php echo $row['studentid'];?> </td>
      <td><?php echo $row['student_name'];?></td>
      <td><?php echo $row['intake'];?></td>
      <td><a href="#" class="btn" style="padding: 8px"><i class="fa fa-edit"></i></a></td>
    </tr>
    <?php
    }
    ?>
  </tbody>
</table>
</div>
 
<script>
  
</script>
</body>
</html>



<!-- sycn -->
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLongTitle">Synchronize</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">

        <button type="button" class="btn btn-primary">       <i class="fa fa-database"></i> Synchronize</button>
      </div>
    </div>
  </div>
</div>



<!-- filter class -->

<div class="modal fade" id="exampleModalCenter2" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">

  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLongTitle">Filter Students</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">

        <button type="button" class="btn btn-primary">       <i class="fa fa-search"></i> Filter Students</button>
      </div>
    </div>
  </div>
</div>
<?php
}else {
  header("location:../index.php");
}
?>