-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnilai.php
132 lines (124 loc) · 3.44 KB
/
nilai.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
132
<?php
include "header.php";
include "includes/config.php";
$querykr = mysqli_query($koneksi,"SELECT * FROM nilai_kriteria");
$queryalt = mysqli_query($koneksi,"SELECT * FROM nilai_alternatif");
?>
<br>
<div class="container">
<div class="row">
<div class="col-md-6 text-left">
<h4>Data Nilai</h4>
</div>
<div class="col-md-6 text-right">
</div>
</div>
<br>
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active text-dark" data-toggle="tab" href="#nk">Nilai Kriteria</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" data-toggle="tab" href="#na">Nilai Alternatif</a>
</li>
</ul>
<div class="tab-content">
<div id="nk" class="container tab-pane active"><br>
<div class="row">
<div class="col-md-6 text-left">
<h4>Data Nilai Kriteria</h4>
</div>
<div class="col-md-6 text-right">
<button onclick="location.href='tambah-nilai-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>Keterangan Nilai</th>
<th>Jumlah</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$no=1;
while ($row = mysqli_fetch_array($querykr)){
?>
<tr>
<td><?php echo $no++ ?></td>
<td><?php echo $row['ket_nilai_kriteria'] ?></td>
<td><?php echo $row['jum_nilai_kriteria'] ?></td>
<td class="text-center">
<a href="edit-nilai-kriteria.php?id=<?php echo $row['id_nilai_kriteria'] ?>" class="btn btn-warning text-white"><i class="fas fa-pencil-alt"></i></a>
<a href="hapus-nilai-kriteria.php?id=<?php echo $row['id_nilai_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>Keterangan Nilai</th>
<th>Jumlah</th>
<th>Aksi</th>
</tr>
</tfoot>
</table>
</div>
<div id="na" class="container tab-pane fade"><br>
<div class="row">
<div class="col-md-6 text-left">
<h4>Data Nilai Alternatif</h4>
</div>
<div class="col-md-6 text-right">
<button onclick="location.href='tambah-nilai-alternatif.php'" class="btn btn-primary">Tambah Data</button>
</div>
</div>
<br>
<table id="tabelalternatif" width="100%" class="table table-striped table-bordered">
<thead>
<tr>
<th>No</th>
<th>Keterangan Nilai</th>
<th>Jumlah</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$no=1;
while ($row = mysqli_fetch_array($queryalt)){
?>
<tr>
<td><?php echo $no++ ?></td>
<td><?php echo $row['ket_nilai_alternatif'] ?></td>
<td><?php echo $row['jum_nilai_alternatif'] ?></td>
<td class="text-center">
<a href="edit-nilai-alternatif.php?id=<?php echo $row['id_nilai_alternatif'] ?>" class="btn btn-warning text-white"><i class="fas fa-pencil-alt"></i></a>
<a href="hapus-nilai-alternatif.php?id=<?php echo $row['id_nilai_alternatif'] ?>" 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>Keterangan Nilai</th>
<th>Jumlah</th>
<th>Aksi</th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<?php
include "footer.php";
?>