
       <p align="center"><big><b>List of Employees</b></big></p>
                  <div class="table-responsive">
                    <form method="post" action="" >
                      <table class="table table-bordered table-hover table-condensed" id="myTable">
                        <!-- <h3><b>Ordinance</b></h3> -->
                        <thead>
                          <tr class="info">
                            <th><p align="center">Name</p></th>
                            <th><p align="center">Gender</p></th>
                            <th><p align="center">Employee Type</p></th>
                            <th><p align="center">Department</p></th>
                            <th><p align="center">Action</p></th>
                          </tr>
                        </thead>
                        <tbody>

<?php

	$conn = @mysqli_connect('192.168.2.117', 'webster', 'webster');

	if (!$conn)
	{
		echo "failed db conncetion";
		die("Database Connection Failed" . mysql_error());
	} else {
		echo "Connected!";
	}

	$select_db = mysqli_select_db($conn, 'realtimedata');
	if (!$select_db)
	{
		echo "failed db select";
		die("Database Selection Failed" . mysqli_error());
	} else {
		echo "Connected to the Database!";
	}

	

   $sql = "SELECT userid,att_in,att_out from attendanceformatted";
$result = mysqli_query($conn, $sql) or die(mysqli_error($conn));

if (mysqli_num_rows($result) > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        //name, gender, employee type, department, action
         echo "<tr>
         <td align='center'>"."<a href='view_employee.php?emp_id='".$row["userid"].">".$row["userid"]."</a>".
         "<td align='center'>"."<a href='view_employee.php?emp_id='".$row["att_in"].">".$row["att_in"]."</a>".
         "<td align='center'>"."<a href='view_employee.php?emp_id='".$row["att_out"].">".$row["att_out"]."</a>".

         "<td align='center'>"."<a class='btn btn-primary' href='view_account.php?emp_id='".$row["userid"].">"."Account"."</a>".
         "<a class='btn btn-danger' href='delete.php?emp_id='".$row["userid"].">"."Delete"."</a>".
         "</tr>";
    }
} else {
    echo "0 results";
}
	
?>

  <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Bootstrap, a sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.">
    <meta name="keywords" content="HTML, CSS, JS, JavaScript, framework, bootstrap, front-end, frontend, web development">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">

    <title></title>

        <link href="assets/must.png" rel="shortcut icon">
    <link href="assets/css/justified-nav.css" rel="stylesheet">


    <link href="assets/css/bootstrap.min.css" rel="stylesheet">
    <!-- <link href="data:text/css;charset=utf-8," data-href="assets/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet"> -->
    <!-- <link href="assets/css/docs.min.css" rel="stylesheet"> -->
    <link href="assets/css/search.css" rel="stylesheet">
    <!-- <link rel="stylesheet" href="assets/css/styles.css" /> -->
    <link rel="stylesheet" type="text/css" href="assets/css/dataTables.min.css">
