php /** * CMS front controller * * Copyright (C) 2019 Vrolijk Internet Services **/ require_once('cms/include/header.php'); //Check if the website is in maintenance mode $settings = Cms_Settings::instance(); if ($settings->get('maintenance_message', '')) { fatal_error($settings->get('maintenance_message_title', '', 'Onderhoud'), $settings->get('maintenance_message_body', '', 'Momenteel wordt er onderhoud gepleegd aan de website. Komt u alstublieft op een later tijdstip terug. Excuses voor het ongemak.')); } Cms_Core::require_all_php(realpath($_SERVER['DOCUMENT_ROOT'] . '/cms/include/shortcodes')); Cms_Extensions::initialize_extensions(); Cms_Events::event('frontend_core_routes.before'); if (!Cms_Routing::ignore()) { require_once(realpath($_SERVER['DOCUMENT_ROOT'] . '/cms/include/routes.php')); } Cms_Events::event('frontend_core_routes.after'); $path = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'); Cms_Routing::run($path); if (!empty(Cms_Routing::$parameters['page-title'])) { Cms_PageTemplate::instance()->set_page_title(Cms_Routing::$parameters['page-title']); } if (!empty(Cms_Routing::$parameters['page-description'])) { Cms_PageTemplate::instance()->set_description(Cms_Routing::$parameters['page-description']); } if (!empty(Cms_Routing::$parameters['page-keywords'])) { Cms_PageTemplate::instance()->set_keywords(Cms_Routing::$parameters['page-keywords']); } require_once('cms/include/footer.php');