isModal) { $layout = 'modal'; } else if($user->isLoggedin() && isset($_GET['layout'])) { $layout = $input->get->name('layout'); } else { $layout = ''; } $content .= $adminTheme->renderExtraMarkup('content'); $vars = array('layout' => $layout, 'content' => &$content); if(strpos($layout, 'sidenav') === 0 && $layout != 'sidenav-main') { include(__DIR__ . '/_sidenav/default.php'); } else { // main markup file if($user->isLoggedin() && $adminTheme->layout && !$adminTheme->isModal) { $vars['layout'] = $adminTheme->layout; $adminTheme->addBodyClass("pw-layout-$vars[layout]"); } else if($layout != 'modal') { $vars['layout'] = ''; } $adminTheme->includeFile('_main.php', $vars); }