<!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">
  <link rel='stylesheet' type='text/css'>
       <style type="text/css">
        .floating {
          position: fixed;
          width: 60px;
          height: 60px;
          top: 10px;
          left: 80px;
          text-align: center;
          font-size: 30px;
          z-index: 100;
      } 
      #tabela{
        vertical-align:middle; 
      }
      
      @page{
      margin: 0px;
      }
      @media print {
           #noprint {
              visibility: hidden;
           }
        }    
</style>
  
</head>
<body>
<div class="floating" style="overflow:auto; width:30%; height:auto;text-align:left;">
<a class="navbar-brand" href="index.php">
<img src="gambar/logosi.png" alt="logo" style="width:60px;" class="d-none d-sm-block" id="noprint">
<img src="gambar/logosi.png" style="display: none !important;" class="d-block d-sm-none" id="noprint" />
</a>
</div>
<div class="jumbotron text-center">
    <h1>SIMPEL (Sistem InforMasi PEminjaman Laboratorium)</h1>
    <p><b>STUDY PROGRAMME OF INFORMATION SYSTEM - 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>Data of Loan Laboratory Report</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;" valign="middle">
			<thead align="center" style="font-size:10.5pt;font-family:arial;border:#dee2e6;background:#35A9DB;color:#fff;">
				<tr>
		  <th style="color:black;" id="tabela">No</th>
          <th style="color:black;" id="tabela">NPM/NIP</th>
		  <th style="color:black;" style="width:150px;" id="tabela">Name</th>
		  <th style="color:black;" id="tabela">Status</th>
          <th style="color:black;" id="tabela">Courses</th>
          <th style="color:black;" id="tabela">Paralel</th>
          <th style="color:black;" id="tabela" style="width:100px;">Session</th>
          <th style="color:black;" style="width:100px;" id="tabela">Lab. Entry Date</th>
          <th style="color:black;" style="width:100px;" id="tabela">Lab. Name</th>
          <th style="color:black;" id="tabela">Necessity</th>
          <th style="color:black;" id="tabela">Information</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.kodepinjam,nip_npm, namapeminjam, a.status, (select namamk from matakuliah where kodemk=a.kodemk) namamk, (select paralel from paralelmk where idparalel=a.paralel) paralel, (select namasesi from sesi where kodesesi=a.sesi) Sesi,
DATE_FORMAT(a.tglpinjam, '%d-%b-%Y') tglpinjam, (select nickname from laboratorium where kodelab=a.kdlab) namalab, 
(select namakeperluan from keperluanpinjam where idkeperluan=a.keperluan) keperluan, keterangan
from(
select * from detiltransaksipinjam where tglpinjam between '".$_GET['date1']."' and '".$_GET['date2']."' and kdlab like '%".$_GET['lab']."%')a order by kodepinjam desc");
      if (mysqli_num_rows($query) > 0){
         while ($data = mysqli_fetch_array($query)){
         echo "<tr>";
echo "<td>".$no.". </td><td>".$data['NIP_NPM']."</td><td style='text-align:center;'>".$data['NamaPeminjam']."</td><td style='text-align:center;'>".$data['status']."</td><td style='width:110px;text-align:center;'>".$data['namamk']."</td><td>".$data['paralel']."</td><td style='width:100px;text-align:center;'>".$data['Sesi']."</td><td style='width:110px;text-align:center;'>".$data['tglpinjam']."</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>Study Programme of Information Systems-UPN Veteran Jatim <br/> &copy Copyright 2020 </b></p></center>
</div>
</body>
</html>