-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
370 lines (301 loc) · 14.3 KB
/
index.php
File metadata and controls
370 lines (301 loc) · 14.3 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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PetMatch | Re-Home & Adopt a Love</title>
<!--===========Bootstrap-5.3 CDN ============-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<!--===========Remixicon CDN ============-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.css"
integrity="sha512-OQDNdI5rpnZ0BRhhJc+btbbtnxaj+LdQFeh0V9/igiEPDiWE2fG+ZsXl0JEH+bjXKPJ3zcXqNyP4/F/NegVdZg=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!--=============Font Awesome CDN==========-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<!--=========== JavaScript link ============-->
<!--=========== Css style sheet link ============-->
<link rel="stylesheet" href="css/style.css">
<link rel="icon" type="image/x-icon" href="image/tabeicon.png">
<style>
.button button a {
text-decoration: none;
color: black;
}
</style>
</head>
<body>
<?php
include "inc/header.php";
?>
<!-- ====================== Image Slider start here=================== -->
<div class="container-fluid">
<div class="row">
<div class="slider">
<div class="list">
<div class="item">
<img src="./image/bg6.jpg" alt="">
<div class="content">
<div class="title">RE-HOME AND</div>
<div class="type">ADOPT A PET</div>
<div class="description">
Every Pet Deserves a Good Home. #Adoptlove
</div>
<div class="button">
<button><a href="rough.php">ADOPT</a> </button>
<!-- <a class="login-button" href="#">Login</a> -->
</div>
</div>
</div>
<div class="item">
<img src="./image/11.jpg" alt="">
<div class="content">
<div class="title">RE-HOME AND</div>
<div class="type">ADOPT A PET</div>
<div class="description">
Every Pet Deserves a Good Home. #Adoptlove
</div>
<div class="button">
<button><a href="rough.php">ADOPT</a> </button>
</div>
</div>
</div>
<div class="item">
<img src="./image/bg7.jpg" alt="">
<div class="content">
<div class="title">RE-HOME AND</div>
<div class="type">ADOPT A PET</div>
<div class="description">
Every Pet Deserves a Good Home. #Adoptlove
</div>
<div class="button">
<button><a href="rough.php">ADOPT</a> </button>
</div>
</div>
</div>
<div class="item">
<img src="./image/bg7.jpeg" alt="">
<div class="content">
<div class="title">RE-HOME AND</div>
<div class="type">ADOPT A PET</div>
<div class="description">
Every Pet Deserves a Good Home. #Adoptlove
</div>
<div class="button">
<button><a href="rough.php">ADOPT</a> </button>
</div>
</div>
</div>
<div class="item">
<img src="./image/bg5.jpg" alt="">
<div class="content">
<div class="title">RE-HOME AND</div>
<div class="type">ADOPT A PET</div>
<div class="description">
Every Pet Deserves a Good Home. #Adoptlove
</div>
<div class="button">
<button><a href="rough.php">ADOPT</a> </button>
</div>
</div>
</div>
<div class="item">
<img src="./image/bg9.jpg" alt="">
<div class="content">
<div class="title">RE-HOME AND</div>
<div class="type">ADOPT A PET</div>
<div class="description">
Every Pet Deserves a Good Home. #Adoptlove
</div>
<div class="button">
<button><a href="rough.php">ADOPT</a> </button>
</div>
</div>
</div>
</div>
<div class="thumbnail">
<div class="item">
<img src="./image/bg6.jpg" alt="">
</div>
<div class="item">
<img src="./image/11.jpg" alt="">
</div>
<div class="item">
<img src="./image/bg7.jpg" alt="">
</div>
<div class="item">
<img src="./image/bg7.jpeg" alt="">
</div>
<div class="item">
<img src="./image/bg5.jpg" alt="">
</div>
<div class="item">
<img src="./image/bg9.jpg" alt="">
</div>
</div>
<div class="nextPrevArrows">
<button class="prev">
< </button>
<button class="next"> > </button>
</div>
</div>
</div>
</div>
<!-- ====================== Image Slider Endss HERE=================== -->
<!-- ========================== adopt a pet button starts here ====================== -->
<div class="container-fluid heart-box">
<img src="image/border6.png" alt="Snow" style="width:100%;">
<div class="row heart text-dark">
<h1 class="fw-1 align-item-center justify-content-center text-center ">#AdoptLove</h1>
<p class="align-item-center justify-content-center text-center">
Approximately 1478 dogs & cats lose their lives every day on the roads in India. PetMatch is on a
mission to provide every dog, cat, and other pets a home before 2035. It’s just one of the many ways
PetMatch! gives back and helps you become a part of something larger. Join the PetMatchStar Community
and help set up pet houses in your surroundings for strays.
</p>
<div class="align-item-center justify-content-center text-center">
<a class="login-button mr-auto" href="rehome.php">Re-Home a Pet</a>
</div>
</div>
</div>
<!-- ========================== adopt a pet button ENDs here ====================== -->
<?php
include 'inc/cities.php';
?>
<!-- ========================== How its works section start here ====================== -->
<div class="container-fluid text-center htw"> <!-- htw = How it Works-->
<h2 style="font-weight: bold; margin-bottom: 50px;">How it Works?</h2>
<div class="row row-cols-1 row-cols-md-3 g-0 text-center">
<div class="col">
<div class=" h-100">
<i class="fa-solid fa-magnifying-glass fa-3x"></i>
<div class="card-body">
<h5 class="card-title fw-bold">Search</h5>
<p class="card-text">Simply enter your city start your search</p>
</div>
</div>
</div>
<div class="col">
<div class=" h-100">
<i class="fa-regular fa-comments fa-3x"></i>
<div class="card-body">
<h5 class="card-title fw-bold ">Meet</h5>
<p class="card-text">Schedule your appointment to meet the pet you love</p>
</div>
</div>
</div>
<div class="col">
<div class=" h-100">
<i class="fa-solid fa-basket-shopping fa-3x"></i>
<div class="card-body">
<h5 class="card-title fw-bold">Adopt</h5>
<p class="card-text">Finally adopt the pet you love</p>
</div>
</div>
</div>
</div>
</div>
<!-- ========================== How its works section ENDs here ====================== -->
<!-- Reveiw of Customers.............. -->
<?php
include "inc/database.php"; // Assuming this file contains your database connection information
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Query to retrieve feedback data
$sql = "SELECT * FROM feedback";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// Output container for carousel
echo '<section class="services-section common-section">';
echo '<div class="container text-center common-title fw-bold">';
echo '<h2 class="common-heading text-light pt-5 fw-bold">What Users Says <br> About us </h2>';
echo '<hr class="w-25 mx-auto" style="border: 1px solid">';
echo '</div>';
echo '<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">';
echo '<div class="carousel-indicators">';
$num_rows = $result->num_rows;
$num_carousel_items = ceil($num_rows / 3); // Calculate the number of carousel items needed
// Output carousel indicators
for ($i = 0; $i < $num_carousel_items; $i++) {
echo '<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="' . $i . '" class="' . ($i == 0 ? 'active' : '') . '" aria-current="true" aria-label="Slide ' . ($i + 1) . '"></button>';
}
echo '</div>';
echo '<div class="carousel-inner">';
// Reset result pointer to the beginning
$result->data_seek(0);
// Output carousel items
for ($j = 0; $j < $num_carousel_items; $j++) {
// Start carousel item
echo '<div class="carousel-item ' . ($j == 0 ? 'active' : '') . '">';
echo '<div class="container">';
echo '<div class="row g-5">';
// Output up to three cards per carousel item
for ($k = 0; $k < 3 && $row = $result->fetch_assoc(); $k++) {
// Output review content
echo '<div class="col-12 col-lg-4">';
echo '<div class="d-flex justify-content-center align-items-center">';
echo '<div class="card p-3" style="width: 18rem;">';
echo '<img src="' . $row["image"] . '" class="card-img-top" style="height: 200px;" alt="...">';
echo '<div class="card-body shadow">';
echo '<h5 class="card-title mb-3 fw-bold">' . $row["username"] . '</h5>';
echo '<p class="card-text">' . $row["message"] . '</p>';
echo '<div>';
// Output rating stars
for ($i = 1; $i <= 5; $i++) {
if ($i <= $row["rating"]) {
echo '<i class="fa fa-solid fa-star"></i>';
} else {
echo '<i class="far fa-star"></i>';
}
}
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '</div>';
}
echo '</div>';
echo '</div>';
echo '</div>';
}
echo '</div>';
// Output carousel controls
echo '<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">';
echo '<span class="carousel-control-prev-icon" aria-hidden="true"></span>';
echo '<span class="visually-hidden">Previous</span>';
echo '</button>';
echo '<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">';
echo '<span class="carousel-control-next-icon" aria-hidden="true"></span>';
echo '<span class="visually-hidden">Next</span>';
echo '</button>';
echo '</div>';
echo '</section>';
} else {
echo "0 results";
}
$conn->close();
?>
<script src="js/app.js"></script>
<script>
// Function to automatically move to the next slide
function nextSlide() {
document.querySelector('.next').click();
}
// Start the slider when the window loads
window.onload = function () {
// Automatically move to the next slide every 2 seconds
setInterval(nextSlide, 4000);
};
</script>
<?php
include "inc/footer.php";
?>
</body>
</html>