Name: Anonymous 2006-12-19 19:45
what script do they run?
and if its custom made is there anything similar in php?
and if its custom made is there anything similar in php?
<?
# COPYRIGHT ANONYMOUS IN /LOUNGE/
# YOU MAY DO WHAT YOU WANT WITH THIS. MOER LIEK PUBLIC DOMAIN RIGHT?
$IMAGEFOLDER = "my_images";
$images = array();
$dir = opendir($IMAGEFOLDER);
while ($file = readdir($dir)) {
if (ereg("jpg$", $file)) {
$images[] = $file;
}
}
# Set current_image to selected image, if not selected, to last.
$current_image = null;
if (isset($_GET['n'])) {
$current_image = $_GET['n'];
}
if (isset($_GET['r'])) {
$current_image = rand(0, count($images));
}
if (!is_numeric($current_image)) {
$current_image = count($dir) - 1;
}
?>
<h1>Welcome to my websight!</h1>
<div>
<a href="index.php?n=0">First</a> -
<?
if ($current_image != 0) {
$prev = $current_image - 1;
print "<a href=\"index.php?n=$prev\">Prev</a> - ";
}
else {
print "Prev - ";
}
?>
<a href="index.php?r=y">Random</a> -
<?
if ($current_image != (count($images) - 1)) {
$next = $current_image + 1;
print "<a href=\"index.php?n=$next\">Next</a> - ";
}
else {
print "Next - ";
}
print '<a href="index.php?n=' . (count($images) - 1) . '">Last</a>';
print "</div">
print "<div><img src=\"$IMAGEFOLDER/" . $images[$current_image] . "\" alt=\"\" /></div>";
?>
if (ereg("jpg$", $file)) {
if (ereg("(jpg|png|gif|jpeg)$", $file)) {