Exemplo n.º 1
0
function maintenance_message()
{
    global $lang_common, $feather_config, $tpl_main;
    // Deal with newlines, tabs and multiple spaces
    $pattern = array("\t", '  ', '  ');
    $replace = array('    ', '  ', '  ');
    $message = str_replace($pattern, $replace, $feather_config['o_maintenance_message']);
    // Get Slim current session
    $feather = \Slim\Slim::getInstance();
    $page_title = array(feather_escape($feather_config['o_board_title']), $lang_common['Maintenance']);
    if (!defined('FEATHER_ACTIVE_PAGE')) {
        define('FEATHER_ACTIVE_PAGE', 'index');
    }
    require_once FEATHER_ROOT . 'controller/header.php';
    require_once FEATHER_ROOT . 'controller/footer.php';
    $feather->config('templates.path', get_path_view());
    $header = new \controller\header();
    $header->setTitle($page_title)->display();
    $feather->render('message.php', array('lang_common' => $lang_common, 'message' => $message, 'no_back_link' => ''));
    require_once FEATHER_ROOT . 'controller/footer.php';
    $footer = new \controller\footer();
    $footer->dontStop();
    $footer->display();
}
Exemplo n.º 2
0
 * Copyright (C) 2015 FeatherBB
 * based on code by (C) 2008-2012 FluxBB
 * and Rickard Andersson (C) 2002-2008 PunBB
 * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
 */
// Start a session for flash messages
session_cache_limiter(false);
session_start();
// Load Slim Framework
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
// Instantiate Slim
$feather = new \Slim\Slim();
// Load middlewares
$feather->add(new \Slim\Extras\Middleware\CsrfGuard('featherbb_csrf'));
// CSRF
$feather->add(new \Slim\Extras\Middleware\FeatherBB());
// FeatherBB
// Cookie encryption
$feather->config('cookies.encrypt', true);
// Load FeatherBB common file
define('FEATHER_ROOT', dirname(__FILE__) . '/');
require FEATHER_ROOT . 'include/common.php';
// Load the routes
require FEATHER_ROOT . 'include/routes.php';
// Specify where to load the views
$feather->config('templates.path', get_path_view());
$feather->config('debug', true);
// As long as we're developing FeatherBB
// Run it, baby!
$feather->run();