$this->submitted = true; } } } class Controller { private $options; private $view; public function __construct(OOptions $options) { $this->options = $options; } public function start() { global $template; $this->view = new View($this->options, $template); if (isset($_POST['submit'])) { $this->options->set('important_announcement', $_POST['important_announcement']); $this->view->setSubmitted(); } } public function getView() { return $this->view; } } $controller = new Controller(OOptions::getInstance()); $controller->start(); $view = $controller->getView(); $view->display(); include './page_footer_admin.' . $phpEx;
// // Allow autologin? // if (!isset($board_config['allow_autologin']) || $board_config['allow_autologin']) { $template->assign_block_vars('switch_allow_autologin', array()); $template->assign_block_vars('switch_user_logged_out.switch_allow_autologin', array()); } } else { $template->assign_block_vars('switch_user_logged_in', array()); if (!empty($userdata['user_popup_pm'])) { $template->assign_block_vars('switch_enable_pm_popup', array()); } } // OpenKore options require_once $phpbb_root_path . 'includes/openkore.' . $phpEx; $ooptions = OOptions::getInstance(); $template->assign_vars(array('IMPORTANT_ANNOUNCEMENT' => $ooptions->get('important_announcement'), 'ADVERTISEMENT' => OConstants::getAdvertisement())); if (file_exists('/home/openkore/web/include/noie.php')) { $template->assign_vars(array('FIREFOX_BOX' => file_get_contents('/home/openkore/web/include/noie.php'))); } if ($ooptions->get('important_announcement') != '') { $template->assign_block_vars('important_announcement', array()); } // Add no-cache control for cookies if they are set //$c_no_cache = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data'])) ? 'no-cache="set-cookie", ' : ''; // Work around for "current" Apache 2 + PHP module which seems to not // cope with private cache control setting if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2')) { header('Cache-Control: no-cache, pre-check=0, post-check=0'); } else { header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');