<?php include("inc/server_config.php"); ?>
           <?php include("inc/mainheader.php"); ?>
           <?php include("inc/connection.php"); ?>

            <!-- sidebar menu -->
            <?php include("inc/sidebar.php") ?>

            <!-- /menu footer buttons -->
            <div class="sidebar-footer hidden-small">
              <a data-toggle="tooltip" data-placement="top" title="Settings">
                <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
              </a>
              <a data-toggle="tooltip" data-placement="top" title="FullScreen">
                <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
              </a>
              <a data-toggle="tooltip" data-placement="top" title="Lock">
                <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
              </a>
              <a data-toggle="tooltip" data-placement="top" title="Logout" href="login.html">
                <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
              </a>
            </div>
            <!-- /menu footer buttons -->
          </div>
        </div>

        <!-- top navigation -->
        <div class="top_nav">
            <div class="nav_menu">
                <div class="nav toggle">
                  <a id="menu_toggle"><i class="fa fa-bars"></i></a>
                </div>
                <nav class="nav navbar-nav">
                <ul class=" navbar-right">
                  <li class="nav-item dropdown open" style="padding-left: 15px;">
                    <a href="javascript:;" class="user-profile dropdown-toggle" aria-haspopup="true" id="navbarDropdown" data-toggle="dropdown" aria-expanded="false">
                      <img src="images/img.jpg" alt="">John Doe
                    </a>
                    <div class="dropdown-menu dropdown-usermenu pull-right" aria-labelledby="navbarDropdown">
                      <a class="dropdown-item"  href="javascript:;"> Profile</a>
                        <a class="dropdown-item"  href="javascript:;">
                          <span class="badge bg-red pull-right">50%</span>
                          <span>Settings</span>
                        </a>
                    <a class="dropdown-item"  href="javascript:;">Help</a>
                      <a class="dropdown-item"  href="login.html"><i class="fa fa-sign-out pull-right"></i> Log Out</a>
                    </div>
                  </li>
  
                  
                </ul>
              </nav>
            </div>
          </div>
        <!-- /top navigation -->

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">

            <div class="clearfix"></div>

            <div class="row">
              <div class="col-md-12 col-sm-12 ">
                <div class="x_panel">
                  
                  <div class="x_content">
                      <div class="row">
                          <div class="col-sm-12">
                            <div class="card-box table-responsive">
                    <table id="datatable" class="table table-striped table-bordered" style="width:100%">
                    
                      <thead>
                        <tr>
                        <th>S/N</th>
                          <th>First Name</th>
                          <th>Last Name</th>
                          <th>Middle Name</th>
                          <th>Email</th>
                          <th>Phone</th>
                          <th>Rank</th>
                          <th>Department</th>
                          <th>Qualification1</th>
                          <th>Qualification2</th>
                          <th>Qualification3</th>
                          <th>Qualification4</th>
                          <th>Course Assigned</th>
                          <th>File</th>
                          <th>File</th>
                          <th>File</th>
                          <th>File</th>
                        </tr>
                      </thead>


                      <tbody>
                      <?php
                        $core_staff = mysqli_query($con, "SELECT * FROM administrativestaff ");

                        //fetch all cars
                        if(mysqli_fetch_array($core_staff)){

                            //use foreach to echo the datas
                            foreach($core_staff as $staff){
                           
                    ?>
                        <tr>
                        <td><?php echo $staff['administrativestaff_id']; ?></td>
                          <td><?php echo $staff['fname']; ?></td>
                          <td><?php echo $staff['lname']; ?></td>
                          <td><?php echo $staff['middlename']; ?></td>
                          <td><?php echo $staff['email']; ?></td>
                          <td><?php echo $staff['phone']; ?></td>
                          <td><?php echo $staff['rank']; ?></td>
                          <td><?php echo $staff['department']; ?></td>
                          <td><?php echo $staff['qualification1']; ?></td>
                          <td><?php echo $staff['qualification2']; ?></td>
                          <td><?php echo $staff['qualification3']; ?></td>
                          <td><?php echo $staff['qualification4']; ?></td>
                          <td><?php echo $staff['course_assigned']; ?></td>
                          <td><?php echo  $staff['images1']; ?></td>
                          <td><?php echo  $staff['images2']; ?></td>
                          <td><?php echo  $staff['images3']; ?></td>
                          <td><?php echo  $staff['images4']; ?></td>
                        </tr>
                        <?php
                    
                        }
                    }
                    ?>
                      </tbody>
                     
                    </table>
                  </div>
                  </div>
              </div>
            </div>
                </div>
              </div>
              </div>
            </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- /page content -->

        <!-- footer content -->
        <?php include("inc/footer.php"); ?>