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
<?php
include 'koneksi.php';
include 'common/header.php';
?>
<h2> <span class="glyphicon glyphicon-credit-card"></span> Daftar Pesanan </h2>
<br><hr>
<table class="table table-hover table-condensed">
<tr>
<th class="col-md-1"> NO</th>
<th class="col-md-3"> Nama Pemesan</th>
<th class="col-md-2"> Total </th>
<th class="col-md-3"> Bukti </th>
<th class="col-md-3"> opsi </th>
</tr>
<?php
$no = 1;
$sql = mysqli_query($koneksi,"SELECT pembayaran.id_pembayaran, pembayaran.total_harga, pembayaran.bukti, pembayaran.status, member.nama
FROM pembayaran INNER JOIN member ON member_id = id_member");
while($row = mysqli_fetch_assoc($sql)){
?>
<tr>
<td> <?= $no?> </td>
<td> <?= $row['nama']?> </td>
<td> <?= $row['total_harga']?> </td>
<td>
<?php
if($row['bukti'] == NULL){
echo 'Gambar bukti belum di upload!';
}else{
echo '<a href="picture/'. $row['bukti'] .'">
<img src="picture/'. $row['bukti'] .'" width="170" height="150">
</a>';
}
?>
</td>
<td>
<?php
if($row['bukti'] != NULL && $row['status'] != NULL){
echo $row['status'];
}
else if($row['bukti'] != NULL && $row['status'] != 'Diterima' && $row['status'] == NULL){
echo '<a href="konfirmasi.php?id='. $row['id_pembayaran']. '" class="btn btn-success"> Konfirmasi </a>';
}else if($row['bukti'] == NULL && $row['status'] == NULL){
echo 'none';
}
?>
</td>
</tr>
<?php
$no++;
}
?>
</table>
<?php
include 'common/footer.php';
?>