first commit

This commit is contained in:
2024-11-17 19:56:17 +01:00
commit 81b1185f8e
6599 changed files with 832395 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
<?php
// Language codes:
// en-US : English American
// en-GB : English British
// de : German
// fr : French
// it : Italian
// sk : Slovak
// pl : Polish
function detectLanguage() {
$acceptLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
$languages = explode(',', $acceptLanguage);
$firstLanguage = $languages[0];
return trim($firstLanguage);
}
$browserLanguage = detectLanguage();
$isAdmin = (\S::get_session('user')['admin'] == 1) ? true : false;
if($browserLanguage !== 'pl' && $browserLanguage !== 'pl-PL'){
if(!$isAdmin){
switch ($browserLanguage) {
case 'en-US':
header('Location: https://eng.vidok.com/'); exit;
break;
case 'en-GB':
header('Location: https://gb.vidok.com/'); exit;
break;
case 'de':
header('Location: https://de.vidok.com/'); exit;
break;
case 'de-DE':
header('Location: https://de.vidok.com/'); exit;
break;
case 'fr':
header('Location: https://fr.vidok.com/'); exit;
break;
case 'fr-FR':
header('Location: https://fr.vidok.com/'); exit;
break;
case 'it':
// header('Location: https://it.vidok.com/'); exit;
break;
case 'it-IT':
// header('Location: https://it.vidok.com/'); exit;
break;
case 'sk':
header('Location: https://sk.vidok.com/'); exit;
break;
case 'sk-SK':
header('Location: https://sk.vidok.com/'); exit;
break;
case 'pl':
header('Location: https://vidok.com/'); exit;
break;
case 'pl-PL':
header('Location: https://vidok.com/'); exit;
break;
default:
break;
};
};
};
?>

View File

@@ -0,0 +1,26 @@
<? include 'templates_user/components/detect-language.php'; ?>
<div class="top sticky-top">
<div class="container">
<div class="row">
<div class="col-md-12 col-xl-2">
<a href="<?= \front\factory\Pages::lang_url(\front\factory\Pages::main_page_id(), $lang_id, \S::get_domain( $_SERVER['HTTP_HOST'] ), \front\factory\Languages::default_domain()); ?>">
<img alt="" src="/upload/filemanager/images/logo.png" />
</a>
</div>
<div class="col-md-12 col-xl-10">
<div>
<?= \front\view\Menu::main_menu(\front\factory\Menu::menu_details( 1 ), $page['id']); ?>
</div>
<div>
<a href="#" data-toggle="modal" data-target="#modal-contact" class="btn"><?= \S::lang( 'otrzymaj-wycene' ) ?></a>
</div>
<div class="social">
<a href="https://www.facebook.com/profile.php?id=100095628602970" target="_blank">
<img src="/layout/images/icon-facebook.svg">
</a>
</div>
</div>
</div>
</div>
</div>