include_once 'settings.php';
$path_to_menu = "./$top_level_menu_path";
$album_path = "./files/photos/";
if(isset($_GET['album']))
$album_path = $album_path . $_GET['album'] . "/";
$album_dir = dir($album_path);
$image_files = array();
$albums = array();
$album_names = array();
$dir_count = 0;
$file_count = 0;
while($entry = $album_dir->read())
{
if($entry != "." && $entry != ".." && substr($entry, 0, 1) != "." && $entry != "album.jpg")
{
if(is_dir("$album_path$entry"))
{
$albums[$dir_count] = $_GET['album'] . "/" . $entry;
$album_names[$dir_count] = $entry;
$album_names[$dir_count] = $link->GetAlbumName($entry);
if($album_names[$dir_count] == null || $album_names[$dir_count] == "")
$album_names[$dir_count] = $entry;
$dir_count++;
}
else if(is_file("$album_path$entry"))
{
$image_files[$file_count] = $entry;
$file_count++;
}
}
}?>
Fotos - Stuntreitschule.at
include './' . $top_level_menu_path . 'menu_header_inc.php'; ?>
include './' . $top_level_menu_path . 'menu.php'; ?>
Fotos
if(isset($_GET['photo']))
{
$image_file = $album_path . $image_files[$_GET['photo']];
echo "";
if($_GET['photo'] > 0)
echo "";
echo "Zurück";
if($_GET['photo'] > 0)
echo "";
echo " ";
if(($_GET['photo'] + 1) < $file_count)
echo "";
echo "Weiter";
if(($_GET['photo'] + 1) < $file_count)
echo "";
echo " |
";
echo "";
echo " |
";
echo "";
$row = $link->GetPhotoDescription($_GET['album'] . "/" . $image_files[$_GET['photo']]);
echo $row['description'];
echo " |
";
}
else
{
for($i=0;$i<$dir_count;$i++)
{
if($i % $albums_per_row == 0)
{
if($i > 0)
echo "";
echo "";
}
$image_file = "./images/default_album.gif";
if(is_file($album_path . $albums[$i] . "/album.jpg"))
$image_file = $album_path . $albums[$i] . "/album.jpg";
echo " " . $album_names[$i] . " | ";
}
if($dir_count > 0)
echo "
";
echo "
";
echo "
";
echo "
";
$i = 0;
foreach($image_files as $image)
{
if($i % $photos_per_row == 0)
{
if($i > 0)
echo "";
echo "";
}
$image_file = $album_path . $image;
echo "";
$row = $link->GetPhotoDescription($_GET['album'] . "/" . $image);
echo " " . $row['description'];
echo " | ";
$i++;
}
}
?>