-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata-request.php
76 lines (74 loc) · 2.54 KB
/
data-request.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
if(isset($_GET['username'])){
$username = $_GET['username'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Inventori Bahan Bangunan</title>
<link rel="stylesheet" type="text/css" href="tambahan/bootstrap-4.1.3/dist/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="tambahan/bootstrap-4.1.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="assets/css/register-style.css">
<link rel="stylesheet" type="text/css" href="tambahan/font-awesome/css/font-awesome.css">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body style="background-image: url('') !important;">
<div class="container">
<div class='row'>
<div class="col-md-2" style="padding-top: 20px;">
<a href="index.php" class="btn btn-info btn-icon btn-sm">
<i class="fa fa-arrow-left"></i>
</a>
</div>
<div class="col-md-8 form-register-container">
<h2>Data Permintaan Peminjaman</h2>
<table class="table table-bordered table-super-condensed">
<thead>
<tr>
<th>No</th>
<th>Nama Barang</th>
<th>Jumlah Barang</th>
<th>Tanggal Pinjam</th>
<th>Tanggal Kembali</th>
<th>Opsi</th>
</tr>
</thead>
<tbody>
<?php
include 'config.php';
$query = mysqli_query($mysqli, "SELECT * FROM tbl_request WHERE peminjam='$username' ORDER BY id DESC");
if(mysqli_num_rows($query) == 0){
echo "<tr><td colspan='7'>belum ada data!</td></tr>";
}else{
$no = 1;
while ($data = mysqli_fetch_array($query)) {
$id = $data['id']; // Menyimpan ID permintaan
?>
<tr>
<td><?php echo $no;?></td>
<td><?php echo $data['nama_barang'];?></td>
<td><?php echo $data['jml_barang'];?></td>
<td><?php echo $data['tgl_pinjam'];?></td>
<td><?php echo $data['tgl_kembali'];?></td>
<td>
<a class="btn btn-danger btn-sm" href="proses-batalkan.php?id=<?php echo $id; ?>">
<i class="fa fa-times"></i>
Batalkan permintaan
</a>
</td>
</tr>
<?php
$no++;
}
}
?>
</table>
</div>
</div>
</div>
<script type="text/javascript" src="tambahan/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="tambahan/bootstrap-4.1.3/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="tambahan/bootstrap-4.1.3/dist/js/bootstrap.min.js"></script>
</body>
</html>