PHP-Logo
Druckansicht von http://www.php-homepage.de/scripts/source_57.html

PHP-Logo
[ Main Menue ]
Homepage
Downloads
Artikel
Scripts
Forum
PHP-Manual
Links
News
Freelancer
Bücher
RuDolF
Suche
Misc
Über diese Seite
Kontakt
Wunschzettel
MyGuestbook
*
[ Suche ]
*
[ Partner ]


Domain Webhosting
*
[ Partner Sites ]
Dynamic-Webpages
PHP-Center
PHP-Welt
phpUG.de
Random Link
*
[ Autoren gesucht! ]
PHP-Homepage.de sucht laufend Autoren für News und Artikel
Interesse?
*

Follow on Twitter - @phphomepage

RSS Feed blogoscoop

[Start] [Suche] [Neue Einträge

Dynamische Bilder Gallery

<b> gallery.php </b>

<?php
# Save as gallery.php
# Script by Roger Murer,r.murer@tiscalinet.ch

#configuration
#specify subdirectory with a / at the end
$subdir = "gallerien/";
#Thumpnail directory
$thumpdir = "thump";
#configuration end

print "<h1 align=\"center\"><strong><u>".ucwords($gal)."</u></strong></h1><center>\n";

$verzeichnis = opendir("./".$subdir.$gal);
while($img = readdir($verzeichnis))
{
$parts = explode(".", $img);
if(($parts[1] == "gif") OR ($parts[1] == "jpg") OR ($parts[1] == "png"))
{
$images[] = $img;
}
}
closedir($verzeichnis);

if (count($images) > 0)
{
foreach ($images as $image)
{
print "<a href=\"bild.php?image=".$image."&gal=".$gal."\" target=\"main\"
onmouseover=\"self.status='
".$image."'; return true;\"
onmouseout=\"self.status=''; return true;\">
";
print "<img src=\"./".$subdir.$gal."/".$thumpdir."/tn_".$image."\" alt=\"$image\"
border=\"0\"></a>\n
";
}
}
else
{
print "<b> Sorry, no Images available in this gallery: ".$subdir.$gal."<b>\n";
}
?>

<hr>
<b> bild.php </b>

<?php

#Save as bild.php
# Script by Roger Murer r.murer@tiscalinet.ch

#configuration
#specifiy your subdirectory with a / at the end
$subdir = "gallerien/";
#configuration end

print "<div align=\"center\">\n";
print "<img src=\"./".$subdir.$gal."/".$image."\" alt=\"".$image."\"><br>\n";

$verzeichnis = opendir("./".$subdir.$gal);
while($img = readdir($verzeichnis))
{
$parts = explode(".", $img);
if(($parts[1] == "gif") OR ($parts[1] == "jpg") OR ($parts[1] == "png"))
{
$images[] = $img;
}
}
closedir($verzeichnis);

$trans = array_flip($images);
$pointer = $trans[$image];
$size = count($images);

if (($pointer -1) >= 0)
{
$previmage = $images[$pointer - 1];
print "<a href=\"bild.php?image=".$previmage."&gal=".$gal."\" target=\"main\"
onmouseover=\"self.status='Zurück'; return true;\"
onmouseout=\"self.status=''; return true;\">Bild zurück</a>\n
";
}

if (($pointer + 1) < $size)
{
$neximage = $images[$pointer + 1];

print "<a href=\"bild.php?image=".$neximage."&gal=".$gal."\" target=\"main\"
onmouseover=\"self.status='Vor'; return true;\" onmouseout=\"self.status='';
return true;\">Bild vor</a>\n
";
}

print "</div>";
?>
© Copyright 1999 - 2011 by Mark Kronsbein | Impressum | NutzungsbedingungenWeiterempfehlen | Seitenanfang
0.3784