<?php
require("../../config/koneksi.php");
require("../../config/function.php");
require("../../config/crud.php");

?>
			<?php
				$query = mysqli_query($koneksi, "SELECT * FROM nilai  ORDER BY id_nilai DESC LIMIT 10"); 
				
				while ($andro = mysqli_fetch_array($query)) :
				$siswa = fetch($koneksi,'siswa',['id_siswa'=>$andro['id_siswa']]);
				 $bank = fetch($koneksi,'banksoal',['id_bank'=>$andro['id_bank']]);
				$tanggal_ujian = date('Y-m-d',strtotime($andro['ujian_mulai']));
                ?>
				<?php if($tanggal_ujian==$tanggal): ?>
				<?php if($andro['browser']==1){ ?>
				
				<ul class="widget-list-content list-unstyled">
                           <li class="widget-list-item widget-list-item-green">
                   <span class="widget-list-item-icon"><i class="material-icons-outlined">school</i></span>
                     <span class="widget-list-item-description">
                  <a href="#" class="widget-list-item-description-title">
                    <?= $siswa['nama'] ?>
                      </a>
                  <span class="widget-list-item-description-subtitle">
                    <button class="btn btn-dark" type="button" disabled><?= $bank['nama']?> Selesai</button>
				<button class="btn btn-secondary" type="button" disabled> SKOR <?= round($andro['total']); ?></button>
                      </span>
                             </span>
                                 </li>
                                     </ul>
				<?php }else{ ?>
				
				<ul class="widget-list-content list-unstyled">
                           <li class="widget-list-item widget-list-item-green">
                   <span class="widget-list-item-icon"><i class="material-icons-outlined">school</i></span>
                     <span class="widget-list-item-description">
                  <a href="#" class="widget-list-item-description-title">
                    <?= $siswa['nama'] ?>
                      </a>
                  <span class="widget-list-item-description-subtitle">
                     </button>
<button class="btn btn-success" type="button" disabled>
    <span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
    Mengerjakan...
</button>
                      </span>
                             </span>
                                 </li>
                                     </ul>
				<?php } ?>
				
				<?php endif; ?>
				<?php endwhile; ?>
							