forked from immanuelkituku/SEKU-GUESTHOUSE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsub-meal7.php
138 lines (125 loc) · 6.67 KB
/
sub-meal7.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
<?php
include_once 'admin/includes/db.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial scale=1.0">
<meta http-equiv="X-UA compatible" content="i.e=edge">
<title>SEKU GUEST HOUSE | MEALS</title>
<link rel="stylesheet" href="css/meals.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.css" rel="stylesheet" type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
</head>
<!-- header content -->
<div class="container bg-white">
<div class="text-center " mr-5>
<img src="images\Sekulogo.png" height=100px/>
<div class="text-success py-3">
<h2 class="h1 heading-4">SEKU GUEST HOUSE</h2>
</div class="bg-primary">
</div>
<!-- - navigation-standard menu -- -->
<nav class="navbar navbar-expand-lg navbar-dark badge-success">
<a class="navbar-brand" href="#">
<i class="fab fa-facebook-square"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-snapchat"></i>
<i class="fab fa-google-plus-g"></i>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" title="menu" data-target="#nav" aria-controls="nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon">
</span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="nav">
<div class="navbar-nav pr-lg" >
<a class="nav-item nav-link" href="index.php">HOME</a>
<a class="nav-item nav-link" href="about.php">ABOUT US</a>
<a class="nav-item nav-link active" href="meals.php"><span class="sr-only">(current)</span>MEALS</a>
<a class="nav-item nav-link" href="Rooms.php">ROOMS</a>
<a class="nav-item nav-link" href="contacts.php">CONTACTS</a>
<a class="nav-item nav-link" href="admin/adminlog.php">ADMIN</a>
</div>
</div>
</nav>
<section class="container bg-light py-2">
<div id="message"></div>
<div>
<!-- Search bar -->
<form action="search.php" method="POST" class="form-inline" style="display: inline;">
<input class="form-control mr-sm-2 ml-sm-3" type="text" name="q" placeholder="Search for food..." aria-label="Search">
<button class="btn btn-success my-sm-0" type="submit" name="search">Search</button>
</form>
<a href="order-cart.php" style="text-decoration: none;color:#000;">
<h5 align="right" class="mx-5"><i class="fas fa-shopping-cart text-success"></i> Cart <span id="cart-item" class="rounded-circle bg-success px-2 text-white"></span></h5></a>
</div>
<h2 class="text-center">MAIN DISHES</h2>
<!-- Meals available -->
<?php
if (!$connect){
die("Database connection failed!");
}else{
$query = 'SELECT * FROM menu where CAT_OF_FOOD="main dishes"';
$sql = mysqli_query($connect,$query);
echo '<div class="row">';
while($row=mysqli_fetch_assoc($sql)){
echo '<div class="col-lg-4 col-md-3 col-sm-12 my-1">';
echo '<div class="card shadow">';
echo '<img src="admin/images/'.$row["IMAGES"].'" class="card-img-top" alt="Main Dishes" width="300px" height="200px">';
echo '<div class="card-body">';
echo '<h6 class="card-title"><strong>'.$row['NAME_OF_FOOD'].'</strong></h6>';
echo '<p class="card-text">'.$row['DESCRIPTION'].'</p><br>';
echo '<p><strong>ksh. '.$row['PRICE'].'</strong></p>';
echo '</div>';
echo '</div>';
echo '<div class="card-footer">';
echo '<form action="" class="form-submit">';
?>
<input type="hidden" class="pid" value="<?= $row['FOOD_ID'] ?>">
<input type="hidden" class="pname" value="<?= $row['NAME_OF_FOOD'] ?>">
<input type="hidden" class="pprice" value="<?= $row['PRICE'] ?>">
<input type="hidden" class="pcode" value="<?= $row['FOOD_CODE'] ?>">
<button class="btn btn-success text-center my-2 addItemBtn" name="add_to_cart"><i class="fas fa-shopping-cart"></i> Add to cart</button>
<?php
echo '</form>';
echo '</div>';
echo '</div>';
}
echo '</div>';
}
?>
<span><a href="meals.php" class="btn btn-success my-2">Back</a></span>
</section>
<!-- Footer -->
<footer>
<div class="content justify-content-center">
<div class="row">
<div class="col-lg-6 col-md-6">
<h5>CONTACTS</h5>
<p><i class="fas fa-home"></i>Kwa Vonza,kitui,P.O. Box 170-90200</p>
<p><i class="fas fa-phone-square-alt"></i>Tel:+254702598123</p>
<p><i class="fas fa-envelope"></i>info@sekuguesthouse</p>
</div>
<div class="col-lg-6 col-md-6">
<h5>STAY IN TOUCH</h5>
<i class="fab fa-facebook"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-snapchat"></i><br>
<input type="email" placeholder="Subscribe for updates"><button class="btn btn-success">subscribe</button>
</div>
</div>
<h2>SEKU GUEST HOUSE,COPYRIGHT ©2020</h2>
</div>
</div>
</footer>
<script src="https://kit.fontawesome.com/bf257a5746.js" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/ajax_cart.js"></script>
</body>
</html>