Ejemplo n.º 1
0
    if (isset($_GET['bypass_language']) && in_array($_GET['bypass_language'], array_keys($languages))) {
        $_SESSION['s_language'] = $_GET['bypass_language'];
    }
    //Keep persisted language across page calls
    if (isset($_SESSION['s_language'])) {
        $smarty->assign("T_LANGUAGE", $_SESSION['s_language']);
    } else {
        $smarty->assign("T_LANGUAGE", $GLOBALS['configuration']['default_language']);
    }
}
/*
 * Check if you should input the JS code to
 * trigger sending the next notificatoin emails
 * Since 3.6.0
 */
if (EfrontNotification::shouldSendNextNotifications()) {
    $smarty->assign("T_TRIGGER_NEXT_NOTIFICATIONS_SEND", 1);
    $_SESSION['send_next_notifications_now'] = 0;
    // the msg that triggered the immediate send should be sent now
}
//if there is cms page and no get parameter defined, redirect to the cms page
if ($configuration['cms_page'] != "" && sizeof($_GET) == 0 && file_exists(G_CURRENTTHEMEPATH . "external/" . $GLOBALS['configuration']['cms_page'] . ".php")) {
    //check also if file exists to prevent from broken link
    //eF_redirect("".G_RELATIVEADMINLINK.$GLOBALS['configuration']['cms_page'].".php");
    eF_redirect("" . G_SERVERNAME . G_CURRENTTHEMEURL . "external/" . $configuration['cms_page'] . ".php");
}
//The user logged out
if (isset($_GET['logout']) && !isset($_POST['submit_login'])) {
    //session_start();			//Isn't needed here if the head session_start() is in place
    if (isset($_SESSION['s_login']) && $_SESSION['s_login']) {
        try {