= $PAGES){ $ERROR404 = 'page too high'; require_once('dis_404.php'); } // check url $canonical_url = $STRECKE['url_base'].$STRECKE['strecke_id'].'s'.($PAGE > 0 ? ($PAGE+1) : '').'.html'; if($_SERVER['REQUEST_URI'] != $canonical_url){ header('HTTP/1.1 301 Moved Permanently'); header('Location: '.$canonical_url); die(); } /* ** if no index: display first foto */ if(!$STRECKE['index']){ header('Location: '.$STRECKE['foto_ids'][0].'.html'); die(); } header('X-Pictools-Log: '.$MANDANT[$_SERVER['SERVER_NAME']][0].';strecke;'.$STRECKE['strecke_id']); // generate all thumbnails $FOTOS = array(); for($i=$PAGE*$PicsPerPage; $i<($PAGE+1)*$PicsPerPage; $i++){ if(isset($STRECKE['foto_ids'][$i])){ $FOTOS[] = ''; // $FOTOS[] = ''; } } // insert werbung if($WERBUNG['index'] != ''){ array_splice($FOTOS, mt_rand(0, count($FOTOS)), 0, '
'.$WERBUNG['index'].'
'); } // add empty elements while(count($FOTOS) < 16){ $FOTOS[] = ''; } $out = ''; $out .= ''; for($j=0; $j<4; $j++){ $out .= ''; for($i=0; $i<4; $i++){ $out .= ''; if($i<3){ $out .= ''; } } $out .= ''; if($j<3){ $out .= ''; } } $out .= display_timeline(7, $PAGE/ceil($STRECKE['fotos']/$PicsPerPage-1)); if($STRECKE['timeline']){ $REPLACE['%%TITEL%%'] .= ' — '.$STRECKE['timeline_frames'][$PAGE*$PicsPerPage].' - '.$STRECKE['timeline_frames'][$PAGE*$PicsPerPage+$PicsPerPage-1]; } $out .= ''; if($PAGES > 1){ if($STRECKE['timeline']){ }else{ $out .= ''; } $out .= ''; } $out .= ''; $REPLACE['%%LIST%%'] = $out; $REPLACE['%%PIC-NUM%%'] = $PAGE+1; $REPLACE['%%PIC-COUNT%%'] = $PAGES; $REPLACE['%%LINK-PREV%%'] = $STRECKE['strecke_id'].'s'.($PAGE == 0 ? ($PAGES) : $PAGE).'.html'; $REPLACE['%%LINK-NEXT%%'] = $STRECKE['strecke_id'].'s'.($PAGE+1 == $PAGES ? '1' : ($PAGE+2)).'.html'; $REPLACE['%%TAGS%%'] = implode(', ', $tags_out); output_page(); // debug //echo '
'.htmlspecialchars(var_export(array($PAGE,$WERBUNG,$STRECKE,$_SERVER['SERVER_NAME']),true));

?>
'.$FOTOS[$j*4+$i].'
Tags: %%TAGS%%