<?php
// Copyright 1999-2014. Parallels IP Holdings GmbH. All Rights Reserved.
?>
<?php echo $this->doctype(); ?>
<!--[if lt IE 7]><html class="ie ie6 lte9 lte8 lte7" lang="en"><![endif]-->
<!--[if IE 7]><html class="ie ie7 lte9 lte8 lte7" lang="en"><![endif]-->
<!--[if IE 8]><html class="ie ie8 lte9 lte8" lang="en"><![endif]-->
<!--[if IE 9]><html class="ie ie9 lte9" lang="en"><![endif]-->
<!--[if gt IE 9]><!--><html class="" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE">
<meta name="forgery_protection_token" id="forgery_protection_token" content="<?php echo Session::get()->panel()->forgeryProtectionToken; ?>">
<?php if(Plesk_Config::get()->whm->enabled): ?>
<meta name="ctx_id_name" id="ctx_id_name" content="<?php echo Session::GPC_CTX_ID; ?>">
<meta name="<?php echo Session::GPC_CTX_ID; ?>" id="<?php echo Session::GPC_CTX_ID; ?>" content="<?php echo Session::getContextId(); ?>">
<?php endif; ?>
<?php echo $this->headTitle() ?>
<link rel="shortcut icon" href="<?php echo $this->cacheStamp('/favicon.ico'); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

<?php echo $this->headStyle() ?>
<?php echo $this->headLink() ?>

<?php echo $GLOBALS['skin']->getThemeCssIncludes($this->layout()->isClassicMode ? 'main' : 'smb'); ?>

<?php if (!$this->layout()->isClassicMode && !Plesk_Config::get()->whm->enabled): ?>
    <script>
        var searchBarParams = <?php echo $this->layout()->searchBarParams; ?>;
    </script>
    <?php $this->headScript()->prependFile($this->cacheStamp('/javascript/search.js')); ?>
<?php endif; ?>

<?php $this->headScript()->prependFile($this->cacheStamp('/javascript/task-progress-bar.js', true)); ?>
<?php if (!$this->layout()->isClassicMode) {
    $this->headScript()->prependFile($this->cacheStamp('/javascript/responsive.js'));
    $this->headScript()->prependFile($this->cacheStamp('/javascript/externals/modernizr.js'));
} ?>
<?php $this->headScript()->prependFile('/smb' . $this->cacheStamp('/scripts/smb.js')); ?>
<?php $this->headScript()->prependFile($this->cacheStamp('/javascript/common.js')); ?>
<?php $this->headScript()->prependFile($this->cacheStamp('/javascript/jsw.js')); ?>
<?php $this->headScript()->prependFile($this->cacheStamp('/javascript/prototype.js')); ?>
<?php if ($this->layout()->showLeftFrame && $this->layout()->isClassicMode && !$this->isSimpleLayout) {
    $this->headScript()->prependFile($this->cacheStamp('/javascript/main.js', true));
} ?>

<?php echo $this->headScript(); ?>

<?php echo $this->partial('partials/context_header.phtml'); ?>

<?php if ($this->layout()->googleAnalyticsId): ?>
    <?php echo $this->partial('partials/google-analytics.phtml'); ?>
<?php endif; ?>

<?php echo $this->layout()->pleskAdditionalHead ?>

<?php echo $this->layout()->extensionsAdditionalHead; ?>

</head>
<body>
    <script type="text/javascript">
        <?php if ($this->layout()->isClassicMode): ?>
            $(document.body).addClassName('sid-frame');
            $(document.body).addClassName('sid-frame-main');
            $(document.body).addClassName('sid-main-embedded');
        <?php elseif (Plesk_Mode::isPpaMode()): ?>
            $(document.body).addClassName('sid-main-embedded');  // bug #140948
        <?php else: ?>
            $(document.body).addClassName('sid-main');
            if (top != self) {
                $(document.body).addClassName('sid-main-embedded');
            }
        <?php endif; ?>

        <?php if ($this->layout()->bodyClass): ?>
            $(document.body).addClassName('<?php echo $this->layout()->bodyClass; ?>');
        <?php endif; ?>

        if ($(document.body).hasClassName('sid-legacy')) {
            $(document.body).addClassName('sid-main-legacy');
        }
    </script>

    <?php if ($this->layout()->informer): ?>
        <?php echo $this->render($this->layout()->informer); ?>
    <?php endif; ?>

    <div class="tooltip" style="display: none;"><b><i><i><i><span></span></i></i></i></b></div>

    <?php if ($this->isSimpleLayout):?>
        <div id="login-page">
    <?php else:?>
        <div id="page">
    <?php endif;?>
        <?php echo $this->partial('partials/task-progress-bar.phtml'); ?>
        <div id="wrapper">
            <div id="top-wrapper" class="l-top">
                <div class="l-top-inner">
                    <?php if (!$this->isSimpleLayout && Plesk_Mode::isSessionPowerUserPanel() && !$this->layout()->isClassicMode): ?>
                        <div class="top-panel">
                            <div class="top-panel-area">
                                <div class="top-panel-content">
                                    <table class="top-panel-table"><tbody>
                                        <tr>
                                            <td class="top-panel-table-action"><a href="<?php echo $this->baseUrl('/account/power-mode-logout') ?>"><span><?php echo $this->lmsg('smb.components.navigation.exitSessionPowerUserModeLink'); ?></span></a></td>
                                            <td class="top-panel-table-content"><?php echo $this->lmsg('smb.components.navigation.exitSessionPowerUserModeMessage'); ?> <a href="/smb/help/redirect/controller-name/subscription/action-name/logout" target="help"><?php echo $this->lmsg('smb.components.navigation.exitSessionPowerUserModeHelp'); ?></a></td>
                                        </tr>
                                    </tbody></table>
                                </div>
                            </div>
                        </div>
                    <?php endif; ?>
                    <div id="top">
                        <div id="header-wrapper">
                            <div id="header">
                                <h1 class="logo">
                                    <span class="product-name">
                                        <?php if ($this->logo()->customLogoUrl): ?>
                                            <a href="<?php echo $this->logo()->customLogoUrl ?>" title="<?php echo $this->escape($this->layout()->windowTitle); ?>" onclick="window.open(this.href); return false;">
                                                <img src="<?php echo $this->logo()->logoImage; ?>" alt="<?php echo $this->escape($this->layout()->windowTitle); ?>">
                                            </a>
                                        <?php else:?>
                                            <img src="<?php echo $this->logo()->logoImage; ?>" alt="<?php echo $this->escape($this->layout()->windowTitle); ?>">
                                        <?php endif;?>
                                    </span>
                                </h1>
                                <?php
                                if (!$this->isSimpleLayout) {
                                    echo $this->layout()->shortcuts;
                                }
                                ?>
                                <?php if (live_demo() && ! Session::get()->panel()->demoHideBuynow):?>
                                    <a class="top-action-box" target="_blank" href="/demo/buynow.php">
                                        <span><?php echo lmsg('link_to_purchase_demo');?></span>
                                    </a>
                                <?php endif;?>
                                <?php if ($this->layout()->showFeedbackButton): ?>
                                    <a class="top-action-box top-feedback" href="/smb/mpc/feedback" target="_blank">
                                        <span><?php echo lmsg('link_to_feedback');?></span>
                                    </a>
                                <?php endif;?>
                            </div>
                        </div>
                    </div>
                    <?php if (!$this->isSimpleLayout && !$this->layout()->isClassicMode):?>
                            <?php echo $this->layout()->navigation ?>
                    <?php endif; ?>
                </div>
            </div>
            <div id="content-wrapper">
                    <div id="content">
