Format old PHP files
This commit is contained in:
223
mainkrk.php
223
mainkrk.php
@@ -42,8 +42,8 @@ pageTracker._trackPageview();
|
||||
|
||||
</script>
|
||||
<script type=\"text/javascript\">
|
||||
<?php
|
||||
if($_REQUEST[lang]=="en"):
|
||||
<?php
|
||||
if ($_REQUEST['lang'] == 'en') {
|
||||
?>
|
||||
hs.lang = {
|
||||
cssDirection: 'ltr',
|
||||
@@ -66,12 +66,12 @@ hs.lang = {
|
||||
playText : 'Play',
|
||||
playTitle : 'Play slideshow (spacebar)',
|
||||
pauseText : 'Pause',
|
||||
pauseTitle : 'Pause slideshow (spacebar)',
|
||||
pauseTitle : 'Pause slideshow (spacebar)',
|
||||
number : 'Image %1 of %2',
|
||||
restoreTitle : 'Click to close image, click and drag to move. Use arrow keys for next and previous.'
|
||||
};
|
||||
<?php
|
||||
elseif($_REQUEST[lang]=="de"):
|
||||
<?php
|
||||
} elseif ($_REQUEST['lang'] == 'de') {
|
||||
?>
|
||||
hs.lang = {
|
||||
loadingText : 'Lade...',
|
||||
@@ -95,9 +95,9 @@ hs.lang = {
|
||||
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.'
|
||||
};
|
||||
<?php
|
||||
else:
|
||||
};
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
hs.lang = {
|
||||
loadingText : 'Načítá se...',
|
||||
@@ -123,135 +123,136 @@ hs.lang = {
|
||||
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
|
||||
endif;
|
||||
}
|
||||
?>
|
||||
</script>
|
||||
<title><?php include("./pages/title_krk.php"); ?></title>
|
||||
<title><?php include './pages/title_krk.php'; ?></title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div class="header"><span class="title"><?php include("./pages/title_krk.php"); ?></span><br><span class="slogan"><?php include("./pages/slogan.php"); ?></span>
|
||||
<div class="header"><span class="title"><?php include './pages/title_krk.php'; ?></span><br><span class="slogan"><?php include './pages/slogan.php'; ?></span>
|
||||
<?php
|
||||
echo("<span class=\"floatright\">");
|
||||
if(file_exists("pages/$_REQUEST[page]-de.php") OR file_exists("pages/$_REQUEST[page]/$_REQUEST[page]-de.php")){
|
||||
if(file_exists("pages/$_REQUEST[page]/$_REQUEST[page]-de.php")){
|
||||
$lngc="de";
|
||||
$icona="<a href=\"mainkrk.php?page=$_REQUEST[page]/$_REQUEST[page]&lang=$lngc\"><img src=\"/images/".$lngc."f.png\" alt=\"\"></a>";
|
||||
}else{
|
||||
$lngc="de";
|
||||
$icona="<a href=\"mainkrk.php?page=".htmlspecialchars($_REQUEST["page"])."&lang=$lngc\"><img src=\"/images/".$lngc."f.png\" alt=\"\"></a>";
|
||||
}
|
||||
echo '<span class="floatright">';
|
||||
if (file_exists("pages/$_REQUEST[page]-de.php") || file_exists("pages/$_REQUEST[page]/$_REQUEST[page]-de.php")) {
|
||||
if (file_exists("pages/$_REQUEST[page]/$_REQUEST[page]-de.php")) {
|
||||
$lngc = 'de';
|
||||
$icona = "<a href=\"mainkrk.php?page=$_REQUEST[page]/$_REQUEST[page]&lang=$lngc\"><img src=\"/images/" . $lngc . 'f.png" alt=""></a>';
|
||||
} else {
|
||||
$lngc = 'de';
|
||||
$icona = '<a href="mainkrk.php?page=' . htmlspecialchars($_REQUEST['page']) . "&lang=$lngc\"><img src=\"/images/" . $lngc . 'f.png" alt=""></a>';
|
||||
}
|
||||
|
||||
if($_REQUEST[lang]=="de"){
|
||||
echo("");
|
||||
}else{
|
||||
echo($icona);
|
||||
if ($_REQUEST[lang] == 'de') {
|
||||
echo '';
|
||||
} else {
|
||||
echo $icona;
|
||||
}
|
||||
}
|
||||
if (file_exists('pages/' . htmlspecialchars($_REQUEST['page']) . '-en.php') || file_exists('pages/' . htmlspecialchars($_REQUEST['page']) . '/' . htmlspecialchars($_REQUEST['page']) . '-en.php')) {
|
||||
if (file_exists('pages/' . htmlspecialchars($_REQUEST['page']) . '/' . htmlspecialchars($_REQUEST['page']) . '-en.php')) {
|
||||
$lngc = 'en';
|
||||
$icona = '<a href="mainkrk.php?page=' . htmlspecialchars($_REQUEST['page']) . '/' . htmlspecialchars($_REQUEST['page']) . "&lang=$lngc\"><img src=\"/images/" . $lngc . 'f.png" alt=""></a>';
|
||||
} else {
|
||||
$lngc = 'en';
|
||||
$icona = '<a href="mainkrk.php?page=' . htmlspecialchars($_REQUEST['page']) . "&lang=$lngc\"><img src=\"/images/" . $lngc . 'f.png" alt=""></a>';
|
||||
}
|
||||
if ($_REQUEST[lang] == 'en') {
|
||||
echo '';
|
||||
} else {
|
||||
echo $icona;
|
||||
}
|
||||
} elseif (!isset($_REQUEST['page']) && file_exists('pages/krk_default-en.php')) {
|
||||
$lngc = 'en';
|
||||
$icona = "<a href=\"mainkrk.php?page=krk_default&lang=$lngc\"><img src=\"/images/" . $lngc . 'f.png" alt=""></a>';
|
||||
if ($_REQUEST[lang] == 'en') {
|
||||
echo '';
|
||||
} else {
|
||||
echo $icona;
|
||||
}
|
||||
}
|
||||
if(file_exists("pages/".htmlspecialchars($_REQUEST["page"])."-en.php") OR file_exists("pages/".htmlspecialchars($_REQUEST["page"])."/".htmlspecialchars($_REQUEST["page"])."-en.php")){
|
||||
if(file_exists("pages/".htmlspecialchars($_REQUEST["page"])."/".htmlspecialchars($_REQUEST["page"])."-en.php")){
|
||||
$lngc="en";
|
||||
$icona="<a href=\"mainkrk.php?page=".htmlspecialchars($_REQUEST["page"])."/".htmlspecialchars($_REQUEST["page"])."&lang=$lngc\"><img src=\"/images/".$lngc."f.png\" alt=\"\"></a>";
|
||||
}else{
|
||||
$lngc="en";
|
||||
$icona="<a href=\"mainkrk.php?page=".htmlspecialchars($_REQUEST["page"])."&lang=$lngc\"><img src=\"/images/".$lngc."f.png\" alt=\"\"></a>";
|
||||
}
|
||||
if($_REQUEST[lang]=="en"){
|
||||
echo("");
|
||||
}else{
|
||||
echo($icona);
|
||||
}
|
||||
}elseif(!isset($_REQUEST["page"]) AND file_exists("pages/krk_default-en.php")){
|
||||
$lngc="en";
|
||||
$icona="<a href=\"mainkrk.php?page=krk_default&lang=$lngc\"><img src=\"/images/".$lngc."f.png\" alt=\"\"></a>";
|
||||
if($_REQUEST[lang]=="en"){
|
||||
echo("");
|
||||
}else{
|
||||
echo($icona);
|
||||
}
|
||||
}
|
||||
if(file_exists("pages/".htmlspecialchars($_REQUEST["page"]).".php") OR file_exists("pages/".htmlspecialchars($_REQUEST["page"])."/".htmlspecialchars($_REQUEST["page"]).".php")){
|
||||
if(file_exists("pages/".htmlspecialchars($_REQUEST["page"])."/".htmlspecialchars($_REQUEST["page"]).".php")){
|
||||
$lngc="";
|
||||
$icona="<a href=\"mainkrk.php?page=".htmlspecialchars($_REQUEST["page"])."/".htmlspecialchars($_REQUEST["page"]).$lngc."\"><img src=\"/images/".$lngc."f.png\" alt=\"\"></a>";
|
||||
}else{
|
||||
$lngc="";
|
||||
$icona="<a href=\"mainkrk.php?page=".htmlspecialchars($_REQUEST["page"]).$lngc."\"><img src=\"/images/".$lngc."f.png\" alt=\"\"></a>";
|
||||
}
|
||||
if (file_exists('pages/' . htmlspecialchars($_REQUEST['page']) . '.php') || file_exists('pages/' . htmlspecialchars($_REQUEST['page']) . '/' . htmlspecialchars($_REQUEST['page']) . '.php')) {
|
||||
if (file_exists('pages/' . htmlspecialchars($_REQUEST['page']) . '/' . htmlspecialchars($_REQUEST['page']) . '.php')) {
|
||||
$lngc = '';
|
||||
$icona = '<a href="mainkrk.php?page=' . htmlspecialchars($_REQUEST['page']) . '/' . htmlspecialchars($_REQUEST['page']) . $lngc . '"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
} else {
|
||||
$lngc = '';
|
||||
$icona = '<a href="mainkrk.php?page=' . htmlspecialchars($_REQUEST['page']) . $lngc . '"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
}
|
||||
|
||||
if($_REQUEST[lang]=="cs" OR empty($_REQUEST[lang])){
|
||||
echo("");
|
||||
}else{
|
||||
echo($icona);
|
||||
if ($_REQUEST[lang] == 'cs' || empty($_REQUEST[lang])) {
|
||||
echo '';
|
||||
} else {
|
||||
echo $icona;
|
||||
}
|
||||
}
|
||||
if ($_REQUEST[lang] == 'en' && empty($_REQUEST['page'])) {
|
||||
$lngc = '';
|
||||
$icona = '<a href="mainkrk.php?page=krk_default"><img src="/images/' . $lngc . 'f.png" alt=""></a>';
|
||||
echo $icona;
|
||||
}
|
||||
if($_REQUEST[lang]=="en" AND empty($_REQUEST["page"])){
|
||||
$lngc="";
|
||||
$icona="<a href=\"mainkrk.php?page=krk_default\"><img src=\"/images/".$lngc."f.png\" alt=\"\"></a>";
|
||||
echo($icona);
|
||||
}
|
||||
echo("</span>");
|
||||
echo '</span>';
|
||||
?>
|
||||
</div>
|
||||
<div class="top-menu">
|
||||
<?php
|
||||
if(empty($_REQUEST[lang]) OR $_REQUEST[lang]=="cs"){
|
||||
include("./pages/krk_topmenu.php");
|
||||
}elseif($_REQUEST[lang]=="en" AND file_exists("./pages/krk_topmenu-en.php")){
|
||||
include("./pages/krk_topmenu-en.php");
|
||||
if (empty($_REQUEST[lang]) || $_REQUEST[lang] == 'cs') {
|
||||
include './pages/krk_topmenu.php';
|
||||
} elseif ($_REQUEST[lang] == 'en' && file_exists('./pages/krk_topmenu-en.php')) {
|
||||
include './pages/krk_topmenu-en.php';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="sidebar"><div class="sidebar-content">
|
||||
<ul>
|
||||
<?php
|
||||
if(ereg("mcr_2009",htmlspecialchars($_REQUEST["page"])) AND $_REQUEST[lang]=="en"){
|
||||
include("./pages/mcr_2009/menumcr_2009-en.php");
|
||||
}elseif(ereg("mcr_2009",htmlspecialchars($_REQUEST["page"])) AND $_REQUEST[lang]=="de"){
|
||||
include("./pages/mcr_2009/menumcr_2009-de.php");
|
||||
}elseif(ereg("mcr_2009",htmlspecialchars($_REQUEST["page"]))){
|
||||
include("./pages/mcr_2009/menumcr_2009.php");
|
||||
}else{
|
||||
if(empty($_REQUEST[lang]) OR $_REQUEST[lang]=="cs"){
|
||||
include("./pages/menukrk.php");
|
||||
}else{
|
||||
include("./pages/menukrk-en.php");
|
||||
}
|
||||
<?php
|
||||
if (preg_match('/mcr_2009/D', htmlspecialchars($_REQUEST['page'])) && $_REQUEST[lang] == 'en') {
|
||||
include './pages/mcr_2009/menumcr_2009-en.php';
|
||||
} elseif (preg_match('/mcr_2009/D', htmlspecialchars($_REQUEST['page'])) && $_REQUEST[lang] == 'de') {
|
||||
include './pages/mcr_2009/menumcr_2009-de.php';
|
||||
} elseif (preg_match('/mcr_2009/D', htmlspecialchars($_REQUEST['page']))) {
|
||||
include './pages/mcr_2009/menumcr_2009.php';
|
||||
} else {
|
||||
if (empty($_REQUEST[lang]) || $_REQUEST[lang] == 'cs') {
|
||||
include './pages/menukrk.php';
|
||||
} else {
|
||||
include './pages/menukrk-en.php';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul><br><br><br>
|
||||
</div></div><div class="main"><div class="main-content">
|
||||
<?php
|
||||
$escaped_page=str_replace(array(")","(","\\","\"","\'",";","{","}","$","[","]","<",">"),"",htmlspecialchars($_REQUEST["page"]));
|
||||
if(htmlspecialchars($_REQUEST["page"])){
|
||||
if($_GET[lang]){
|
||||
$jazycek="-".$_GET[lang];
|
||||
}else{
|
||||
$jazycek="";
|
||||
<?php
|
||||
$escaped_page = str_replace([')', '(', '\\', '"', "\'", ';', '{', '}', '$', '[', ']', '<', '>'], '', htmlspecialchars($_REQUEST['page']));
|
||||
if (htmlspecialchars($_REQUEST['page'])) {
|
||||
if ($_GET[lang]) {
|
||||
$jazycek = '-' . $_GET[lang];
|
||||
} else {
|
||||
$jazycek = '';
|
||||
}
|
||||
if (htmlspecialchars($_REQUEST['page']) == 'mcr_2009') {
|
||||
include "./pages/mcr_2009/mcr_2009$jazycek.php";
|
||||
} elseif (htmlspecialchars($_REQUEST['page']) == 'clanky') {
|
||||
include "./pages/clanky/clanky$jazycek.php";
|
||||
} elseif (htmlspecialchars($_REQUEST['page']) == 'akce_ob') {
|
||||
include "./pages/akce_ob/akce_ob$jazycek.php";
|
||||
} elseif (htmlspecialchars($_REQUEST['page']) == 'akce_litvinov') {
|
||||
include "./pages/akce_litvinov/akce_litvinov$jazycek.php";
|
||||
} elseif (htmlspecialchars($_REQUEST['page']) == 'ski_krusnohori') {
|
||||
include './pages/ski_krusnohori/ski_krusnohori' . $jazycek . '.php';
|
||||
} elseif (empty($_REQUEST[lang]) && file_exists("pages/$escaped_page.php")) {
|
||||
include "./pages/$escaped_page.php";
|
||||
} elseif (file_exists("pages/$escaped_page-$_REQUEST[lang].php")) {
|
||||
include "./pages/$escaped_page-$_REQUEST[lang].php";
|
||||
} else {
|
||||
include __DIR__ . '/pages/404.php';
|
||||
}
|
||||
} else {
|
||||
if (empty($_GET['lang']) || $_GET['lang'] == 'cs') {
|
||||
include './pages/krk_default.php';
|
||||
} else {
|
||||
include './pages/krk_default-en.php';
|
||||
}
|
||||
}
|
||||
if(htmlspecialchars($_REQUEST["page"])=="mcr_2009"){
|
||||
include("./pages/mcr_2009/mcr_2009$jazycek.php");
|
||||
}elseif(htmlspecialchars($_REQUEST["page"])=="clanky"){
|
||||
include"./pages/clanky/clanky$jazycek.php";
|
||||
}elseif(htmlspecialchars($_REQUEST["page"])=="akce_ob"){
|
||||
include"./pages/akce_ob/akce_ob$jazycek.php";
|
||||
}elseif(htmlspecialchars($_REQUEST["page"])=="akce_litvinov"){
|
||||
include"./pages/akce_litvinov/akce_litvinov$jazycek.php";
|
||||
}elseif(htmlspecialchars($_REQUEST["page"])=="ski_krusnohori"){
|
||||
include"./pages/ski_krusnohori/ski_krusnohori".$jazycek.".php";
|
||||
}elseif(empty($_REQUEST[lang]) AND file_exists("pages/$escaped_page.php")){
|
||||
include"./pages/$escaped_page.php";
|
||||
}elseif(file_exists("pages/$escaped_page-$_REQUEST[lang].php")){
|
||||
include"./pages/$escaped_page-$_REQUEST[lang].php";
|
||||
}else{
|
||||
include __DIR__ . '/pages/404.php';
|
||||
}}else{
|
||||
if(empty($_GET["lang"]) OR $_GET["lang"]=="cs"){
|
||||
include"./pages/krk_default.php";
|
||||
}else{
|
||||
include"./pages/krk_default-en.php";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div></div>
|
||||
<div class="footer">
|
||||
|
||||
Reference in New Issue
Block a user