define('SCRIPT_FILENAME', 'login.php'); ob_start(); // Initialize the Exponent Framework require_once 'exponent.php'; // Initialize the Sessions Subsystem if (!defined('SYS_SESSIONS')) { require_once BASE . 'subsystems/sessions.php'; } // Initialize the Theme Subsystem if (!defined('SYS_THEME')) { require_once BASE . 'subsystems/theme.php'; } if (exponent_sessions_loggedIn()) { $SYS_FLOW_REDIRECTIONPATH = 'exponent_default'; exponent_flow_redirect(); exit('Redirecting...'); } else { if (isset($_REQUEST['module']) && isset($_REQUEST['action'])) { $SYS_FLOW_REDIRECTIONPATH = 'loginredirect'; exponent_theme_runAction(); LoginModule::show(DEFAULT_VIEW, null); } else { $SYS_FLOW_REDIRECTIONPATH = 'loginredirect'; exponent_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();
# 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();