<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>10-5 Bilder der Wolfsburg Exkusion</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Style.css">
</head>
<body>
<a name=top />
<?php
// Konfiguration
$Dir = "Bilder"; // Der Ordnername, in dem Die Dateien liegen sollen
$ThumbDir = "Thumbs";
$Datname = "Wolfsburg_"; // VorSilbe vor der neuen Datei, zb. Bild_12.jpg
$Thumb_width = 150;
$Thumb_height = 113;
// Skript
$rep=opendir("$Dir");
$Count = 1;
$Picrow = 0;
echo("<table cellspacing=3>
<tr>
<th colspan=5>Klasse 10/5 Exkursion nach Wolfsburg</th>
</tr>
<tr>");
While ($file = readdir($rep))
{
$TypTest = explode(".", "$file");
if(is_file("$Dir/$file") && $TypTest[1] == "JPG")
{
if(!is_file("$ThumbDir/$file"))
{
// Thumb generieren
$info = getimagesize("$Dir/$file");
$image = imagecreatefromjpeg("$Dir/$file");
$Thumb = imagecreate($Thumb_width,$Thumb_height);
imagecopyresized($Thumb, $image, 0,0, 0,0,$Thumb_width,$Thumb_height, $info[0],$info[1]);
imagejpeg($Thumb,"$ThumbDir/$file",100);
}
// Bildausgabe
if($Picrow >= 4)
{
$Picrow = 0;
echo("</tr>
<tr>
");
}
echo("
<td><a href=\"".$Dir.$file."\" target=_top><img src=\"".$ThumbDir."/".$file."\" border=0 /></a></td>
");
$Picrow++;
// Counter erhoehen
$Count++;
}
}
closedir($rep);
clearstatcache();
echo("</tr><td colspan=5><br />".($Count-1)." Bilder vorhanden <a href=#top>.:Nach oben:.</a></td></tr></table>");
?>
</body>
</html>