Move to krk.tojnar.cz subdomain
for now.
This commit is contained in:
30
index.php
30
index.php
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
preg_match('(^/krk/(?:(?P<lang>en|de)/)?(?P<page>.*?)(\.html)?$)', $_SERVER['REQUEST_URI'] ?? '', $match);
|
||||
preg_match('(^/(?:(?P<lang>en|de)/)?(?P<page>.*?)(\.html)?$)', $_SERVER['REQUEST_URI'] ?? '', $match);
|
||||
$lang = empty($match['lang']) ? 'cs' : $match['lang'];
|
||||
$page = $match['page'] ?? '';
|
||||
|
||||
@@ -8,15 +8,15 @@ ob_start();
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<link type="image/png" href="/krk/images/logo_krk16.png" rel="shortcut icon">
|
||||
<link rel="stylesheet" type="text/css" href="/krk/highslide4/highslide.css">
|
||||
<link rel="stylesheet" href="/krk/style.css" type="text/css">
|
||||
<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">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<script type="text/javascript" src="/krk/simple.js"></script>
|
||||
<script type="text/javascript" src="/krk/highslide4/highslide-with-gallery.js"></script>
|
||||
<script type="text/javascript" src="/simple.js"></script>
|
||||
<script type="text/javascript" src="/highslide4/highslide-with-gallery.js"></script>
|
||||
<script type="text/javascript">
|
||||
hs.graphicsDir = '/krk/highslide4/graphics/';
|
||||
hs.graphicsDir = '/highslide4/graphics/';
|
||||
hs.align = 'center';
|
||||
hs.transitions = ['expand', 'crossfade'];
|
||||
hs.outlineType = 'rounded-white';
|
||||
@@ -135,10 +135,10 @@ echo '<span class="floatright">';
|
||||
if (file_exists(__DIR__ . "/pages/$page-de.php") || file_exists(__DIR__ . "/pages/$pageFileName-de.php")) {
|
||||
if (file_exists(__DIR__ . "/pages/$pageFileName-de.php")) {
|
||||
$lngc = 'de';
|
||||
$icona = "<a href=\"/krk/$lngc/$page\"><img src=\"/images/" . $lngc . 'f.png" alt=""></a>';
|
||||
$icona = "<a href=\"/$lngc/$page\"><img src=\"/images/" . $lngc . 'f.png" alt=""></a>';
|
||||
} else {
|
||||
$lngc = 'de';
|
||||
$icona = "<a href=\"/krk/$lngc/" . htmlspecialchars($page) . '.html"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
$icona = "<a href=\"/$lngc/" . htmlspecialchars($page) . '.html"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
}
|
||||
|
||||
if ($lang == 'de') {
|
||||
@@ -150,10 +150,10 @@ if (file_exists(__DIR__ . "/pages/$page-de.php") || file_exists(__DIR__ . "/page
|
||||
if (file_exists('pages/' . htmlspecialchars($page) . '-en.php') || file_exists('pages/' . $pageFileName . '-en.php')) {
|
||||
if (file_exists('pages/' . $pageFileName . '-en.php')) {
|
||||
$lngc = 'en';
|
||||
$icona = "<a href=\"/krk/$lngc/" . htmlspecialchars($page) . '"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
$icona = "<a href=\"/$lngc/" . htmlspecialchars($page) . '"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
} else {
|
||||
$lngc = 'en';
|
||||
$icona = "<a href=\"/krk/$lngc/" . htmlspecialchars($page) . '.html"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
$icona = "<a href=\"/$lngc/" . htmlspecialchars($page) . '.html"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
}
|
||||
if ($lang == 'en') {
|
||||
echo '';
|
||||
@@ -162,7 +162,7 @@ if (file_exists('pages/' . htmlspecialchars($page) . '-en.php') || file_exists('
|
||||
}
|
||||
} elseif ($page === '' && file_exists('pages/krk_default-en.php')) {
|
||||
$lngc = 'en';
|
||||
$icona = "<a href=\"/krk/$lngc/\"><img src=\"/images/" . $lngc . 'f.png" alt=""></a>';
|
||||
$icona = "<a href=\"/$lngc/\"><img src=\"/images/" . $lngc . 'f.png" alt=""></a>';
|
||||
if ($lang == 'en') {
|
||||
echo '';
|
||||
} else {
|
||||
@@ -172,10 +172,10 @@ if (file_exists('pages/' . htmlspecialchars($page) . '-en.php') || file_exists('
|
||||
if (file_exists('pages/' . htmlspecialchars($page) . '.php') || file_exists('pages/' . $pageFileName . '.php')) {
|
||||
if (file_exists('pages/' . $pageFileName . '.php')) {
|
||||
$lngc = '';
|
||||
$icona = '<a href="/krk/' . htmlspecialchars($page) . '"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
$icona = '<a href="/' . htmlspecialchars($page) . '"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
} else {
|
||||
$lngc = '';
|
||||
$icona = '<a href="/krk/' . htmlspecialchars($page) . '.html"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
$icona = '<a href="/' . htmlspecialchars($page) . '.html"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
}
|
||||
|
||||
if ($lang == 'cs') {
|
||||
@@ -186,7 +186,7 @@ if (file_exists('pages/' . htmlspecialchars($page) . '.php') || file_exists('pag
|
||||
}
|
||||
if ($lang == 'en' && ($page === '' || $page === 'krk_default')) {
|
||||
$lngc = '';
|
||||
$icona = '<a href="/krk/"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
$icona = '<a href="/"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
echo $icona;
|
||||
}
|
||||
echo '</span>';
|
||||
|
||||
Reference in New Issue
Block a user