<?php
// Copyright 1999-2022. Plesk International GmbH. All rights reserved.
?>
<?= $this->doctype() ?>
<html <?= $this->htmlDoc() ?>>
<head>
    <?= $this->headMeta() ?>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE">
    <meta name="format-detection" content="telephone=no">
    <meta name="forgery_protection_token" id="forgery_protection_token" content="<?= Session::get()->panel()->forgeryProtectionToken ?>">
    <?= $this->headTitle() ?>
    <link rel="mask-icon" href="<?= \Session::get()->panel()->baseUrl . $this->cacheStamp('/images/favicon.svg') ?>" color="#54bce6">
    <link rel="shortcut icon" href="<?= \Session::get()->panel()->baseUrl . $this->cacheStamp('/favicon.ico') ?>">
    <link rel="manifest" href="<?= \Session::get()->panel()->baseUrl . $this->cacheStamp('/manifest.webmanifest') ?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <?= $GLOBALS['skin']->getThemeCssIncludes() ?>
    <?= $this->headStyle() ?>
    <?= $this->headLink() ?>
    <?php $this->jsLoad()->requireJs(); ?>
    <?php $this->jsLoad()->prepend('/javascript/main.js'); ?>
    <?php $this->jsLoad()->prepend('/javascript/vendors.js'); ?>
    <?php $this->jsLoad()->uiLibrary(); ?>
    <?php $this->jsLoad()->prepend('/javascript/externals/ProtoChart.js'); ?>
    <?php $this->jsLoad()->prepend('/javascript/externals/prototype.js'); ?>
    <?= new \Plesk\UserActivityTracking\View($this) ?>
    <?= $this->headScript() ?>
    <?= $this->partial('partials/context_header.phtml') ?>

    <?= $this->layout()->pleskAdditionalHead ?>

    <?= $this->layout()->extensionsAdditionalHead ?>

    <?php if ($this->layout()->googleTagManagerId): ?>
        <?= $this->partial('partials/google-tag-manager.phtml') ?>
    <?php endif; ?>
</head>
<body>
<?php
    $this->plesk()->setData([
        'returnUrl' => $this->returnUrl,
        'showFrames' => Session::get()->panel()->showFrames,
        'pageHeader' => $this->pageHeader(Session::get()->auth()->getUser()),
        'pageSidebar' => $this->leftMenu(Session::get()),
        'pageContentHeader' => $this->pageContentHeader(),
        'withSecondary' => $this->layout()->withSecondary,
        'secondary' => $this->layout()->secondary,
        'width' => $this->layout()->width,
        'status' => $this->status->getMessages(),
        'bodyClass' => $this->layout()->bodyClass,
        'integrationClass' => $this->layout()->integrationClass,
        'showModal' => $this->plesk()->showModal(),
    ]);
?>
<?=$this->plesk()->run()?>
<?php if ($this->layout()->googleTagManagerId): ?>
    <?= $this->partial('partials/google-tag-manager-noscript.phtml') ?>
<?php endif; ?>
<?php if ($this->layout()->content): ?>
    <?= $this->plesk()->renderAsTemplate($this->layout()->content, 'document.getElementById("main")') ?>
<?php endif; ?>
    <?= $this->layout()->extensionsAdditionalBody; ?>
</body>
</html>
