Пример #1
0
}
//Get pagecontent in buffer for Droplets and/or Filter operations
ob_start();
require LEPTON_PATH . '/templates/' . TEMPLATE . '/index.php';
$output = ob_get_clean();
// wb->preprocess() -- replace all [wblink123] with real, internal links
$wb->preprocess($output);
// Load Droplet engine and process
if (file_exists(LEPTON_PATH . '/modules/droplets/droplets.php')) {
    include_once LEPTON_PATH . '/modules/droplets/droplets.php';
    if (function_exists('evalDroplets')) {
        evalDroplets($output);
    }
}
// Output interface for Addons
if (file_exists(LEPTON_PATH . '/modules/output_interface/output_interface.php')) {
    include_once LEPTON_PATH . '/modules/output_interface/output_interface.php';
    if (function_exists('output_interface')) {
        output_interface($output);
    }
}
// CSRF protection - add tokens to internal links
if ($wb->is_authenticated()) {
    if (file_exists(LEPTON_PATH . '/framework/functions/function.addTokens.php')) {
        include_once LEPTON_PATH . '/framework/functions/function.addTokens.php';
        if (function_exists('addTokens')) {
            addTokens($output, $wb);
        }
    }
}
echo $output;
 */
if (!defined('WB_PATH')) {
    require dirname(__DIR__) . '/config.php';
}
if (!class_exists('frontend')) {
    require WB_PATH . '/framework/class.frontend.php';
}
// Create new frontend object
if (!isset($wb) || !$wb instanceof frontend) {
    $wb = new frontend();
}
if (!FRONTEND_LOGIN) {
    header('Location: ' . WB_URL . '/index.php');
    exit(0);
}
if ($wb->is_authenticated() == false) {
    header('Location: ' . WB_URL . '/account/login.php');
    exit(0);
}
$redirect_url = isset($_SESSION['HTTP_REFERER']) && $_SESSION['HTTP_REFERER'] != '' ? $_SESSION['HTTP_REFERER'] : WB_URL;
$redirect_url = isset($redirect) && $redirect != '' ? $redirect : $redirect_url;
$page_id = @$_SESSION['PAGE_ID'] ?: 0;
// Required page details
$page_description = '';
$page_keywords = '';
define('PAGE_ID', $page_id);
define('ROOT_PARENT', 0);
define('PARENT', 0);
define('LEVEL', 0);
define('PAGE_TITLE', $MENU['PREFERENCES']);
define('MENU_TITLE', $MENU['PREFERENCES']);