diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-08 12:04:30 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-08 12:04:30 +0200 |
commit | 95112b1eb06a4be531ded59563d53a63a8d614e8 (patch) | |
tree | fd3dc676227309c87a39feab9ca458985e327907 /admin/api/terminateAllSessions.php | |
parent | 87303b0d3540037fb94efdde24dbaacb2880d6cb (diff) | |
download | main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.gz main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.bz2 main-95112b1eb06a4be531ded59563d53a63a8d614e8.zip |
Opening!
Diffstat (limited to 'admin/api/terminateAllSessions.php')
-rw-r--r-- | admin/api/terminateAllSessions.php | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/admin/api/terminateAllSessions.php b/admin/api/terminateAllSessions.php index 2aa5c5f..46c1b33 100644 --- a/admin/api/terminateAllSessions.php +++ b/admin/api/terminateAllSessions.php @@ -1,34 +1,34 @@ -<?php - -require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php"; - -if (isset($_GET['_']) && strpos($_GET['_'], "/") === false) { - $arg = $_GET['_']; -} else { - die(); -} - -$webs = scandir("/mnt/kartik/online/private/tokens"); - -foreach ($webs as $webt) { - if (!is_dir("/mnt/kartik/online/private/tokens/" . $webt)) { - $d = json_decode(file_get_contents("/mnt/kartik/online/private/tokens/" . $webt), true); - if ($d["id"] === $arg) { - unlink("/mnt/kartik/online/private/tokens/" . $webt); - } - } -} - -$webs = scandir("/mnt/kartik/online/private/gametokens"); - -foreach ($webs as $webt) { - if (!is_dir("/mnt/kartik/online/private/gametokens/" . $webt)) { - $d = json_decode(file_get_contents("/mnt/kartik/online/private/gametokens/" . $webt), true); - if ($d["id"] === $arg) { - unlink("/mnt/kartik/online/private/gametokens/" . $webt); - } - } -} - -header("Location: /admin/panes/kartik.php"); +<?php
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
+
+if (isset($_GET['_']) && strpos($_GET['_'], "/") === false) {
+ $arg = $_GET['_'];
+} else {
+ die();
+}
+
+$webs = scandir("/mnt/kartik/online/private/tokens");
+
+foreach ($webs as $webt) {
+ if (!is_dir("/mnt/kartik/online/private/tokens/" . $webt)) {
+ $d = json_decode(file_get_contents("/mnt/kartik/online/private/tokens/" . $webt), true);
+ if ($d["id"] === $arg) {
+ unlink("/mnt/kartik/online/private/tokens/" . $webt);
+ }
+ }
+}
+
+$webs = scandir("/mnt/kartik/online/private/gametokens");
+
+foreach ($webs as $webt) {
+ if (!is_dir("/mnt/kartik/online/private/gametokens/" . $webt)) {
+ $d = json_decode(file_get_contents("/mnt/kartik/online/private/gametokens/" . $webt), true);
+ if ($d["id"] === $arg) {
+ unlink("/mnt/kartik/online/private/gametokens/" . $webt);
+ }
+ }
+}
+
+header("Location: /admin/panes/kartik.php");
die();
\ No newline at end of file |