diff options
Diffstat (limited to 'admin/api/terminateWebSessions.php')
-rw-r--r-- | admin/api/terminateWebSessions.php | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/admin/api/terminateWebSessions.php b/admin/api/terminateWebSessions.php index 956782f..170f4d8 100644 --- a/admin/api/terminateWebSessions.php +++ b/admin/api/terminateWebSessions.php @@ -1,23 +1,23 @@ -<?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); - } - } -} - -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);
+ }
+ }
+}
+
+header("Location: /admin/panes/kartik.php");
die();
\ No newline at end of file |