<?php
use Orchard\Service\SegmentAnalyticsTracking;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php

$this->browserType = (stristr($_SERVER['HTTP_USER_AGENT'], 'msie') ? 'IE' : '');

echo $this->headMeta();

$this->loadcss();
$this->loadjs();

echo $this->headTitle("OrchAdmin");

echo $this->headLink();

echo $this->headStyle();

echo $this->headScript();

echo $this->inlineScript();

echo $this->partial(
    'partials/site-analytics.phtml',
    array(
        "configs" => array(
            'consumerKey' => \Service_GoogleAnalyticsTracking::getTrackingCode(APPLICATION_ENV, 'oa'),
            'userId' => $_SESSION['S_USERID']
        )
    )
);

echo $this->partial('partials/segment-analytics.phtml', array(
    'configs' => array(
        'key' => SegmentAnalyticsTracking::getKey('oa'),
        'userId' => $_SESSION['S_USERID']
    )
));

?>
</head>
<!-- end head -->
<body>
<?php
$this->oa_acl = new Web_Acl_OaAcl();

echo $this->render('_header.phtml');
echo $this->render('_topnav.phtml');
?>

<div id="contentWrapper">
	<p class="breadcrumb"><?=$this->placeholder('breadcrumb')?></p>
	<?=$this->render('msgPanel.phtml')?>

	<!--End Header Wrap -->
	<div id="contentArea">
		<div id="rightPane">
			<?=$this->render('quickSearch.phtml')?>
			<?=$this->placeholder('panelResources')?>
		</div>

		<div id="leftPane">
			<?=$this->placeholder('itemDiv')?>
			<?=$this->placeholder('divider')?>
		</div>

        <span class="floatClear"></span>

        <?=$this->layout()->content?>
	</div>
</div>
<?=$this->bottomScripts();?>
<script type="text/javascript" src="/scripts/oa/quicksearch.js"></script>
<script type="text/javascript">
    handleQuickSearch(true, true);
</script>

<?php
echo $this->render('_footer.phtml');
