************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif (!IS_LOGGED_IN())
-{
+} elseif (!IS_LOGGED_IN()) {
LOAD_URL("modules.php?module=index");
}
// NEW: Fixed the Set of Cookies, you mus add right TimeSet, if you changed it in What_login.php! (eg. time()- cookieTime
-if (set_session("userid", "") && set_session("u_hash", "") && set_session("lifetime", ""))
-{
+if (destroy_user_session()) {
// Remove theme cookie as well
set_session("mxchange_theme", "");
// Destroy session here
@session_destroy();
-}
- else
-{
+} else {
// Cannot logout! :-(
$URL .= "&msg=".CODE_LOGOUT_FAILED;
}
-//
+// Load the URL
LOAD_URL($URL);
+
//
?>