-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbrowseImages.php
More file actions
57 lines (54 loc) · 2.19 KB
/
browseImages.php
File metadata and controls
57 lines (54 loc) · 2.19 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
<?php
require_once("php/browseImages/browseImages.class.php");
$images = new BrowseImages();
?>
<!doctype html>
<html lang="en">
<head>
<?php include("php/head.php"); ?>
<title>Browse Travel Images</title>
<script src="js/filterImages.js"></script>
</head>
<body>
<?php include("php/header.php"); ?>
<main class="container mt-4">
<div class="row">
<div class="col-12 order-last col-md-3 order-md-first">
<?php include("php/home/sidebar.inc.php") ?>
</div>
<div class="col-12 col-md-9">
<div class="row">
<div class="col">
<h2>Filters</h2>
<form class="form-inline">
<select class="form-control bg-secondary text-light mt-1" id="countries">
<option selected value='all'>All Countries</option>
<?php
foreach ($images->getCountries() as $country) {
echo "<option>{$country}</option>";
}
?>
</select>
<select class="form-control bg-secondary text-light ml-sm-2 mt-1" id="continents">
<option selected value='all'>All Continents</option>
<?php
foreach ($images->getContinents() as $continent) {
echo "<option>{$continent}</option>";
}
?>
</select>
<button type="button" id="filter" class="btn btn-primary ml-sm-2 mt-1">Filter</button>
</form>
</div>
</div>
<div class="row mt-3">
<?php
$images->output();
?>
</div>
</div>
</div>
</main>
<?php include("php/footer.php"); ?>
</body>
</html>