Jazz in Dnipropetrowsk 2002"; $weiter = "weiter"; $vorher = "zurück"; // Anzahl Zeilen, Datendatei etc. $hauptdatei = "festival.php"; $data_file = "festival.txt"; $thumbnail_dir = "klein/"; $num_rows = 3; $photos_per_row = 3; $photos = file($data_file); $total_photos = sizeof($photos); $photos_per_page = $num_rows * $photos_per_row; //check to see if the start variable exists in the URL. //If not, then the user is on the first page - set start to 0 if(!isSet($start)) { $start = 0; } //init i to where it needs to start in the photos array $i = $start; $prev_start = $start - $photos_per_page; $next_start = $start + $photos_per_page; // erste Zeile der Tabelle mit Ueberschrift // danach Beginn der nächsten Tabelle print ("
$ueberschrift

"); print (""); for ($row=0; $row < $num_rows; $row++){ print("\n"); for ($col=0; $col < $photos_per_row; $col++){ if($i < $total_photos){ // Url und Titeltext trennen: $titel1 = strtok($photos[$i],"+") ; $titel2 = strtok("+") ; $thumbnail = $thumbnail_dir.trim($titel1); $thumb_image_size = getimagesize($thumbnail); $image_size = getimagesize(trim($titel1)); // wenn kein Titel, dann andere Ausgabe if(!empty($titel2)) { print("\n"); } else { print("\n"); } } else { print("\n"); } $i++; } print("\n"); } //print out navigation links print ("
 
\n"); if(($start == 0) && ($next_start < $total_photos)){ //you're at the beginning of the photo gallery ?>  » 0) && ($next_start < $total_photos)){ //you're in the middle of the photo gallery ?>
«   |   » $total_photos)){ //you're in a photo gallery with only one page of photos ?> «