execute();
$query = $stmt->get_result();
while ($image = mysqli_fetch_array($query)) {
// Getting thumbnail
if (file_exists("images/thumbnails/".$image['imagename'])) {
$image_path = "images/thumbnails/".$image['imagename'];
} else {
$image_path = "images/".$image['imagename'];
}
// Check for NSFW tag
if (str_contains($image['tags'], "nsfw")) {
echo "
";
echo "
NSFW";
echo "
";
echo "
";
} else {
echo "
";
echo "
";
echo "
";
}
}
}
?>