-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.php
137 lines (130 loc) · 5.86 KB
/
menu.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
<?php
session_start();
ob_start();
include "koneksi.php";
$tampiluser =mysqli_query($conn, "SELECT * FROM tbl_user WHERE codename='$_SESSION[codename]'");
$user =mysqli_fetch_array($tampiluser);
$menu = new menu($connection);
?>
<!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, maximum-scale=1" />
<meta name="description" content="" />
<meta name="author" content="" />
<title>Admin</title>
<link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Raleway:wght@100;200;300;400;500;700&family=Ubuntu:ital,wght@0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/4ef2c70460.js" cross origin="anonymous"></script>
<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" />
<style>
body{
margin: 0;
}
.plus{
border: none;
position: fixed;
right: 3%;
bottom: 5%;
background-color: #0275d8;
padding: 10px 20px;
color: rgb(255, 255, 255);
border-radius: 50px;
font-size: 25px;
margin: 0 auto;
display: block;
transition: 0.2s ease-in-out 0s;
font-weight: 1000;
}
.plus:hover{
border: none;
background-color: #01447e;
color: rgb(255, 255, 255);
cursor: pointer;
}
</style>
</head>
<body>
<div class="navbar navbar-inverse set-radius-zero">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="left-div">
<div class="user-settings-wrapper">
<ul class="nav">
<h2 style="color:white;">Selamat Datang, <?= $user['username'];?></h2>
<a href="admin.php" style="text-decoration: none;">
<button class="btn btn-primary text-white text-center" style="height: 40px; margin-right:160px;">Back</button>
</a>
</ul>
</div>
</div>
</div>
</div>
<div class="content-wrapper">
<a href="newmenu.php">
<button class="plus">+</button>
</a>
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 class="page-head-line">Tabel Menu</h1>
</div>
</div>
<div class="row">
<div class="col-md-6" style="width: 100%;">
<div class="panel panel-default">
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Id</th>
<th>Gambar</th>
<th>Nama</th>
<th>Harga</th>
<th>Jenis</th>
<th>Aksi</th>
<th>Stok</th>
</tr>
<?php
$tampilmenu = $menu->tampilmenu();
while($row = $tampilmenu->fetch_array()){
?>
</thead>
<tbody>
<tr>
<td><?= $row['id_menu']?></td>
<td><img style="height: 100px; width: 100px;" src="img/<?= $row['img']?>" alt=""></td>
<td><?= $row['nama']?></td>
<td><?= $row['harga']?></td>
<td><?= $row['jenis']?></td>
<td>
<div class="text-white text-center" style="margin: auto;">
<a href="editmenu.php?id=<?= $row['id_menu']?>" class="btn btn-xs btn-primary" style="text-decoration: none; margin:5px;">Edit</a>
<a href="action.php?aksi=hapusmenu&id=<?= $row['id_menu']?>" class="btn btn-xs btn-danger" style="text-decoration: none; margin:5px;">Hapus</a>
</div>
</td>
<td><?= $row['stok']?></td>
<?php } ?>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/js/jquery-1.11.1.js"></script>
<script src="assets/js/bootstrap.js"></script>
</body>
</html>