예제 #1
0
    }
    session_write_close();
    header('location: login.php');
    exit;
} else {
    $user = new user();
    $user->load($_SESSION['APP_USER#' . APP_UNIQUE]);
    if (empty($user->id)) {
        header('location: ' . NAVIGATE_MAIN . '?logout');
    }
}
$current_version = update::latest_installed();
// new updates check -> only Administrator (profile=1)
if ($user->profile == 1 && empty($_SESSION['latest_update']) && NAVIGATECMS_UPDATES !== false) {
    $_SESSION['latest_update'] = @update::latest_available();
    $_SESSION['extensions_updates'] = @extension::latest_available();
    $_SESSION['themes_updates'] = @theme::latest_available();
}
$idn = new idna_convert();
$lang = new language();
$lang->load($user->language);
if (@$_COOKIE['navigate-language'] != $user->language) {
    setcookie('navigate-language', $user->language, time() + 86400 * 30);
}
set_time_limit(0);
$menu_layout = new menu_layout();
$menu_layout->load();
// load the working website
$website = new Website();
if ((@$_GET['act'] == '0' || @$_GET['quickedit'] == 'true') && !empty($_GET['wid'])) {
    $website->load(intval($_GET['wid']));