-
Notifications
You must be signed in to change notification settings - Fork 0
/
menus.php
75 lines (55 loc) · 1.56 KB
/
menus.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
<?php include("./inc/req_functions.php") ?>
<?php include("./inc/connection.php") ?>
<?php session_start() ?>
<?php
$query = "SELECT * FROM menus";
$result = mysqli_query($conn, $query);
query_check($result);
$cards = "";
if (mysqli_num_rows($result) >= 1) {
while ($row = mysqli_fetch_assoc($result)) {
$cards .= "<div class=\"col-md-4 col-12 mt-0 \">";
$cards .= "<h4 class='main-span'>" . ucfirst($row['menu_name']) . "<h4>";
$cards .= "<img src=\"{$row['menu_img']}\" class=\"img-fluid p-1\" />";
$cards .= "</div>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Meals</title>
<link rel="stylesheet" href="./style.css">
</head>
<?php
if (isset($_SESSION["usertype"])) {
if ($_SESSION['usertype'] == "normaluser") {
include("./inc/mainheader.php");
} else if ($_SESSION['usertype'] == "SystemAdmin") {
include("./inc/adminheader.php");
} else if ($_SESSION['usertype'] == "operational") {
include("./inc/opheader.php");
}
} else {
include("./inc/outheader.php");
}
?>
<style>
.text-bg-danger {
background-color: brown;
color: white;
}
</style>
<body>
<div class="container">
<!-- Features Section -->
<div class="row mt-1">
<?php if (isset($cards)) {
echo $cards;
} ?>
</div>
</div>
</body>
</html>