								<div class="table-responsive col-12 s-right mb-75">
									<table class="table table-striped">
										<thead>
											<tr>
												<th>Pic</th>
												<th>Name</th>
												<th>F.Name</th>
												<th>Designation</th>
												<th>Department</th>
												<th>Mark Attendance</th>	
											</tr>
										</thead>
										<tbody>
<?php
include'../database.php';
$obj = new Database();
$getdate=$_POST['date'];
$date = date("j-n-Y", strtotime($getdate));
$cid=$_POST['cid'];

$obj->sql("SELECT * FROM employee WHERE NOT exists (select * from attendances where staffid = employee.id AND date='$date' AND cid='$cid') AND  cid='$cid'");
$result = $obj->getResult();
	foreach ($result as list("id"=>$id,"username"=>$username,"name"=>$name,"fname"=>$fname,"paddress"=>$paddress,"address"=>$address,"designation"=>$designation,"gender"=>$gender,"phone"=>$phone,"aphone"=>$aphone,"email"=>$email,"role"=>$role,"department"=>$department,"status"=>$status,"dob"=>$dob,"blood"=>$blood,"dp"=>$dp)) { 
?>

   						<tr>
						    				<form class="form" action="" method="POST">
											<td><div class="avatar mr-1 avatar-lg"><img src="assets/file/dp/<?php echo $dp; ?>" alt="avtar img holder"></div></td>
											<td><?php echo $name; ?></td>
											<td><?php echo $fname; ?></td>
											<td><?php
$obj->sql("SELECT id AS desi_id, name designation_name FROM designation WHERE id = '$designation'");
$result = $obj->getResult();
	foreach ($result as list("desi_id"=>$desi_id,"designation_name"=>$designation_name)) { echo  $designation_name; } ?></td>
											<td><?php
$obj->sql("SELECT id AS department_id, name AS department_name FROM department WHERE id = '$department'");
$result = $obj->getResult();
	foreach ($result as list("department_id"=>$department_id,"department_name"=>$department_name)) { echo  $department_name; } ?></td>
											<td>
                                                <button type="button" id="present" data-id="<?php echo $id; ?>" class="btn btn-sm btn-success mr-1 mb-1 Present">Present</button>
                                                <button type="button" id="absent"  data-id="<?php echo $id; ?>" class="btn btn-danger btn-sm mr-1 mb-1 Absent">Absent</button>
                                                <button type="button" id="onleave" data-id="<?php echo $id; ?>" class="btn btn-warning btn-sm mr-1 mb-1 On_Leave">On Leave</button>
                                                <button type="button" id="halfday" data-id="<?php echo $id; ?>" class="btn btn-info btn-sm mr-1 mb-1 Half_Day">Half Day</button>
                                                <button type="button" id="shortleave" data-id="<?php echo $id; ?>" class="btn btn-secondary btn-sm mr-1 mb-1 Short_Leave">Short Leave</button>
											</td>
											</form>	
											</tr>
<?php } ?>        

										</tbody>
									</table>
									
								</div>
