PHP-Code:
$html = '/gallery/';
$path = '/www/example.com/html' . $html;
$dir = realpath($path . $_GET['event']);
if (!strstr($dir, $path)) {
echo '<h1>verpiss dich!</h1>';
exit;
}
if (!is_dir($dir)) {
echo 'Kein solches Verzeichnis!';
exit;
}
$h = dir($dir);
while ($entry = $h->read()) {
if (is_file($dir . DIRECTORY_SEPARATOR . $entry) &&
$entry{0} != '.') {
echo '<img src="'. $html . $_GET['event'] .
'/' . $entry .'" />' . "\n";
}
}
$h->close();
...ungetested...
~