<?php
require("../../config/koneksi.php");
require("../../config/function.php");
require("../../config/crud.php");
$hari = date('D');
?>  
<?php
				$query = mysqli_query($koneksi, "SELECT * FROM jadwal_mapel WHERE hari='$hari'"); 
				$cek = mysqli_num_rows($query);
				if ($cek >= 1) {
				while ($data = mysqli_fetch_array($query)) :
				
				 $peg = fetch($koneksi,'users',['id_user'=>$data['guru']]);
				
				$no++;
                ?>

							   <div class="widget-payment-request-container">
                                            <div class="widget-payment-request-author">
                                                <div class="avatar m-r-sm">
												
												<?php if($peg['foto']==''){ ?>
                                                    <img src="../images/user.png" alt="">
												<?php }else{ ?>
													 <img src="../images/fotoguru/<?= $peg['foto'] ?>" alt="">
												<?php } ?>
												
                                                </div>
                                                <div class="widget-payment-request-author-info">
												
                                                    <span class="widget-payment-request-author-name"><?= strtoupper($peg['nama']) ?> <h5 class="kanan"><span class="badge badge-secondary">Kelas <?= $data['kelas'] ?></span></h5></span>
                                                   <h5><span class="badge badge-primary"><?= $data['mapel'] ?></span> <span class="badge badge-success"><?= $data['dari'] ?> - <?= $data['sampai'] ?></span> <span class="badge badge-danger"><?= $data['jjm'] ?> JJM</span></h5> 
													</span>
														
												</div>
											
                                            </div>
											
                                        <h5><span class="badge badge-secondary"><?= $data['waktu']; ?></span></h5>
												<?php endwhile; ?>
				                               <?php }else{ ?>
												 <button class="btn btn-light" type="button" disabled>
										<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
										Tidak ada aktifitas...
									</button>
												 <?php } ?>
												 
												 
												 
												 
						