-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathriwayat.php
executable file
·64 lines (50 loc) · 1.26 KB
/
riwayat.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
<?php
include 'config.php';
session_start();
include 'authcheckkasir.php';
$view = $dbconnect->query('SELECT * FROM transaksi');
// return var_dump($view);
?>
<!DOCTYPE html>
<html>
<head>
<title>Riwayat Transaksi</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="container">
<?php if (isset($_SESSION['success']) && $_SESSION['success'] != '') {?>
<div class="alert alert-success" role="alert">
<?=$_SESSION['success']?>
</div>
<?php
}
$_SESSION['success'] = '';
?>
<h1>Riwayat Transaksi</h1>
<a href="/">Kembali</a>
<table class="table table-bordered">
<tr>
<th>#Nomor</th>
<th>Tanggal</th>
<th>Total</th>
<th>Kasir</th>
<th></th>
</tr>
<?php
while ($row = $view->fetch_array()) { ?>
<tr>
<td> <?= $row['nomor'] ?> </td>
<td><?= $row['tanggal_waktu'] ?></td>
<td><?=$row['total']?></td>
<td><?=$row['nama']?></td>
<td>
<a href="/unduh_struk.php?idtrx=<?=$row['id_transaksi']?>" class="btn btn-primary">Lihat</a>
</td>
</tr>
<?php }
?>
</table>
</div>
</body>
</html>