<?php

function url()
{
    return sprintf(
        "%s://%s%s",
        isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
        $_SERVER['SERVER_NAME'],
        $_SERVER['REQUEST_URI']
    );
}

$root_x = url();
$root_y = parse_url($root_x);
$root = "https://" . $root_y['host'] . "/";
$root_folder = $_SERVER['DOCUMENT_ROOT'];

$_SESSION['baseurl'] = $root;

include('' . $root_folder . '/blocks/header.php');

?>

<body>
    <div class="site-wrapper">
        <div class="site-container">
            <?php include('' . $root_folder . '/blocks/popup.php'); ?>
            <?php include('' . $root_folder . '/blocks/menu.php'); ?>
            <?php include('' . $root_folder . '/blocks/products.php'); ?>
            <?php include('' . $root_folder . '/blocks/footer.php'); ?>
        </div>
    </div>
</body>

</html>