<?php
/** @var Psr\Container\ContainerInterface $container */
$container = App::getContainer();

/** @var Johncms\Api\UserInterface $systemUser */
$systemUser = $container->get(Johncms\Api\UserInterface::class);

/** @var Johncms\Api\ConfigInterface $config */
$config = $container->get(Johncms\Api\ConfigInterface::class);

/** @var Johncms\Api\BbcodeInterface $bbcode */
$bbcode = $container->get(Johncms\Api\BbcodeInterface::class);

/** @var Johncms\Counters $counters */
$counters = $container->get('counters');

$userConfig = $systemUser->getConfig();
if ($systemUser->isValid() && $userConfig->LastPost && ($_SESSION['agent_web'] == 'web')) {
echo '<script type="text/javascript">
ddaccordion.init({
	headerclass: "submenuheader",
	contentclass: "submenu",
	revealtype: "click",
	mouseoverdelay: 200,
	collapseprev: true,
	defaultexpanded: [],
	onemustopen: false,
	animatedefault: false,
	persiststate: true, 
	toggleclass: ["", ""],
	togglehtml: ["suffix", "", ""],
	animatespeed: "fast",
	oninit:function(headers, expandedindices){
	},
	onopenclose:function(header, index, state, isuseractivated){
	}
})
</script>';
 
//echo '<div class="mainblok">';



echo '<div class="Block">
        <div class="Block-tl"></div>
        <div class="Block-tr"></div>
        <div class="Block-bl"></div>
        <div class="Block-br"></div>
        <div class="Block-tc"></div>
        <div class="Block-bc"></div>
        <div class="Block-cl"></div>
        <div class="Block-cr"></div>
        <div class="Block-cc"></div>
        <div class="Block-body">';
echo '<a href="#" class="submenuheader">
            <div class="BlockHeader">
                <div class="l"></div>
                <div class="r"></div>
                <div class="header-tag-icon">
                <div class="t"> Last Post </div>
            </div>
            </div></a>';
echo '<div class="submenu">
           <div class="BlockContent">
                    <div class="BlockContent-tl"></div>
                    <div class="BlockContent-tr"></div>
                    <div class="BlockContent-bl"></div>
                    <div class="BlockContent-br"></div>
                    <div class="BlockContent-tc"></div>
                    <div class="BlockContent-bc"></div>
                    <div class="BlockContent-cl"></div>
                    <div class="BlockContent-cr"></div>
                    <div class="BlockContent-cc"></div>
                    <div class="BlockContent-body">
                <div>';
 
              require(ROOT_PATH . 'system/forum.php');
echo '</div>
           </div>
            <div class="cleared"></div>
				   </div>
				  </div>
          <div class="cleared"></div>
        </div>
</div>';

}

?>