diff options
Diffstat (limited to 'includes/session.php')
-rw-r--r-- | includes/session.php | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/includes/session.php b/includes/session.php deleted file mode 100644 index b440c9c..0000000 --- a/includes/session.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -global $isLoggedIn; -global $isUserLoggedIn; -global $_PROFILE; - -if (isset($_COOKIE['PEH2_SESSION_TOKEN'])) { - if (str_contains($_COOKIE['PEH2_SESSION_TOKEN'], ".") || str_contains($_COOKIE['PEH2_SESSION_TOKEN'], "/")) { - $isLoggedIn = false; - } - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN'])))) { - $_PROFILE = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN']))), true); - - if (isset($_GET['invert'])) { - $_PROFILE["login"] = $_PROFILE["login"] === "raindrops" ? "cloudburst" : "raindrops"; - $_PROFILE["name"] = $_PROFILE["name"] === "Raindrops System" ? "Cloudburst System" : "Raindrops System"; - } - - $isLoggedIn = true; - } else { - $isLoggedIn = false; - } -} else { - $isLoggedIn = false; -} - -if (isset($_COOKIE['PEH2_USER_TOKEN'])) { - if (str_contains($_COOKIE['PEH2_USER_TOKEN'], ".") || str_contains($_COOKIE['PEH2_USER_TOKEN'], "/")) { - $isUserLoggedIn = false; - } - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens-public/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_USER_TOKEN'])))) { - $_PROFILE = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens-public/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_USER_TOKEN']))), true); - $isUserLoggedIn = true; - } else { - $isUserLoggedIn = false; - } -} else { - $isUserLoggedIn = false; -}
\ No newline at end of file |