2022-01-14 11:52:46 +01:00
< ? php
2022-01-19 00:57:24 +01:00
preg_match ( '(^/(?:(?P<lang>en|de)/)?(?P<page>.*?)(\.html)?$)' , $_SERVER [ 'REQUEST_URI' ] ? ? '' , $match );
2022-01-18 12:18:31 +01:00
$lang = empty ( $match [ 'lang' ]) ? 'cs' : $match [ 'lang' ];
$page = $match [ 'page' ] ? ? '' ;
2022-01-15 00:23:31 +01:00
ob_start ();
2022-01-14 11:52:46 +01:00
?>
2022-01-14 10:22:22 +01:00
<! DOCTYPE HTML PUBLIC " -//W3C//DTD HTML 4.01 Transitional//EN " " http://www.w3.org/TR/html4/loose.dtd " >
< html >
< head >
2022-01-19 00:57:24 +01:00
< link type = " image/png " href = " /images/logo_krk16.png " rel = " shortcut icon " >
< link rel = " stylesheet " type = " text/css " href = " /highslide4/highslide.css " >
< link rel = " stylesheet " href = " /style.css " type = " text/css " >
2022-01-14 10:22:22 +01:00
< meta http - equiv = " Content-Style-Type " content = " text/css " >
< meta http - equiv = " Content-type " content = " text/html; charset=utf-8 " >
2022-01-19 00:57:24 +01:00
< script type = " text/javascript " src = " /simple.js " ></ script >
< script type = " text/javascript " src = " /highslide4/highslide-with-gallery.js " ></ script >
2022-01-14 10:22:22 +01:00
< script type = " text/javascript " >
2022-01-19 00:57:24 +01:00
hs . graphicsDir = '/highslide4/graphics/' ;
2022-01-14 10:22:22 +01:00
hs . align = 'center' ;
hs . transitions = [ 'expand' , 'crossfade' ];
hs . outlineType = 'rounded-white' ;
hs . wrapperClassName = 'controls-in-heading' ;
hs . fadeInOut = true ;
//hs.dimmingOpacity = 0.75;
// Add the controlbar
if ( hs . addSlideshow ) hs . addSlideshow ({
//slideshowGroup: 'group1',
interval : 5000 ,
repeat : false ,
useControls : true ,
fixedControls : false ,
overlayOptions : {
opacity : 1 ,
position : 'top right' ,
hideOnMouseOut : false
}
});
</ script >
2022-01-14 11:52:46 +01:00
< script type = " text/javascript " >
2022-01-14 10:48:52 +01:00
< ? php
2022-01-14 11:52:46 +01:00
if ( $lang == 'en' ) {
2022-01-14 10:22:22 +01:00
?>
hs . lang = {
cssDirection : 'ltr' ,
loadingText : 'Loading...' ,
loadingTitle : 'Click to cancel' ,
focusTitle : 'Click to bring to front' ,
fullExpandTitle : 'Expand to actual size (f)' ,
fullExpandText : 'Full size' ,
creditsText : 'Powered by <i>Highslide JS</i>' ,
creditsTitle : 'Go to the Highslide JS homepage' ,
previousText : 'Previous' ,
previousTitle : 'Previous (arrow left)' ,
nextText : 'Next' ,
nextTitle : 'Next (arrow right)' ,
moveTitle : 'Move' ,
moveText : 'Move' ,
closeText : 'Close' ,
closeTitle : 'Close (esc)' ,
resizeTitle : 'Resize' ,
playText : 'Play' ,
playTitle : 'Play slideshow (spacebar)' ,
pauseText : 'Pause' ,
2022-01-14 10:48:52 +01:00
pauseTitle : 'Pause slideshow (spacebar)' ,
2022-01-14 10:22:22 +01:00
number : 'Image %1 of %2' ,
restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
};
2022-01-14 10:48:52 +01:00
< ? php
2022-01-14 11:52:46 +01:00
} elseif ( $lang == 'de' ) {
2022-01-14 10:22:22 +01:00
?>
hs . lang = {
loadingText : 'Lade...' ,
loadingTitle : 'Klick zum Abbrechen' ,
focusTitle : 'Klick um nach vorn zu bringen' ,
fullExpandTitle : 'Zur Originalgröße erweitern' ,
fullExpandText : 'Vollbild' ,
creditsText : 'Powered by <i>Highslide JS</i>' ,
creditsTitle : 'Gehe zur Highslide JS Homepage' ,
previousText : 'Voriges' ,
previousTitle : 'Voriges (Pfeiltaste links)' ,
nextText : 'Nächstes' ,
nextTitle : 'Nächstes (Pfeiltaste rechts)' ,
moveTitle : 'Verschieben' ,
moveText : 'Verschieben' ,
closeText : 'Schließen' ,
closeTitle : 'Schließen (Esc)' ,
resizeTitle : 'Größe wiederherstellen' ,
playText : 'Abspielen' ,
playTitle : 'Slideshow abspielen (Leertaste)' ,
pauseText : 'Pause' ,
pauseTitle : 'Pausiere Slideshow (Leertaste)' ,
restoreTitle : 'Klick um das Bild zu schließen, klick und ziehe um zu verschieben. Benutze Pfeiltasten für vor und zurück.'
2022-01-14 10:48:52 +01:00
};
< ? php
} else {
2022-01-14 10:22:22 +01:00
?>
hs . lang = {
loadingText : 'Načítá se...' ,
loadingTitle : 'Klikněte pro zrušení' ,
focusTitle : 'Klikněte pro přenesení do popředí' ,
fullExpandTitle : 'Zvětšit na původní velikost' ,
fullExpandText : 'Plná velikost' ,
creditsText : 'Powered by <i>Highslide JS</i>' ,
creditsTitle : 'Přejít na stránky Highslide JS' ,
previousText : 'Předchozí' ,
previousTitle : 'Předchozí (šipka vlevo)' ,
nextText : 'Další' ,
nextTitle : 'Další (šipka vpravo)' ,
moveTitle : 'Přesunout' ,
moveText : 'Přesunout' ,
closeText : 'Zavřít' ,
closeTitle : 'Zavřít (esc)' ,
resizeTitle : 'Změnit velikost' ,
playText : 'Přehrát' ,
playTitle : 'Přehrát slideshow (mezerník)' ,
pauseText : 'Pozastavit' ,
pauseTitle : 'Pozastavit slideshow (mezerník)' ,
restoreTitle : 'Klikněte pro zavření obrázku, klikněte a táhněte pro jeho přesunutí. Použijte šipky na klávesnici pro přesun na další a předchozí.'
};
< ? php
2022-01-14 10:48:52 +01:00
}
2022-01-14 10:22:22 +01:00
?>
</ script >
2022-01-14 10:48:52 +01:00
< title >< ? php include './pages/title_krk.php' ; ?> </title>
2022-01-14 10:22:22 +01:00
</ head >
< body >
< div class = " content " >
2022-01-14 10:48:52 +01:00
< div class = " header " >< span class = " title " >< ? php include './pages/title_krk.php' ; ?> </span><br><span class="slogan"><?php include './pages/slogan.php'; ?></span>
2022-01-14 10:22:22 +01:00
< ? php
2022-01-18 12:18:31 +01:00
$pageFileName = preg_replace ( '(([^/]+)/$)' , '\1/\1' , $page );
2022-01-14 10:48:52 +01:00
echo '<span class="floatright">' ;
2022-01-18 12:18:31 +01:00
if ( file_exists ( __DIR__ . " /pages/ $page -de.php " ) || file_exists ( __DIR__ . " /pages/ $pageFileName -de.php " )) {
if ( file_exists ( __DIR__ . " /pages/ $pageFileName -de.php " )) {
2022-01-14 10:48:52 +01:00
$lngc = 'de' ;
2022-01-19 00:57:24 +01:00
$icona = " <a href= \" / $lngc / $page\ " >< img src = \ " /images/ " . $lngc . 'f.png" alt=""></a>' ;
2022-01-14 10:48:52 +01:00
} else {
$lngc = 'de' ;
2022-01-19 00:57:24 +01:00
$icona = " <a href= \" / $lngc / " . htmlspecialchars ( $page ) . '.html"><img src="/images/' . $lngc . 'f.png" alt=""></a>' ;
2022-01-14 10:48:52 +01:00
}
2022-01-14 10:22:22 +01:00
2022-01-14 11:52:46 +01:00
if ( $lang == 'de' ) {
2022-01-14 10:48:52 +01:00
echo '' ;
} else {
echo $icona ;
}
2022-01-14 10:22:22 +01:00
}
2022-01-18 12:18:31 +01:00
if ( file_exists ( 'pages/' . htmlspecialchars ( $page ) . '-en.php' ) || file_exists ( 'pages/' . $pageFileName . '-en.php' )) {
if ( file_exists ( 'pages/' . $pageFileName . '-en.php' )) {
2022-01-14 10:48:52 +01:00
$lngc = 'en' ;
2022-01-19 00:57:24 +01:00
$icona = " <a href= \" / $lngc / " . htmlspecialchars ( $page ) . '"><img src="/images/' . $lngc . 'f.png" alt=""></a>' ;
2022-01-14 10:48:52 +01:00
} else {
$lngc = 'en' ;
2022-01-19 00:57:24 +01:00
$icona = " <a href= \" / $lngc / " . htmlspecialchars ( $page ) . '.html"><img src="/images/' . $lngc . 'f.png" alt=""></a>' ;
2022-01-14 10:48:52 +01:00
}
2022-01-14 11:52:46 +01:00
if ( $lang == 'en' ) {
2022-01-14 10:48:52 +01:00
echo '' ;
} else {
echo $icona ;
}
2022-01-14 11:52:46 +01:00
} elseif ( $page === '' && file_exists ( 'pages/krk_default-en.php' )) {
2022-01-14 10:48:52 +01:00
$lngc = 'en' ;
2022-01-19 00:57:24 +01:00
$icona = " <a href= \" / $lngc / \" ><img src= \" /images/ " . $lngc . 'f.png" alt=""></a>' ;
2022-01-14 11:52:46 +01:00
if ( $lang == 'en' ) {
2022-01-14 10:48:52 +01:00
echo '' ;
} else {
echo $icona ;
}
2022-01-14 10:22:22 +01:00
}
2022-01-18 12:18:31 +01:00
if ( file_exists ( 'pages/' . htmlspecialchars ( $page ) . '.php' ) || file_exists ( 'pages/' . $pageFileName . '.php' )) {
if ( file_exists ( 'pages/' . $pageFileName . '.php' )) {
2022-01-14 10:48:52 +01:00
$lngc = '' ;
2022-01-19 00:57:24 +01:00
$icona = '<a href="/' . htmlspecialchars ( $page ) . '"><img src="/images/' . $lngc . 'f.png" alt=""></a>' ;
2022-01-14 10:48:52 +01:00
} else {
$lngc = '' ;
2022-01-19 00:57:24 +01:00
$icona = '<a href="/' . htmlspecialchars ( $page ) . '.html"><img src="/images/' . $lngc . 'f.png" alt=""></a>' ;
2022-01-14 10:48:52 +01:00
}
2022-01-14 10:22:22 +01:00
2022-01-14 11:52:46 +01:00
if ( $lang == 'cs' ) {
2022-01-14 10:48:52 +01:00
echo '' ;
} else {
echo $icona ;
}
2022-01-14 10:22:22 +01:00
}
2022-01-15 00:23:31 +01:00
if ( $lang == 'en' && ( $page === '' || $page === 'krk_default' )) {
2022-01-14 10:48:52 +01:00
$lngc = '' ;
2022-01-19 00:57:24 +01:00
$icona = '<a href="/"><img src="/images/' . $lngc . 'f.png" alt=""></a>' ;
2022-01-14 10:48:52 +01:00
echo $icona ;
2022-01-14 10:22:22 +01:00
}
2022-01-14 10:48:52 +01:00
echo '</span>' ;
2022-01-14 10:22:22 +01:00
?>
</ div >
< div class = " top-menu " >
< ? php
2022-01-14 11:52:46 +01:00
if ( $lang === 'cs' ) {
2022-01-14 10:48:52 +01:00
include './pages/krk_topmenu.php' ;
2022-01-14 11:52:46 +01:00
} elseif ( $lang === 'en' && file_exists ( './pages/krk_topmenu-en.php' )) {
2022-01-14 10:48:52 +01:00
include './pages/krk_topmenu-en.php' ;
2022-01-14 10:22:22 +01:00
}
?>
</ div >
< div class = " sidebar " >< div class = " sidebar-content " >
< ul >
2022-01-14 10:48:52 +01:00
< ? php
2022-01-14 11:52:46 +01:00
if ( str_contains ( $page , 'mcr_2009' ) && $lang === 'en' ) {
2022-01-14 10:48:52 +01:00
include './pages/mcr_2009/menumcr_2009-en.php' ;
2022-01-14 11:52:46 +01:00
} elseif ( str_contains ( $page , 'mcr_2009' ) && $lang === 'de' ) {
2022-01-14 10:48:52 +01:00
include './pages/mcr_2009/menumcr_2009-de.php' ;
2022-01-14 11:52:46 +01:00
} elseif ( str_contains ( $page , 'mcr_2009' )) {
2022-01-14 10:48:52 +01:00
include './pages/mcr_2009/menumcr_2009.php' ;
} else {
2022-01-14 11:52:46 +01:00
if ( $lang === 'cs' ) {
2022-01-14 10:48:52 +01:00
include './pages/menukrk.php' ;
} else {
include './pages/menukrk-en.php' ;
}
2022-01-14 10:22:22 +01:00
}
?>
</ ul >< br >< br >< br >
</ div ></ div >< div class = " main " >< div class = " main-content " >
2022-01-14 10:48:52 +01:00
< ? php
2022-01-14 11:52:46 +01:00
$escaped_page = str_replace ([ ')' , '(' , '\\' , '"' , " \ ' " , ';' , '{' , '}' , '$' , '[' , ']' , '<' , '>' ], '' , htmlspecialchars ( $page ));
if ( $page !== '' ) {
if ( $lang !== 'cs' ) {
$jazycek = '-' . $lang ;
2022-01-14 10:48:52 +01:00
} else {
$jazycek = '' ;
}
2022-01-18 12:18:31 +01:00
if ( $page == 'mcr_2009/' ) {
2022-01-14 10:48:52 +01:00
include " ./pages/mcr_2009/mcr_2009 $jazycek .php " ;
2022-01-18 12:18:31 +01:00
} elseif ( $page == 'mcr_2009/probihani_loucna/' ) {
2022-01-16 06:46:10 +01:00
include " ./pages/mcr_2009/probihani_loucna/probihani_loucna $jazycek .php " ;
2022-01-18 12:18:31 +01:00
} elseif ( $page == 'clanky/' ) {
2022-01-14 10:48:52 +01:00
include " ./pages/clanky/clanky $jazycek .php " ;
2022-01-15 08:21:33 +01:00
} elseif ( $lang === 'cs' && file_exists ( __DIR__ . " /pages/ $escaped_page .php " )) {
2022-01-14 10:48:52 +01:00
include " ./pages/ $escaped_page .php " ;
2022-01-15 08:21:33 +01:00
} elseif ( file_exists ( __DIR__ . " /pages/ $escaped_page - $lang .php " )) {
2022-01-14 11:52:46 +01:00
include " ./pages/ $escaped_page - $lang .php " ;
2022-01-14 10:48:52 +01:00
} else {
include __DIR__ . '/pages/404.php' ;
}
} else {
2022-01-14 11:52:46 +01:00
if ( $lang === 'cs' ) {
2022-01-14 10:48:52 +01:00
include './pages/krk_default.php' ;
} else {
include './pages/krk_default-en.php' ;
}
2022-01-14 10:22:22 +01:00
}
?>
</ div ></ div >
< div class = " footer " >
</ div >
</ div >
</ body >
</ html >