-
Notifications
You must be signed in to change notification settings - Fork 1
/
meals.php
49 lines (48 loc) · 1.87 KB
/
meals.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
<?php include("header.inc.php"); ?>
</div>
<section class="panel panel-default" style="border:none;">
<div class="row">
<div class="col-md-12" style="margin-bottom:20px;">
<div class="row">
<h3 style="text-align:left; margin-left:20px;">Choose Meal
<?php
$user = $_SESSION['matric'];
$query89 = "SELECT * FROM user WHERE matric = '$user' ";
$result89 = mysql_query($query89)
or die ("Couldn't execute query89.");
while ($row89 = mysql_fetch_array($result89,MYSQL_ASSOC))
{
if ($row89['section'] == 'Admin') {
?>
<a href="trashed_meals.php" class="btn btn-success"> <i class="fa fa-trash-o"></i> Trashed Meals</a>
<a href="add_meal.php" class="btn btn-success"> <i class="fa fa-plus"></i> Add Meal</a>
<?php
}
}
?>
</h3>
<?php
$query44 = "SELECT DISTINCT category FROM meals ";
$result44 = mysql_query($query44)
or die ("Couldn't execute query44.");
while ($row44 = mysql_fetch_array($result44,MYSQL_ASSOC))
{
?>
<div class="col-md-6 b-b b-r" style="border:none;">
<a href="meal.php?category=<?php echo $row44['category']; ?>" class="block padder-v hover">
<span class="i-s i-s-2x pull-left m-r-sm">
<i class="i i-hexagon2 i-s-base text-info hover-rotate"></i>
<i class="fa fa-coffee i-1x text-white"></i>
</span>
<span class="clear">
<span class="h3 block m-t-xs text-info"><?php echo $row44['category']; ?></span>
</span>
</a>
</div>
<?php
}
?>
</div>
</div>
</div>
<?php include("footer.inc.php"); ?>