<?php
use Orchard\Service\SegmentAnalyticsTracking;
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/images/icons/favicon.ico" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<?php
echo $this->headMeta();

echo $this->headTitle(),
    $this->headLink(),
    $this->headStyle(),
    $this->headScript(),
    $this->inlineScript();

$useragent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $useragent, $matched)) {
    $browser_version = $matched[1];
    $browser = 'IE';
} elseif (preg_match('|Opera ([0-9].[0-9]{1,2})|', $useragent, $matched)) {
    $browser_version = $matched[1];
    $browser = 'Opera';
} elseif (preg_match('|Firefox/([0-9\.]+)|', $useragent, $matched)) {
    $browser_version = $matched[1];
    $browser = 'Firefox';
} elseif (preg_match('|Safari/([0-9\.]+)|', $useragent, $matched)) {
    $browser_version = $matched[1];
    $browser = 'Safari';
} else {
    // browser not recognized!
    $browser_version = 0;
    $browser = 'other';
}
$this->browser = $browser;
$translate = Zend_Registry::get("Zend_Translate");
?>
<!--[if lte IE 9]>
    <link href="/alw/styles/ie.css" media="screen" rel="stylesheet" type="text/css" >
    <script>
        (function ($) {
        var a = $.ui.mouse.prototype._mouseMove;
        $.ui.mouse.prototype._mouseMove = function (b) {
            if ($.browser.msie && document.documentMode >= 9) {
                b.button = 1
            };
            a.apply(this, [b]);
        }
        }(jQuery));
    </script>
<![endif]-->
<?php
echo $this->partial('partials/segment-analytics.phtml', array(
    'configs' => array(
        'key' => SegmentAnalyticsTracking::getKey('workstation')
    )
));
?>
</head>
<!-- end head -->

<body id="login-home" class="auth0-login">
    <div class="auth0-login full-page">
        <?php echo $this->layout()->content?>
    </div>
<?php
    // javascript
    echo $this->bottomScripts();
?>
</body>
</html>
