Initial commit from online.
This commit is contained in:
45
inhalte/rfotorand.php
Normal file
45
inhalte/rfotorand.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?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']."&";
|
||||
}
|
||||
|
||||
if (isset($_GET['f'])) {
|
||||
$pic = $path.$_GET['f'].".jpg";
|
||||
echo " <img class=\"gross\" src=$pic />\n";
|
||||
echo "</div>\n";
|
||||
echo "<br class=\"clear\" />\n";
|
||||
echo "<div id=\"thumb\">\n";
|
||||
}
|
||||
else {
|
||||
$j = rand(0,1);
|
||||
$pic = $path.$j.".jpg";
|
||||
for ($i=0; $i<10; $i++) {
|
||||
if (file_exists($pic)) {
|
||||
echo " <img class=\"gross\" src=$pic />\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 /></a>\n";
|
||||
}
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user