* @package Kernel * @version $Id$ */ ?> clear(); $cookie->set(); session_destroy(); // Restore selected language if needed if (strcmp($sel_lang, "") != 0) { session_name("VCD"); session_start(); $_SESSION['vcdlang'] = $sel_lang; } // remember the template if any is selected if (!is_null($template)) { $Cookie = new SiteCookie("vcd_cookie"); if (strcmp($sel_lang, "") != 0) { $Cookie->put("language",$sel_lang); } $Cookie->put("template", $template); $Cookie->set(); } header("Location: ".$_SERVER['HTTP_REFERER'].""); /* Redirect browser */ exit(); } // Only check for cookie if user is not logged in if (!VCDUtils::isLoggedIn()) { VCDAuthentication::checkCookie(); } // Clean up magic_quotes garbage VCDUtils::cleanMagicQuotes(); global $CURRENT_PAGE; if (isset($_GET['page'])) { $CURRENT_PAGE = $_GET['page']; } if (isset($_SESSION['vcdlang'])) { $language = new VCDLanguage(); $language->load($_SESSION['vcdlang']); VCDClassFactory::put($language); } else { $language = new VCDLanguage(); // Has the user a selected language in cookie? SiteCookie::extract('vcd_cookie'); if (isset($_COOKIE['language'])) { if ($language instanceof VCDLanguage ) { $language->load($_COOKIE['language']); } } VCDClassFactory::put($language); } ?>