-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathkriteria.php
63 lines (59 loc) · 1.55 KB
/
kriteria.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
<?php
include "header.php";
include "includes/config.php";
$query = mysqli_query($koneksi,"SELECT * FROM kriteria");
?>
<br>
<div class="container">
<div class="row">
<div class="col-md-6 text-left">
<h4>Data Kriteria</h4>
</div>
<div class="col-md-6 text-right">
<button onclick="location.href='tambah-kriteria.php'" class="btn btn-primary">Tambah Data</button>
</div>
</div>
<br>
<table id="tabeldata" width="100%" class="table table-striped table-bordered">
<thead>
<tr>
<th>No</th>
<th>Nama Kriteria</th>
<th>Tipe Kriteria</th>
<th>Bobot Kriteria</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$no=1;
while ($row = mysqli_fetch_array($query)){
?>
<tr>
<td><?php echo $no++ ?></td>
<td><?php echo $row['nama_kriteria'] ?></td>
<td><?php echo $row['tipe_kriteria'] ?></td>
<td><?php echo $row['bobot_kriteria'] ?></td>
<td class="text-center">
<a href="edit-kriteria.php?id=<?php echo $row['id_kriteria'] ?>" class="btn btn-warning text-white"><i class="fas fa-pencil-alt"></i></a>
<a href="hapus-kriteria.php?id=<?php echo $row['id_kriteria'] ?>" onclick="return confirm('Yakin ingin menghapus data')" class="btn btn-danger"><span class="fas fa-trash-alt"></span></a>
</td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<tr>
<th>No</th>
<th>Nama Kriteria</th>
<th>Tipe Kriteria</th>
<th>Bobot Kriteria</th>
<th>Aksi</th>
</tr>
</tfoot>
</table>
</div>
<?php
include "footer.php";
?>