-
Notifications
You must be signed in to change notification settings - Fork 1
/
subkriteria.php
159 lines (141 loc) · 8.75 KB
/
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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sistem Pendukung Keputusan SAW</title>
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<link href="assets/css/style.css" rel="stylesheet" />
</head>
<body>
<div id="wrapper">
<nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">SMARTPHONE CHOICER
</a>
</div>
<div class="notifications-wrapper">
</div>
</nav>
<!-- /. NAV TOP -->
<nav class="navbar-default navbar-side" role="navigation">
<div class="sidebar-collapse">
<ul class="nav" id="main-menu">
<li>
<div class="user-img-div">
<img src="assets/img/adam.jpg" class="img-circle" />
</div>
</li>
<li>
<a href="#"> <strong> Muhammad Adam </strong></a>
</li>
<li>
<a href="index.php"><i class="fa fa-dashboard "></i>Dashboard</a>
</li>
<li>
<a href="alternatif.php"><i class="fa fa-venus "></i>Alternatif</a>
</li>
<li>
<a href="kriteria.php"><i class="fa fa-bolt "></i>Kriteria</a>
</li>
<li>
<a class="active-menu" href="subkriteria.php"><i class="fa fa-code "></i>Sub Kriteria</a>
</li>
<li>
<a href="normalisasi.php"><i class="fa fa-dashcube "></i>Normalisasi</a>
</li>
<li>
<a href="perhitungan.php"><i class="fa fa-dashcube "></i>Perhitungan</a>
</li>
<li>
<a href="kesimpulan.php"><i class="fa fa-dashcube "></i>Kesimpulan</a>
</li>
</ul>
</div>
</nav>
<div id="page-wrapper" class="page-wrapper-cls">
<div id="page-inner">
<div class="row">
<div class="col-md-12">
<h1 class="page-head-line">SubKriteria</h1>
</div>
</div>
<!-- /. PAGE INNER -->
<div class="row">
<div class="col-md-16">
<!-- Kitchen Sink -->
<div class="panel panel-default">
<div class="panel-heading">
Tabel SubKriteria
<a href="subkriteria_tambah.php"><input type="submit" value="Tambah" class="btn btn-primary btn-sm"></a>
<?php
$id_sub = @$_GET['id_sub'];
$aksi = @$_GET['aksi'];
if(($aksi<>"") and ($id_sub<>"")){
mysql_query("delete from subkriteria where id_sub='$id_sub'") or die (mysql_error());
echo "<script type=text/javascript>
window.location.href='http://localhost/sawhp/subkriteria.php';
</script>" ;
}
?>
</div>
<div class="panel-body">
<div class="datatable table-responsive">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>No</th>
<th>Nama Kriteria</th>
<th>Keterangan</th>
<th>Nilai</th>
<th>Bobot</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
include "koneksi.php";
$nomor = 0;
$result = mysql_query("SELECT * FROM subkriteria, kriteria WHERE subkriteria.id_kriteria=kriteria.id_kriteria order by subkriteria.id_sub asc") or die (mysql_error());
while ($data = mysql_fetch_array($result)) {
?>
<tr>
<td><?php echo $nomor=$nomor+1; ?></td>
<td><?php echo $data['nama_kriteria']; ?></td>
<td><?php echo $data['nama_sub']; ?></td>
<td><?php echo $data['nilai']; ?></td>
<td><?php echo $data['keterangan']; ?></td>
<td>
<a href="subkriteria_edit.php?id_sub=<?php echo $data['id_sub']; ?>" title="Edit"><i class='fa fa-edit' title="Edit"></i>Edit</a>
<a href="subkriteria_delete.php?id_sub=<?php echo $data['id_sub'];?>"><i class='glyphicon glyphicon-ban-circle' title="Delete"></i>Delete</a>
</td>
</tr>
<?php }
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- End Kitchen Sink -->
</div>
</div>
</div>
<footer>
© 2018 Poltekpos | By : <a href="#" target="_blank">Muhammad Adam Nahdlotul Halimi</a>
</footer>
<script src="assets/js/jquery-1.11.1.js"></script>
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/jquery.metisMenu.js"></script>
<script src="assets/js/custom.js"></script>
</body>
</html>