if (isset($_POST["core"])) { $_SESSION["core"] = $_POST["core"]; } } $configFilePath = $rootpath . "/../config/" . $config_file; if (!file_exists($configFilePath)) { echo "Configuration file not found [" . $configFilePath . "]"; exit; } $config = new ConfigTool(); $config->setConfigFromFile($configFilePath); $config->setCookiePath("/"); $config->setCookieDomain($_SERVER['SERVER_NAME']); $config->setCookieExpire(3600 * 10); $debug = $config->get("application.debug") == "1"; $debug_file = $config->getDefault("application.logfile", ""); $cLog = new Logger($debug_file); if ($debug) { $cLog->setDebug(true); } $cLog->log_debug("------ search2 ------"); $cLog->log_debug("config = " . $config_file); $cLog->log_debug("key = " . $key); // $user initialisation // if (isset($_SESSION["user"])) { $user = $_SESSION["user"]; } else { $user = new User(); $_SESSION["user"] = $user; }
} } } if (!isset($_SESSION["config"]) || $_SESSION["config"] != $config_file) { session_unset(); $_SESSION["config"] = $config_file; } $configFilePath = $rootpath . "/config/" . $config_file; if (!file_exists($configFilePath)) { echo "Configuration file not found [" . $configFilePath . "]"; exit; } $config = new ConfigTool(); $config->setConfigFromFile($configFilePath); $debug = $config->get("application.debug") == "1"; $debug_file = $config->getDefault("application.logfile", ""); $cLog = new Logger($debug_file); if ($debug) { $cLog->setDebug(true); } $theme_name = $config->getDefault("application.theme_name", "ca"); // // $user initialisation // if (isset($_SESSION["user"])) { $user = $_SESSION["user"]; } else { $user = new User(); $_SESSION["user"] = $user; } //