<?php
include_once '../includes/processes.php';
$Process = new Login_Process;

$pageLink = basename($_SERVER['REQUEST_URI']);
$Process->check_status($pageLink);
if($_SESSION['dept_id']!=7) {
	
	header("location:../");
}
 require 'db_config/config.php';

?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>I.T Asset Listing</title>
		 	<link rel="icon" type="image/ico" href="img/airicon.ico"/>
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet"  href="customstyle.css">

    
  </head>
  <body>
    <header>
   <?php navigation("view_user"); ?>

    </header> 
    <div class="container padding-top-120">
    <div class="col-md-8 col-md-offset-1">
    <div class="panel panel-primary">
    <div class="panel-heading font-weight-bold initialism">Registerd Users</div>
      <div class="panel-body">
      <form>
      
         <div class="table-responsive">
         <table class="table table-bordered table-hover table-condensed">
         <thead>
         <tr class="info">
		    <th>S/N</th>
            <th>First Name</th>
            <th>Last Name</th>
            <th>Gender</th>
            <th>Email</th>
            <th>Username</th>
          
        </tr>
        </thead>
      <tbody>
	  <?php
$query="SELECT * FROM user_info";

$get=mysqli_query($connect,$query);
while ($display=mysqli_fetch_assoc($get)){
	 $id =$display['id'];
	echo "<tr><form action=delete.php method=POST>";
	//echo "<td>".$display['id']. "</td>";
	echo "<td><input type=text class='form-control' readonly name=id value='".$display['id']."'></td>";
	echo "<td>".$display['first_name']. "</td>";
	echo "<td>".$display['last_name']. "</td>";
	echo "<td>".$display['gender']. "</td>";
	echo "<td>".$display['email']. "</td>";
	echo "<td>".$display['username']. "</td>";
	//echo"<td><button class='btn btn-xs btn-success '><span class='glyphicon glyphicon-trash'></span><button></td>";
	echo "<td><input type=submit value=Delete class='btn btn-xs btn-danger' /></td>";

	
	echo "</form></tr>";

}

?>
	  </tbody>
    </table>
    </div>
      </form>
        
      </div>
    </div>
    </div>
    </div>


 
  
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    
    <script src="bootstrap/js/bootstrap.min.js"></script>
  </body>
</html>