-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmenu-list.php
137 lines (118 loc) · 4.62 KB
/
menu-list.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
<!-- menu-list.php -->
<?php include 'template/header.php';
if (!isset($_SESSION['isLoggedIn'])) {
echo '<script>window.location="login.php"</script>';
}
?>
<body>
<section class="body">
<!-- start: header -->
<?php include 'template/top-bar.php'; ?>
<!-- end: header -->
<div class="inner-wrapper">
<!-- start: sidebar -->
<?php include 'template/left-bar.php'; ?>
<!-- end: sidebar -->
<section role="main" class="content-body">
<header class="page-header">
<h2>Table</h2>
<div class="right-wrapper pull-right">
<ol class="breadcrumbs">
<li>
<a href="index.php">
<i class="fa fa-home"></i>
</a>
</li>
<li><span>Tables</span></li>
<li><span>Menu Items</span></li>
</ol>
<a class="sidebar-right-toggle" data-open="sidebar-right"><i class="fa fa-chevron-left"></i></a>
</div>
</header>
<!-- start: page -->
<section class="panel">
<header class="panel-heading">
<div class="panel-actions">
<a href="#" class="fa fa-caret-down"></a>
<a href="#" class="fa fa-times"></a>
</div>
<h2 class="panel-title">All Menu Items</h2>
</header>
<div class="panel-body">
<table class="table table-bordered table-striped mb-none" id="datatable-tabletools" data-swf-path="assets/vendor/jquery-datatables/extras/TableTools/swf/copy_csv_xls_pdf.swf">
<thead>
<tr>
<th>No</th>
<th>Image</th>
<th>Name</th>
<th>Type</th>
<th>Price</th>
<th>Made By</th>
<th class="hidden-phone">Action</th>
</tr>
</thead>
<tbody>
<?php
$res_id = $_SESSION['id'];
$count = 1;
include 'dbCon.php';
$con = connect();
$sql = "SELECT * FROM `menu_item` WHERE res_id = '$res_id';";
$result = $con->query($sql);
foreach ($result as $r) {
?>
<tr class="gradeX">
<td class="center hidden-phone"><?php echo $count; ?></td>
<td class="center hidden-phone">
<figure class="image rounded">
<img style="height: 50px;width: 50px;border-radius: 10px; border: 1px solid darkgray;" src="item-image/<?php echo $r['image']; ?>" alt="Item Image" >
</figure>
</td>
<td><?php echo $r['item_name']; ?></td>
<td><?php echo $r['food_type']; ?></td>
<td><?php echo $r['price']; ?></td>
<td><?php echo $r['madeby']; ?></td>
<td class="center hidden-phone">
<a href="menu-manage.php?menu_id=<?php echo $r['id']; ?>" class="btn btn-danger" onclick="if (!Done()) return false; ">Delete</a>
</td>
</tr>
<?php $count++; } ?>
</tbody>
</table>
</div>
</section>
<!-- end: page -->
</section>
</div>
<?php include 'template/right-bar.php'; ?>
</section>
<script type="text/javascript">
function Done(){
return confirm("Are you sure?");
}
</script>
<!-- Vendor -->
<script src="assets/vendor/jquery/jquery.js"></script>
<script src="assets/vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.js"></script>
<script src="assets/vendor/nanoscroller/nanoscroller.js"></script>
<script src="assets/vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="assets/vendor/magnific-popup/magnific-popup.js"></script>
<script src="assets/vendor/jquery-placeholder/jquery.placeholder.js"></script>
<!-- Specific Page Vendor -->
<script src="assets/vendor/select2/select2.js"></script>
<script src="assets/vendor/jquery-datatables/media/js/jquery.dataTables.js"></script>
<script src="assets/vendor/jquery-datatables/extras/TableTools/js/dataTables.tableTools.min.js"></script>
<script src="assets/vendor/jquery-datatables-bs3/assets/js/datatables.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="assets/javascripts/theme.js"></script>
<!-- Theme Custom -->
<script src="assets/javascripts/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="assets/javascripts/theme.init.js"></script>
<!-- Examples -->
<script src="assets/javascripts/tables/examples.datatables.default.js"></script>
<script src="assets/javascripts/tables/examples.datatables.row.with.details.js"></script>
<script src="assets/javascripts/tables/examples.datatables.tabletools.js"></script>
</body>
</html>