-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsoups.php
194 lines (156 loc) · 5.81 KB
/
soups.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<?php
session_start();
if (!isset($_SESSION['username'])) {
echo "<script type='text/javascript'>alert('You must login first');</script>";
header('location: login.php');
}
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,600,700" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/main.css">
<title>Soups</title>
<style>.banner-home {height: auto;padding-top: 187px;}</style>
</head>
<body>
<!-- Header section Start-->
<header class="top">
<nav id="navbar">
<!-- container Start-->
<div class="container">
<!--Row Start-->
<div class="row">
<div class="col-lg-4 col-xs-9">
<h2 >myKitchen <h2>
</div>
<div class="col-lg-8 col-xs-3">
</div>
</div>
<!--Row Ended-->
</div>
<!-- container Ended-->
</nav>
</header>
<!-- Header section Ended-->
<section class="banner-home"></section>
<!-- Banner section End-->
<!-- blog-single Section Start -->
<div id="blog-single">
<div class="container">
<p class="ses" data-aos="fade-left" data-aos-duration="500"><strong><?php echo $_SESSION['username']; ?></strong> Welcome at World of</p><br>
<h1 data-aos="fade-left" data-aos-duration="500">SOUPS</h1>
</div>
<hr/>
<?php
require_once "connection2.php";
echo"<title>Desserts</title>";
class items extends connection
{
function view_desserts()
{
parent::connect();
$sql = "SELECT * FROM items ";//WHERE category=dessert
$result=mysql_query($sql);
$num_of_rows=mysql_num_rows($result);
for($i=0; $i<$num_of_rows; $i++)
{
$row=mysql_fetch_array($result);
$arr[$i][0]=$row["id"];
$arr[$i][1]=$row["category"];
$arr[$i][2]=$row["name"];
$arr[$i][3]=$row["ingredients"];
$arr[$i][4]=$row["preparation"];
$arr[$i][5]="images/".$row["picture"];
}
for($i=0; $i<$num_of_rows; $i++)
{
//<?php echo $arr[$i][$j];
if($arr[$i][1]=="soup" )
{
?>
<div class="container">
<div class="heading">
<h2> <?php echo $arr[$i][2];?> </h2>
</div>
<div class="row" data-aos="fade-up" data-aos-duration="700">
<div class="col-sm-12 col-lg-12 box">
<img src="<?php echo $arr[$i][5]; ?>" alt="displaying error" width=557px height=480px class="blog-single .img-thumbnail image">
<?php
$string = $arr[$i][3];
$str_arr = preg_split ("/\n/", $string);
foreach($str_arr as $value){
print $value;
echo "<br>";
}
?>
<div class="qutation">
<h4><?php
$string = $arr[$i][4];
$str_arr = preg_split ("/\n/", $string);
foreach($str_arr as $value){
print $value;
echo "<br>";
echo "<br>";
}
?></h4>
</div>
</div>
</div>
</div>
<?php
echo"<br><br>";
}
//echo"<hr>";
}
parent::disconnect();
}
}
$obj= new items;
echo $obj->view_desserts();
?>
</div>
<!-- Blog_single Section End -->
<!-- Footer -->
<!-- Footer -->
<footer class="page-footer font-small indigo">
<div class="gradient">
<div class="container">
<nav class="navbar navbar-expand-sm navbar-light">
<a class="nav-link text-white active" href="home.html">
<h1>myKitchen</h1>
</a>
<div class="footer-nav ml-md-auto">
<ul class="navbar-nav ml-sm-auto">
<li class="nav-item">
<a class="nav-link text-white active" href="home.php"><h4>Home</h4>
</a>
</li>
<li class="nav-item">
<a class="nav-link text-white" href="about.html"><h4>About</h4></a>
</li>
</ul>
</div>
</nav>
</div>
</footer>
<!-- Footer -->
<!-- Footer -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<!-- Custom JavaScript -->
<script src="js/animate.js"></script>
<script src="js/custom.js"></script>
</body>
</html>