<?php
require("../../config/koneksi.php");
require("../../config/function.php");
require("../../config/crud.php");
$tanggal=date('Y-m-d');
?>
          
		  <div class="card-body">
		<?php $absen = mysqli_query($koneksi, "SELECT * FROM absensi WHERE nokartu<>'' AND tanggal='$tanggal' AND level='pegawai' ORDER BY id DESC limit 6");
		while ($ab = mysqli_fetch_array($absen)) {
			$guru = mysqli_fetch_array(mysqli_query($koneksi, "SELECT * FROM users WHERE id_user='$ab[idguru]'"));
				?>
				<div class="row">
				<div class="col-md-6">
				 <div class="card widget widget-info-inline">
				 
                                    <div class="card-header">
                                        <h5 class="card-title"><?= $guru['nama'] ?>
										<span class="badge badge-danger badge-style-light"></span></h5>
										 <span class="widget-stats-title" style="color:blue">Masuk <?= $ab['jam_masuk'] ?></span>
										 <div class="widget-info-container">
										  <div class="widget-info-image" style="background: url('../dist/img/guru.png')"></div>
								   </div>
								 </div>  
                            </div>
						</div>
				<div class="col-md-6">
				 <div class="card widget widget-info-inline">
                                    <div class="card-header">
                                        <h5 class="card-title"><?= $guru['nama'] ?>
										<span class="badge badge-danger badge-style-light"></span></h5>
										 <span class="widget-stats-title" style="color:red">Pulang <?= $ab['jam_pulang'] ?></span>
										 <div class="widget-info-container">
										  <div class="widget-info-image" style="background: url('../dist/img/speed.svg')"></div>
								   </div>
                            </div>
						</div>
						</div>
						</div>
		<?php } ?>
		</div>