summaryrefslogtreecommitdiff
path: root/pages/sessions.inc
diff options
context:
space:
mode:
Diffstat (limited to 'pages/sessions.inc')
-rw-r--r--pages/sessions.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/pages/sessions.inc b/pages/sessions.inc
index 0e4e779..fc861bf 100644
--- a/pages/sessions.inc
+++ b/pages/sessions.inc
@@ -57,8 +57,8 @@ $verifiedNames = [
foreach ($list as $token): $session = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $token), true); if (isset($session["profile"]) && isset($session["name"]) && ($session["profile"]["id"] ?? "") === ($_PROFILE["id"] ?? "")): uasort($session["addresses"], function ($a, $b) {
return $b - $a;
}); ?>
- <a class="list-group-item list-group-item-action" onclick="logOut(&quot;<?= sha1($token) . md5($token) ?>&quot;);">
- <b><?= $session["name"] ?></b><?php if ($token === $_COOKIE["PEH2_SESSION_TOKEN"]): ?><span style="margin-left: 10px;" class="badge bg-primary">This device</span><?php endif; ?><script>window.devices["<?= sha1($token) . md5($token) ?>"]=JSON.parse(`<?= json_encode([
+ <a class="list-group-item list-group-item-action" onclick="logOut(&quot;<?= bin2hex(substr($token, 0, 50)) ?>&quot;);">
+ <b><?= $session["name"] ?></b><?php if ($token === $_COOKIE["PEH2_SESSION_TOKEN"]): ?><span style="margin-left: 10px;" class="badge bg-primary">This device</span><?php endif; ?><script>window.devices["<?= bin2hex(substr($token, 0, 50)) ?>"]=JSON.parse(`<?= json_encode([
"name" => trim($session["name"]),
"lastIP" => array_keys($session["addresses"])[count(array_keys($session["addresses"])) > 0 ? count(array_keys($session["addresses"])) - 1 : 0] ?? "-",
"lastSeen" => timeAgo($session["last"]),