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

@@ -27,6 +27,7 @@ if ('will' == $_GET['t']) {
$ref = "index.php?section=fotos&t=" . $_GET['t'];
if (!isset($_GET['action'])) {
$ts = time();
echo "<p>Auf ein vorhandenes Bild klicken um es zu löschen<br />";
echo "Auf einen Platzhalter klicken um ein neues Bild hochzuladen</p>";
for ($i = 0; $i < 10; $i++) {
@@ -34,7 +35,7 @@ if (!isset($_GET['action'])) {
if (file_exists($pic)) {
$link = $ref . "&action=del&pic=" . $i;
echo "<a href=\"$link\">";
echo "<img style=\"margin: 20px 20px 20px 20px; border: 2px solid red;\" src=\"" . str_replace(__DIR__ . '/../../../public', '', $pic) . "\" width=\"100px\" height=\"100px\"/>";
echo "<img style=\"margin: 20px 20px 20px 20px; border: 2px solid red;\" src=\"" . str_replace(__DIR__ . '/../../../public', '', $pic) . "?ts=" . $ts . "\" width=\"100px\" height=\"100px\"/>";
} else {
$link = $ref . "&action=add&pic=" . $i;
echo "<a href=\"$link\">";