-
Notifications
You must be signed in to change notification settings - Fork 0
/
tampil_member.php
131 lines (129 loc) · 4.62 KB
/
tampil_member.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php
include "header.php";
?>
<?php
if($_SESSION['role'] == 'admin'){
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<title></title>
</head>
<style>
body {
background-image: url('12.gif.gif');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
<body>
<h3>Data Member</h3>
<table class="table table-hover table-striped">
<thead>
<tr>
<th>NO</th>
<th>ID</th>
<th>NAMA</th>
<th>ALAMAT</th>
<th>GENDER</th>
<th>TELEPON</th>
<th>AKSI</th>
</tr>
</thead>
<tbody>
<?php
include "koneksi.php";
$qry_member=mysqli_query($conn,"select * from member");
$no=0;
while($data_member=mysqli_fetch_array($qry_member)){
$no++;
?>
<tr>
<td><?=$no?></td>
<td><?=$data_member['id_member']?></td>
<td><?=$data_member['nama_member']?></td>
<td><?=$data_member['alamat']?></td>
<td><?=$data_member['jenis_kelamin']?></td>
<td><?=$data_member['telp']?></td>
<td><a href="ubah_member.php?id=<?=$data_member['id_member']?>" class="btn btn-success">Ubah</a><a style="margin-left:10px;" href="hapus_member.php?id=<?=$data_member['id_member']?>" onclick="return confirm('Apakah anda yakin menghapus data ini?')" class="btn btn-danger">Hapus</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
</body>
</html>
<?php
}
?>
<?php
if($_SESSION['role'] == 'kasir'){
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<title></title>
</head>
<style>
body {
background-image: url('12.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
<body>
<h3>Data Member</h3>
<table class="table table-hover table-striped">
<thead>
<tr>
<th>NO</th>
<th>ID</th>
<th>NAMA</th>
<th>ALAMAT</th>
<th>GENDER</th>
<th>TELEPON</th>
<th>AKSI</th>
</tr>
</thead>
<tbody>
<?php
include "koneksi.php";
$qry_member=mysqli_query($conn,"select * from member");
$no=0;
while($data_member=mysqli_fetch_array($qry_member)){
$no++;
?>
<tr>
<td><?=$no?></td>
<td><?=$data_member['id_member']?></td>
<td><?=$data_member['nama_member']?></td>
<td><?=$data_member['alamat']?></td>
<td><?=$data_member['jenis_kelamin']?></td>
<td><?=$data_member['telp']?></td>
<td><a href="ubah_member.php?id=<?=$data_member['id_member']?>"
class="btn btn-success">Ubah</a><a style="margin-left:10px;"
href="hapus_member.php?id=<?=$data_member['id_member']?>"
onclick="return confirm('Apakah anda yakin menghapus data ini?')"
class="btn btn-danger">Hapus</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
</body>
</html>
<?php
}
?>