You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
695 B

<?php
require_once "lib/widgets.php";
require_once "data/images.php";
include "includes/modal.php";
$search = $_GET["text"] ?? "";
$search = trim($search);
$search = strtolower($search);
if (empty($search)) {
echo '<div class="alert alert-warning" role="alert">Neplatné klíčové slovo.</div>';
}
else {
echo "<p class='lead'>Výsledky hledání pro klíčové slovo: $search</p>";
echo '<div class="row">';
for ($i = 0; $i < count($images); $i++) {
$keywords = $images[$i]["keywords"];
if (!empty($search)) {
if (!in_array($search, $keywords)) {
continue;
}
}
tile_image($images[$i]["file"], $images[$i]["label"], $i);
}
echo '</div>';
}