-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcafe.php
More file actions
52 lines (46 loc) · 1.75 KB
/
cafe.php
File metadata and controls
52 lines (46 loc) · 1.75 KB
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
<!-- website for food ordering -->
<?php
require_once('data.php') ;
require_once('menu.php');
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Café Progate</title>
<link rel="stylesheet" type="text/css" href="cafe.css">
<link href='https://fonts.googleapis.com/css?family=Pacifico|Lato' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="menu-wrapper container">
<h1 class="logo">Café Sayali</h1>
<h3>Item count: <?php echo Menu::getCount() ?></h3>
<form method="post" action="confirm.php">
<div class="menu-items">
<?php foreach ($menus as $menu): ?>
<div class="menu-item">
<img src="<?php echo $menu->getImage() ?>" class="menu-item-image">
<h3 class="menu-item-name">
<a href="show.php?name=<?php echo $menu->getName() ?>">
<?php echo $menu->getName() ?>
</a>
</h3>
<?php if ($menu instanceof Drink): ?>
<p class="menu-item-type"><?php echo $menu->getType() ?></p>
<!-- Add an else statement -->
<?php else: ?>
<?php for ($i = 0; $i < $menu->getSpiciness(); $i++): ?>
<img src="https://s3-ap-northeast-1.amazonaws.com/progate/shared/images/lesson/php/chilli.png" class='icon-spiciness'>
<?php endfor ?>
<?php endif ?>
<p class="price">₹<?php echo $menu->getTaxIncludedPrice() ?> (tax included)</p>
<span>Qty: </span>
<input type="text" value="0" name="<?php echo $menu->getName() ?>">
</div>
<?php endforeach ?>
</div>
<input type="submit" value="Order">
</form>
</div>
</body>
</html>