-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtampil_subkriteria.php
71 lines (70 loc) · 2.87 KB
/
tampil_subkriteria.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
<?php
session_start();
error_reporting(0);
if(empty($_SESSION['id'])){
header('location:login.php?error_login=1');
}
?>
<?php include 'header.php';?>
<?php include 'menu.php';?>
<div class="content-wrapper">
<div class="container">
<div class="row">
<div class="col-md-12">
<h4 class="page-head-line">Master Sub Data Kriteria</h4>
</div>
</div>
<div class="row">
<div class="col-md-12">
<?php if (!empty($_GET['error_msg'])): ?>
<div class="alert alert-danger">
<?= $_GET['error_msg']; ?>
</div>
<?php endif ?>
</div>
</div>
<div class="row">
<div><a href="input_subkriteria.php" class="btn btn-info">Tambah Data</a></div>
<br>
<div class="table-responsive">
<table id="example1" class="table table-striped table-bordered">
<thead>
<tr>
<th>No</th>
<th>Kriteria</th>
<th>Sub Kriteria</th>
<th>Nilai</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $no=1; foreach($db->select('sub_kriteria.id_subkriteria,sub_kriteria.subkriteria,kriteria.kriteria,sub_kriteria.nilai','sub_kriteria,kriteria')->where('sub_kriteria.id_kriteria=kriteria.id_kriteria')->get() as $data): ?>
<tr>
<td><?= $no;?></td>
<td><?= $data['kriteria']?></td>
<td><?= $data['subkriteria']?></td>
<td><?= $data['nilai']?></td>
<td>
<a class="btn btn-warning" href="edit_subkriteria.php?id=<?php echo $data[0]?>">Edit</a>
<a class="btn btn-danger" onclick="return confirm('Yakin Hapus?')" href="delete_subkriteria.php?id=<?php echo $data[0]?>">Hapus</a>
</td>
</tr>
<?php $no++; endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- CONTENT-WRAPPER SECTION END-->
<?php include 'footer.php'; ?>
<script type="text/javascript">
$(function(){
$("#sk").addClass('menu-top-active');
});
</script>
<script type="text/javascript">
$(function() {
$('#example1').dataTable();
});
</script>