403Webshell
Server IP : 188.114.97.3  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux sv058.home.net.pl 6.8.2 husak_dirty_pages_fix #1 SMP PREEMPT_DYNAMIC Tue Apr 2 22:06:51 CEST 2024 x86_64
User :  ( 3194769)
PHP Version : 8.5.12
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /polana/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /polana/menu.php
<?php
declare(strict_types=1);

/* POLANA_V18_8_MENU_SEO */
require_once __DIR__ . '/includes/polana_menu_seo_v188.php';
p188_menu_boot();
require_once __DIR__ . '/includes/functions.php';
/* POLANA_V15_MENU_PUBLIC */
require_once __DIR__ . '/includes/polana_v15_menu.php';
require_once __DIR__ . '/includes/menu_placeholder.php';
render_global_site_splash_if_needed();

$menuMode = setting('menu_view_mode', 'auto');
$qrMode = (string)($_GET['qr'] ?? '') === '1';
$menuType = polana_menu_type((string)($_GET['kind'] ?? 'food'));
$dbMenu = p15_active_menu($menuType);

if ($dbMenu) {
    $menuName = $dbMenu['name'];
    $seoTitle = $dbMenu['seo_title'] ?: setting('menu_seo_title', 'Menu | ' . setting('site_name', APP_NAME));
    $seoDescription = $dbMenu['seo_description'] ?: setting('menu_seo_description', 'Aktualna karta restauracji ' . setting('site_name', APP_NAME) . '.');
} else {
    $placeholder = placeholder_menu();
    $menuName = $placeholder['name'];
    $seoTitle = setting('menu_seo_title', $placeholder['seo_title']);
    $seoDescription = setting('menu_seo_description', $placeholder['seo_description']);
}

$seoTitle = (p15_menu_lang() === 'en' ? p15_menu_type_label($menuType) . ' | ' : p15_menu_type_label($menuType) . ' | ') . setting('site_name', APP_NAME);
if (p15_menu_lang() === 'en') $seoDescription = p15_menu_type_label($menuType) . ' at Moja Polana Smaków restaurant in Kraków.';

if ($menuMode === 'splash') {
    $title = setting('menu_splash_title', 'Dziś nie serwujemy menu online');
    $description = setting('menu_splash_text', 'Menu jest chwilowo niedostępne albo restauracja ma przerwę.');
    $buttonUrl = trim(setting('menu_splash_button_url', '/kontakt')) ?: '/kontakt';

    render_public_head(
        $title . ' | ' . setting('site_name', APP_NAME),
        $description,
        '/menu',
        null,
        setting('menu_splash_robots', 'noindex,follow')
    );
    ?>
    <style>
        .menu-only-splash-v18{min-height:calc(100svh - 90px);display:grid;place-items:center;padding:40px 18px;text-align:center;background:#f4f2eb}
        .menu-only-splash-v18 .inner{width:min(760px,100%);margin:auto}
        .menu-only-splash-v18 .pot-visual{width:min(480px,85vw);margin:0 auto 10px}
        .menu-only-splash-v18 h1{font-size:clamp(42px,7vw,78px);line-height:.95;margin:0 0 18px}
        .menu-only-splash-v18 p{font-size:19px;color:#555}
    </style>
    <?php render_public_header('menu'); ?>
    <main class="menu-only-splash-v18">
        <div class="inner">
            <?php render_showcase_visual('menu_splash', 'pot-visual-menu-splash', 'Sezonowa grafika zaślepki menu'); ?>
            <span class="eyebrow"><?= e(setting('menu_splash_badge', 'Do zobaczenia wkrótce')) ?></span>
            <h1><?= e($title) ?></h1>
            <p><?= nl2br(e($description)) ?></p>
            <a class="btn-public btn-dark" href="<?= e($buttonUrl) ?>">
                <?= e(setting('menu_splash_button_label', 'Kontakt')) ?>
            </a>
        </div>
    </main>
    <?php
    render_public_footer();
    return;
}

[$seoTitle, $seoDescription] = p188_meta($menuType, $seoTitle, $seoDescription);
render_public_head(
    $seoTitle,
    $seoDescription,
    '/menu' . ($menuType === 'food' ? '' : '?kind=' . rawurlencode($menuType)),
    p188_schema($dbMenu, $menuType),
    p188_robots($dbMenu, $menuType)
);
?>
<style>
    /* krytyczny layout menu – niezależny od cache style.css */
    .menu-v18{
        width:100%;
        min-height:70svh;
        background:#f2f0e9;
        padding:38px 18px 72px;
    }
    .menu-v18-inner{
        width:min(820px,100%);
        margin:0 auto!important;
        text-align:center!important;
    }
    .menu-v18-head{
        width:100%;
        margin:0 auto 22px!important;
        text-align:center!important;
    }
    .menu-v18-head h1{
        margin:0 0 8px;
        font-size:clamp(30px,5vw,46px);
        line-height:1.05;
    }
    /* POLANA_MENU_SEO_V191: responsive SEO H1, shown in the normal menu. */
    .menu-v18-head .menu-v191-heading{font-size:clamp(24px,4.1vw,39px);line-height:1.16;
        font-weight:800;letter-spacing:-.02em;max-width:740px;margin:12px auto 18px;
        text-align:center;color:#1c281d;text-wrap:balance;}
    .menu-v18-head p{
        margin:0;
        color:#64645f;
        font-size:15px;
    }
    .menu-v18-card{
        width:min(760px,100%);
        margin:0 auto!important;
        background:#fff;
        box-shadow:0 20px 55px rgba(0,0,0,.11);
        overflow:hidden;
    }
    .menu-v18-card img{
        display:block!important;
        width:100%!important;
        max-width:760px!important;
        height:auto!important;
        margin:0 auto!important;
    }
    .menu-v18-actions{
        display:flex!important;
        justify-content:center!important;
        align-items:center!important;
        gap:20px;
        flex-wrap:wrap;
        width:100%!important;
        max-width:760px!important;
        margin:24px auto 0!important;
        text-align:center!important;
    }
    .menu-v18-actions .menu-under-link{
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        width:auto!important;
        margin:0!important;
        padding:6px 0;
        color:#444;
        text-decoration:none;
        font-size:13px;
        font-weight:800;
        border-bottom:2px solid #9acd32;
    }
    .menu-v18-pot{
        width:min(240px,55vw);
        margin:0 auto 8px;
    }

    .menu-v18-show{
        display:flex;
        justify-content:center;
        margin:0 auto 20px;
    }
    .menu-v18-show-btn{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-height:54px;
        padding:0 26px;
        border:0;
        border-radius:999px;
        background:#9acd32;
        color:#0b0b0b;
        text-decoration:none;
        font-size:16px;
        font-weight:900;
        box-shadow:0 10px 24px rgba(0,0,0,.10);
        cursor:pointer;
        transition:transform .16s ease, box-shadow .16s ease;
    }
    .menu-v18-show-btn:hover{
        transform:translateY(-2px);
        box-shadow:0 14px 28px rgba(0,0,0,.14);
    }
    .menu-v18-card{
        cursor:zoom-in;
    }
    body.menu-fullscreen-open{
        overflow:hidden!important;
    }
    .menu-fullscreen{
        position:fixed;
        inset:0;
        z-index:99999;
        display:none;
        background:#f2f0e9;
        overflow:auto;
        overscroll-behavior:contain;
    }
    .menu-fullscreen.is-open{
        display:block;
    }
    .menu-fullscreen-toolbar{
        position:sticky;
        top:0;
        z-index:4;
        display:flex;
        justify-content:space-between;
        align-items:center;
        gap:14px;
        min-height:62px;
        padding:8px 14px;
        background:rgba(17,17,17,.96);
        color:#fff;
        box-shadow:0 6px 20px rgba(0,0,0,.16);
    }
    .menu-fullscreen-toolbar strong{
        font-size:14px;
    }
    .menu-fullscreen-close{
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-height:42px;
        padding:0 18px;
        border:1px solid rgba(255,255,255,.25);
        border-radius:999px;
        background:#fff;
        color:#111;
        font-weight:900;
        cursor:pointer;
    }
    .menu-fullscreen-stage{
        width:min(1180px,100%);
        min-height:calc(100svh - 62px);
        margin:0 auto;
        padding:16px;
        display:flex;
        justify-content:center;
        align-items:flex-start;
    }
    .menu-fullscreen-stage img{
        display:block;
        width:100%;
        max-width:1120px;
        height:auto;
        margin:0 auto;
        background:#fff;
        box-shadow:0 16px 50px rgba(0,0,0,.16);
        touch-action:pan-x pan-y pinch-zoom;
    }
    .menu-qr-hint{
        width:min(760px,100%);
        margin:0 auto 14px;
        padding:10px 14px;
        border-radius:14px;
        background:#fff;
        color:#555;
        font-size:13px;
        text-align:center;
        box-shadow:0 8px 24px rgba(0,0,0,.05);
    }
    @media(max-width:700px){
        .menu-v18{padding:24px 8px 50px}
        .menu-v18-show-btn{width:min(360px,94vw);min-height:58px;font-size:17px}
        .menu-fullscreen-stage{padding:0}
        .menu-fullscreen-stage img{max-width:none;box-shadow:none}
        .menu-v18-card{width:100%}
        .menu-v18-actions{
            flex-direction:column!important;
            gap:12px!important;
            align-items:center!important;
        }
        .menu-v18-actions .menu-under-link{
            width:auto!important;
            margin:0 auto!important;
        }
    }
    /* Emergency rollback of the R7 graphical-menu hiding rule on phones. */
    @media(max-width:1024px){.menu-v18-card{display:block!important}}
</style>
<?php render_public_header('menu'); ?>
<!-- POLANA MENU R8 EMERGENCY ROLLBACK -->
<main class="menu-v18">
    <div class="menu-v18-inner">
        <div class="menu-v18-head">
            <div class="menu-v18-pot"><?php render_showcase_visual('menu', 'pot-visual-menu', 'Sezonowa grafika menu'); ?></div>
            <span class="eyebrow"><?= e(p15_menu_ui('Aktualna karta')) ?></span>
            <!-- POLANA_MENU_SEO_V191: H1 for normal menu (including wine and drinks) -->
            <?php
            $pm191Lang = p15_menu_lang();
            $pm191Headings = [
                'pl' => [
                    'food' => 'Menu restauracji Andrzeja Polana w Krakowie',
                    'wine' => 'Karta win – Moja Polana Smaków w Krakowie',
                    'soft' => 'Karta napojów – Moja Polana Smaków w Krakowie',
                ],
                'en' => [
                    'food' => 'Restaurant menu by Andrzej Polan in Krakow',
                    'wine' => 'Wine list – Moja Polana Smaków, Krakow',
                    'soft' => 'Drinks menu – Moja Polana Smaków, Krakow',
                ],
                'de' => [
                    'food' => 'Speisekarte von Andrzej Polan in Krakau',
                    'wine' => 'Weinkarte – Moja Polana Smaków, Krakau',
                    'soft' => 'Getränkekarte – Moja Polana Smaków, Krakau',
                ],
                'es' => [
                    'food' => 'Menú del restaurante de Andrzej Polan en Cracovia',
                    'wine' => 'Carta de vinos – Moja Polana Smaków, Cracovia',
                    'soft' => 'Carta de bebidas – Moja Polana Smaków, Cracovia',
                ],
            ];
            $pm191Heading = $pm191Headings[$pm191Lang][$menuType]
                ?? $pm191Headings['pl'][$menuType]
                ?? $pm191Headings['pl']['food'];
            ?>
            <h1 class="menu-v191-heading"><?= e($pm191Heading) ?></h1>
            <?php p15_menu_tabs($menuType); ?>
            <?php if (!$dbMenu && $menuType !== 'food'): ?>
                <p class="menu-qr-hint"><?= p15_menu_lang() === 'en' ? 'This menu is being prepared. Please check back soon.' : 'Przygotowujemy tę kartę. Zajrzyj wkrótce.' ?></p>
            <?php endif; ?>
        </div>

        <?php if ($qrMode): ?>
            <div class="menu-qr-hint">Dotknij przycisku, aby otworzyć kartę na cały ekran.</div>
        <?php endif; ?>

        <?php if ($dbMenu || $menuType === 'food'): ?>
        <div class="menu-v18-show">
            <a class="menu-v18-show-btn" id="menu-open-fullscreen" href="<?= e(p15_menu_url('/menu-karta.svg',$menuType)) ?>" aria-haspopup="dialog">
                Pokaż menu
            </a>
        </div>

        <div class="menu-v18-card" id="menu-preview-card" role="button" tabindex="0" aria-label="Pokaż menu na cały ekran">
            <img
                src="<?= e(p15_menu_url('/menu-karta.svg',$menuType)) ?>&amp;v=20261016-1"
                alt="Karta dań – Moja Polana Smaków Andrzeja Polana"
            >
        </div>

        <div class="menu-v18-actions">
            <a class="menu-under-link" href="<?= e(p15_menu_url('/alergeny',$menuType)) ?>"><?= e(p15_menu_ui('Składniki i alergeny')) ?></a>
            <a class="menu-under-link" href="#menu-tekst"><?= e(p15_menu_ui('Wersja tekstowa menu')) ?></a>
            <a class="menu-under-link" href="<?= e(p15_menu_url('/menu-druk',$menuType)) ?>&amp;auto=1" target="_blank" rel="noopener"><?= e(p15_menu_ui('Drukuj / zapisz PDF')) ?></a>
        </div>
        <?php endif; ?>
    </div>
</main>
<?php p188_render_text($dbMenu, $menuType); ?>

<style>.p188-text-menu{background:#f5f3ed;color:#252522;padding:28px 14px 65px}.p188-text-menu-inner{max-width:820px;margin:auto}.p188-text-menu h2{font-size:clamp(24px,4vw,34px);margin:0 0 24px}.p188-category{margin:22px 0}.p188-category h3{font-size:22px;padding-bottom:10px;border-bottom:1px solid #d5cfbf}.p188-dish{padding:11px 0;border-bottom:1px solid #e2ddd3}.p188-dish-head{display:flex;justify-content:space-between;gap:16px;align-items:baseline}.p188-dish-head span{white-space:nowrap;font-weight:700}.p188-dish p{margin:6px 0;color:#57534b;font-size:14px;line-height:1.5}</style>
<div class="menu-fullscreen" id="menu-fullscreen" aria-hidden="true" role="dialog" aria-modal="true" aria-label="Menu restauracji">
    <div class="menu-fullscreen-toolbar">
        <strong><?= e(p15_menu_ui('Menu restauracji')) ?></strong>
        <button class="menu-fullscreen-close" id="menu-fullscreen-close" type="button"><?= e(p15_menu_ui('Zamknij')) ?></button>
    </div>
    <div class="menu-fullscreen-stage">
        <img
            src="<?= e(p15_menu_url('/menu-karta.svg',$menuType)) ?>&amp;v=20261016-1"
            alt="Pełna karta dań restauracji"
        >
    </div>
</div>

<script>
(() => {
    const modal = document.getElementById('menu-fullscreen');
    const openButton = document.getElementById('menu-open-fullscreen');
    const preview = document.getElementById('menu-preview-card');
    const closeButton = document.getElementById('menu-fullscreen-close');

    if (!modal || !openButton || !closeButton) return;

    const openMenu = async (event) => {
        if (event) event.preventDefault();

        modal.classList.add('is-open');
        modal.setAttribute('aria-hidden', 'false');
        document.body.classList.add('menu-fullscreen-open');

        try {
            if (modal.requestFullscreen && !document.fullscreenElement) {
                await modal.requestFullscreen();
            }
        } catch (_) {}

        closeButton.focus({ preventScroll:true });
    };

    const closeMenu = async () => {
        try {
            if (document.fullscreenElement) {
                await document.exitFullscreen();
            }
        } catch (_) {}

        modal.classList.remove('is-open');
        modal.setAttribute('aria-hidden', 'true');
        document.body.classList.remove('menu-fullscreen-open');
        openButton.focus({ preventScroll:true });
    };

    openButton.addEventListener('click', openMenu);

    if (preview) {
        preview.addEventListener('click', openMenu);
        preview.addEventListener('keydown', (event) => {
            if (event.key === 'Enter' || event.key === ' ') {
                openMenu(event);
            }
        });
    }

    closeButton.addEventListener('click', closeMenu);

    document.addEventListener('keydown', (event) => {
        if (event.key === 'Escape' && modal.classList.contains('is-open')) {
            closeMenu();
        }
    });

    document.addEventListener('fullscreenchange', () => {
        if (!document.fullscreenElement && modal.classList.contains('is-open')) {
            modal.classList.remove('is-open');
            modal.setAttribute('aria-hidden', 'true');
            document.body.classList.remove('menu-fullscreen-open');
        }
    });
})();
</script>

<?php render_public_footer(); ?>

Youez - 2016 - github.com/yon3zu
LinuXploit