-
Notifications
You must be signed in to change notification settings - Fork 1
/
middleware-party-search.php
46 lines (38 loc) · 1.39 KB
/
middleware-party-search.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
<?php
require_once "./app/models/Parties.php";
function displaySuggestedParties($party)
{
?>
<li>
<a class="uk-accordion-title"><?= $party->name ?></a>
<div class="uk-accordion-content">
<span class="uk-margin-small-right" uk-icon="location"></span><b>Locatie </b><?= $party->city ?><br>
<span class="uk-margin-small-right" uk-icon="clock"></span><b>Datum & Deuren </b><?= date('d/m/Y h:i', strtotime($party->start_time_party)) ?><br>
<span class="uk-margin-small-right" uk-icon="warning"></span><b>Leeftijd </b><?= $party->age_restriction ?>+<br>
<a href="./party.php?party=<?= $party->party_id ?>">
<div class="uk-button uk-button-secondary uk-margin-small-top">
Bezoek pagina
</div>
</a>
</div>
</li>
<?php
}
if (isset($_POST['value'])) {
$parties = Parties::searchParty($_POST['value']);
if (count($parties) == 0) {
echo "Geen fuiven gevonden.";
} else {
for ($i = 0; $i < count($parties); $i++)
displaySuggestedParties($parties[$i]);
?>
<div class=" uk-margin-medium-top uk-text-center">
<a class="uk-link-reset" href="./parties.php">
Geavanceerd zoeken
<span uk-icon="icon: arrow-right"></span>
</a>
</div>
<?php
}
}
?>