Add timestamps to images.

This commit is contained in:
2023-12-31 09:35:34 +01:00
parent 66af0a2bb7
commit 4da5fc3f9c
11 changed files with 28 additions and 17 deletions

View File

@@ -5,11 +5,12 @@
$sql2 = 'SELECT ID FROM bilder ORDER BY ID';
$result2 = $db->query($sql2);
$foto = "";
$ts = time();
while ($nt2 = $result2->fetch_assoc()) {
$file = 'img/umgebung/bilder/' . $nt2['ID'] . '.jpg';
if (file_exists($file)) {
$foto = $nt2['ID'];
echo '<a href="index.php?section=umgebung&f=' . $nt2['ID'] . '"><img src="' . $file . '" /></a>';
echo '<a href="index.php?section=umgebung&f=' . $nt2['ID'] . '"><img src="' . $file . '?ts=' . $ts . '" /></a>';
}
}
?>
@@ -31,7 +32,7 @@
$file = 'img/umgebung/bilder/' . $foto . '.jpg';
echo "<h2>Bildergalerie</h2>\n";
echo "<h3>$nt1[Head]</h3>\n";
echo '<img src="' . $file . '" />';
echo '<img src="' . $file . '?ts=' . $ts . '" />';
?>