コード例 #1
0
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
if (!defined('EXPONENT')) {
    exit('');
}
ob_start();
if (isset($_GET['redirecturl'])) {
    $redirect = urldecode($_GET['redirecturl']);
    if (substr($redirect, 0, 4) != 'http') {
        $redirect = URL_FULL . $redirect;
    }
    exponent_sessions_set('redirecturl', $redirect);
}
//$SYS_FLOW_REDIRECTIONPATH = 'loginredirect';
exponent_flow_set(SYS_FLOW_PUBLIC, SYS_FLOW_ACTION);
if (exponent_sessions_loggedIn()) {
    header('Location: ' . exponent_sessions_get('redirecturl'));
    exit('Redirecting...');
}
$i18n = exponent_lang_loadFile('modules/loginmodule/actions/loginredirect.php');
loginmodule::show('Default', null, $i18n['login']);
$template = new template('loginmodule', '_login_redirect');
$template->assign('output', ob_get_contents());
ob_end_clean();
$template->output();
コード例 #2
0
# not, write to:
#
# Free Software Foundation, Inc.,
# 59 Temple Place,
# Suite 330,
# Boston, MA 02111-1307  USA
#
# $Id: loginredirect.php,v 1.6 2005/03/28 19:02:19 filetreefrog Exp $
##################################################
if (!defined('PATHOS')) {
    exit('');
}
ob_start();
if (isset($_GET['redirecturl'])) {
    $redirect = urldecode($_GET['redirecturl']);
    if (substr($redirect, 0, 4) != 'http') {
        $redirect = URL_FULL . $redirect;
    }
    pathos_sessions_set('redirecturl', $redirect);
}
//$SYS_FLOW_REDIRECTIONPATH = 'loginredirect';
pathos_flow_set(SYS_FLOW_PUBLIC, SYS_FLOW_ACTION);
if (pathos_sessions_loggedIn()) {
    header('Location: ' . pathos_sessions_get('redirecturl'));
    exit('Redirecting...');
}
loginmodule::show('Default', null, 'Log In');
$template = new template('loginmodule', '_login_redirect');
$template->assign('output', ob_get_contents());
ob_end_clean();
$template->output();
コード例 #3
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();