<!DOCTYPE html>
<html lang="en">
<head>
    <title>SIMPEL</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
  
</head>
<body><div style="text-align:center;">
<nav class="navbar navbar-expand-md bg-dark navbar-dark"> 
    <!-- Brand -->
    <a class="navbar-brand" href="datalog.php">
        <img src="gambar/logosi.png" alt="logo" style="width:30px;margin-left:30px;">
    </a>

    <!-- Toggler/collapsibe Button -->
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
        <span class="navbar-toggler-icon"></span>
    </button>
     
<!-- Navbar links -->
    <div class="collapse navbar-collapse" id="collapsibleNavbar">
        <ul class="navbar-nav">
            <div class="dropdown">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" style="margin:5px;background-color:#212529;color:rgba(255,255,255,.5);border:none;">Records</button> 
            <ul class="dropdown-menu">
              <li><a class="dropdown-item" href="datapinjam.php">Booking Records</a></li>
              <li><a class="dropdown-item" href="index.php">Attendance Records</a></li>
            </ul>
          </div>
            <!--<li class="nav-item">
                <a class="nav-link" href="tambahdata.php">Peminjaman Lab</a>
            </li>-->
            <div class="dropdown">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" style="margin:5px;background-color:#212529;color:rgba(255,255,255,.5);border:none;">Booking</button> 
            <ul class="dropdown-menu">                                           
              <li><a class="dropdown-item" href="tambahdata.php">Booking Form</a></li>
              <li><a class="dropdown-item" href="tambahdatalogbook.php">Attendance Form</a></li>
            </ul>
          </div>
            <!--<li class="nav-item" style="margin:5px;background-color:#212529;color:rgba(255,255,255,.5);border:none;">
                <a class="nav-link" href="#">Akun</a>
            </li>-->
            <!--<li class="nav-item" style="margin:5px;background-color:#212529;color:rgba(255,255,255,.5);border:none;">
                <a class="nav-link" href="#">Informasi</a>
            </li>-->
            <div class="dropdown">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" style="margin:5px;background-color:#212529;color:rgba(255,255,255,.5);border:none;">Reports</button> 
            <ul class="dropdown-menu">
              <li><a class="dropdown-item" href="laporanpinjam.php">Booking Reports</a></li>
              <li><a class="dropdown-item" href="laporanLog.php">Attendance Reports</a></li>
            </ul>
          </div>
        </ul>
    </div>
       
</nav></div>
<div class="jumbotron text-center">
    <h1>SIMPEL (Sistem InforMasi PEminjaman Laboratorium)</h1>
    <p><b>DEPARTEMENT OF INFORMATION SYSTEMS - FACULTY OF COMPUTER SCIENCES <br/>
    UNIVERSITAS PEMBANGUNAN NASIONAL "VETERAN" JAWA TIMUR</b></p>
</div> 
<div class="container">
    <!--<div class="row">
        <div class="col-sm-14">
            <div class="thumbnail">
                <div class="caption"> -->
      <center><h3>Laboratory Attendance Reports</h3></center>
      <div class="table-responsive">
      <!--<table class="table">-->
      <!--<table class="table table-bordered table-striped table-hover">-->
      <table class="table table-bordered table-striped table-hover" style="border:#dee2e6;">
			<thead align="center" style="font-size:10.5pt;font-family:arial;border:#dee2e6;background:#35A9DB;color:#fff;">
				<tr>
					<th>No</th>
          <th>NIP/NPT/NPM/No.KTP</th>
					<th style="width:150px;">Name</th>
					<th>Status</th>
          <th style="width:150px;">Lab. Entry Date</th>
          <th style="width:100px;">Laboratory</th>
          <th>Purpose</th>
          <th>Required Equipment</th>
				</tr>
			</thead>
			<tbody style="font-size:10pt;font-family:arial;" width="auto">
      <?php 
      include ('config.php');
      $no=1;
      
      /*$query = mysqli_query($conn, "select a.kode,a.nama, tgllab, keperluan,a.status, DATE_FORMAT(a.tgllab, '%d-%b-%Y') tgllab, (select nickname from laboratorium where kodelab=a.kdlab) namalab, (select namakeperluan from keperluanpinjam where idkeperluan=a.keperluan) keperluan, keterangan
from(select * from logbook where tgllab >= current_date())a order by id desc");*/
$query = mysqli_query($conn, "select a.kode,a.nama, tgllab, keperluan,a.status, DATE_FORMAT(a.tgllab, '%d-%b-%Y') tgllab, (select nickname from laboratorium where kodelab=a.kdlab) namalab, (select namakeperluan from keperluanpinjam where idkeperluan=a.keperluan) keperluan, keterangan from(select * from logbook)a order by a.tgllab desc");
      if (mysqli_num_rows($query) > 0){
         while ($data = mysqli_fetch_array($query)){
         echo "<tr>";
echo "<td>".$no.". </td><td>".$data['Kode']."</td><td>".$data['Nama']."</td><td>".$data['status']."</td></td><td style='width:100px;text-align:center;'>".$data['tgllab']."</td><td style='text-align:center;'>".$data['namalab']."</td><td>".$data['keperluan']."</td><td>".$data['keterangan']."</td></tr>";
         $no++;
         }
      }
      ?>
			</tbody>
		</table>  
    </div>
</div>
<div class="jumbotron text-center" style="margin-top:10px;bottom: 0;left: 0;right: 0;text-align: center;">
<!-- bottom: 0;left: 0; position: fixed;right: 0;text-align: center;-->
    <center><p><b>Departement of Information Systems-UPN Veteran Jatim <br/> &copy Copyright 2020 </b></p></center>
</div>
</body>
</html>