Add timestamps to images.
This commit is contained in:
@@ -3,10 +3,11 @@
|
||||
<?php
|
||||
$sql1 = 'SELECT * FROM gb ORDER BY ID';
|
||||
$result1 = $db->query($sql1);
|
||||
$ts = time();
|
||||
|
||||
while ($nt1 = $result1->fetch_assoc()) {
|
||||
$datum = date("d.m.Y", strtotime($nt1['Datum']));
|
||||
echo "<img class=\"left\" src=\"img/umgebung/gb/" . $nt1['ID'] . ".jpg\" />\n";
|
||||
echo "<img class=\"left\" src=\"img/umgebung/gb/" . $nt1['ID'] . ".jpg?ts=" . $ts . "\" />\n";
|
||||
echo "<h3>" . $nt1['Autor'] . " schrieb am " . $datum . ":</h3>\n";
|
||||
echo "<p>" . nl2br($nt1['Text']) . "</p>\n";
|
||||
echo "<br class=\"clear\" />\n";
|
||||
|
||||
@@ -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 . '" />';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user