-
Notifications
You must be signed in to change notification settings - Fork 0
/
datamakanan.php
129 lines (129 loc) · 3.78 KB
/
datamakanan.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
<!DOCTYPE html>
<?php
require __DIR__ . '/php/connect.php';
require __DIR__ . '/php/cek_login.php';
?>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/app.css" rel="stylesheet">
<link href="css/toni.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<div class="row">
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<!-- Collapsed Hamburger -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse" aria-expanded="false">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Branding Image -->
<a class="navbar-brand" href="/">
</a>
</div>
<div class="collapse navbar-collapse" id="app-navbar-collapse">
<!-- Left Side Of Navbar -->
<ul class="nav navbar-nav navbar-right nav-tabs-justified">
<li>
<a href="home.php">Home</a>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Data
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li>
<a href="datamakanan.php">Data Makanan</a>
</li>
<li>
<a href="data kriteria.php">Data Kriteria</a>
</li>
<li>
<a href="data subkriteria.php">Data Subkriteria</a>
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Nilai
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li>
<a href="nilai kriteria.php">Nilai Kriteria</a>
</li>
<li>
<a href="nilai subkriteria.php">Nilai Subkriteria</a>
</li>
<li>
<a href="nilai makanan.php">Nilai Makanan</a>
</li>
</ul>
</li>
<li>
<a href="hasilakhir.php">Hasil Akhir</a>
</li>
<li>
<a href="php/logout.php">
Logout
</a>
</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h3>Data Makanan</h3>
<span class="hrdivider"></span>
<div class="panel panel-default">
<div class="panel-body">
<a href="datamakanan tambah.php" class="btn btn-primary">
Tambah Data
</a>
<table class="table table-hover table-bordered table-responsive table-striped table-information">
<thead>
<tr>
<th>No</th>
<th>Kode</th>
<th>Nama Makanan</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$sql = 'SELECT * FROM makanan WHERE kd_makanan != "0"';
$query = mysqli_query($con, $sql);
while ($row = mysqli_fetch_array($query))
{
echo "<tr>
<td class='text-center'>" . $row['id'] . "</td>
<td class='text-center'>" . $row['kd_makanan'] . "</td>
<td class='text-center'>" . $row['nama'] . "</td>
<td><a href='datamakanan edit.php?id=" .$row['id']. "' class='btn btn-warning btn-sm'>Edit</a>
<a href='php/makanan delete.php?id=" . $row['id'] . "' class='btn btn-danger btn-sm'>Delete</a>
</td>
<tr>";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>