Save
This commit is contained in:
@@ -1,6 +1,58 @@
|
||||
<? include 'templates_user/components/detect-language.php'; ?>
|
||||
<?php
|
||||
function getUserIP() {
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
return $_SERVER['HTTP_CLIENT_IP'];
|
||||
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
return explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])[0];
|
||||
} else {
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
}
|
||||
|
||||
<div class="header-container fixed-top 12332">
|
||||
$allowedIP = '217.119.76.99';
|
||||
$userIP = getUserIP();
|
||||
?>
|
||||
|
||||
<?php if ($userIP == $allowedIP): ?>
|
||||
<header id="header" style="background: gray;">
|
||||
<div class="container">
|
||||
<div class="header-data">
|
||||
<div class="header-logo">
|
||||
<a href="/"></a>
|
||||
<img alt="" src="/upload/filemanager/images/vidok-logo-mini.svg" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="header-menu">
|
||||
<?= \front\view\Menu::main_menu(\front\factory\Menu::menu_details( 1 ), $page['id']); ?>
|
||||
|
||||
|
||||
<div id="header-action-btns">
|
||||
<a class="search" href="#">
|
||||
<img alt="" src="/upload/filemanager/icon/search-white.svg" />
|
||||
</a>
|
||||
|
||||
<?= \front\view\Languages::languages(); ?>
|
||||
</div>
|
||||
|
||||
<a href="#" class="btn-popup-oferta">
|
||||
Bezpłatna wycena
|
||||
<img src="/upload/filemanager/images/check-box-Vector.svg" alt="">
|
||||
</a>
|
||||
|
||||
<img class="unia-img" alt="" src="/upload/filemanager/images/Unia---Vector.svg" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-box">
|
||||
<div class="container">
|
||||
<?= \front\view\Search::search_form(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<?php else: ?>
|
||||
<div class="header-container fixed-top">
|
||||
<div class="header ">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@@ -41,4 +93,5 @@
|
||||
<?= \front\view\Search::search_form(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user