Beispiel #1
0
    if (substr($redirect, 0, 4) != 'http') {
        $redirect = URL_FULL . $redirect;
    }
    pathos_sessions_set('redirecturl', $redirect);
}
// Initialize the Theme Subsystem
if (!defined('SYS_THEME')) {
    require_once BASE . 'subsystems/theme.php';
}
$SYS_FLOW_REDIRECTIONPATH = 'loginredirect';
if (pathos_sessions_loggedIn()) {
    $url = pathos_sessions_get('redirecturl');
    if ($url . '' == '') {
        $SYS_FLOW_REDIRECTIONPATH = 'default';
        pathos_flow_redirect();
    }
    header('Location: ' . $url);
    exit('Redirecting...');
} else {
    if (isset($_REQUEST['module']) && isset($_REQUEST['action'])) {
        pathos_theme_runAction();
        loginmodule::show(DEFAULT_VIEW, null);
    } else {
        pathos_flow_set(SYS_FLOW_PUBLIC, SYS_FLOW_SECTIONAL);
        loginmodule::show(DEFAULT_VIEW, null);
    }
}
$template = new standalonetemplate('loginredirect');
$template->assign('output', ob_get_contents());
ob_end_clean();
$template->output();
Beispiel #2
0
function pathos_theme_main()
{
    global $db, $user;
    if ((!defined("SOURCE_SELECTOR") || SOURCE_SELECTOR == 1) && (!defined("CONTENT_SELECTOR") || CONTENT_SELECTOR == 1)) {
        $last_section = pathos_sessions_get("last_section");
        $section = $db->selectObject("section", "id=" . $last_section);
        // View authorization will be taken care of by the runAction and mainContainer functions
        if (pathos_theme_inAction()) {
            pathos_theme_runAction();
        } else {
            if ($section == null) {
                pathos_theme_goDefaultSection();
            } else {
                pathos_theme_mainContainer();
            }
        }
    } else {
        if (isset($_REQUEST['module'])) {
            include_once BASE . "modules/containermodule/actions/orphans_content.php";
        } else {
            pathos_lang_loadDictionary('subsystems', 'theme');
            echo TR_THEMESUBSYSTEM_SELECTMODULE;
        }
    }
}