Files
homepage/inhalte/rfoto.php
2023-12-31 09:35:34 +01:00

43 lines
1.2 KiB
PHP

<?php
if (isset($_GET['section'])) {
$path = "img/" . $_GET['section'] . "/";
$link = "index.php?section=" . $_GET['section'] . "&";
} else {
$path = "img/will/";
$link = "index.php?section=will&";
}
if (isset($_GET['t'])) {
$path .= $_GET['t'] . "/";
$link .= "t=" . $_GET['t'] . "&";
}
$ts = time();
if (isset($_GET['f'])) {
$pic = $path . $_GET['f'] . ".jpg";
echo "<div>";
echo " <img class=\"gross\" src=\"" . $pic . "?ts=" . $ts . "\" />\n";
echo "</div>\n";
echo "<br class=\"clear\" />\n";
echo "<div id=\"thumb\">\n";
} else {
for ($i = 0; $i < 10; $i++) {
$pic = $path . $i . ".jpg";
if (file_exists($pic)) {
echo "<div>";
echo " <img class=\"gross\" src=\"" . $pic . "?ts=" . $ts . "\" />\n";
echo "</div>\n";
echo "<br class=\"clear\" />\n";
echo "<div id=\"thumb\">\n";
break;
}
}
}
for ($i = 9; $i >= 0; $i--) {
$thumb = $path . $i . ".jpg";
if (file_exists($thumb)) {
$ref = $link . "f=$i";
echo " <a href=\"" , $ref . "\"><img src=\"" .$thumb . "?ts=" . $ts . "\" /></a>\n";
}
}