From 5e768d30a0c8ea53423cc4f077c8f37381b8cbb3 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Thu, 18 May 2023 18:05:49 +0200 Subject: Updated 2 files (automated) --- pages/api/computer.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pages/api') diff --git a/pages/api/computer.php b/pages/api/computer.php index f5117f9..7dce4b6 100644 --- a/pages/api/computer.php +++ b/pages/api/computer.php @@ -52,8 +52,15 @@ switch ($_GET['type']) { case "data": if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/computers/metadata")) mkdir($_SERVER['DOCUMENT_ROOT'] . "/includes/data/computers/metadata"); + if (isset($json_object["_session"])) unset($json_object["_session"]); file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/computers/metadata/" . $_PROFILE['login'] . "-" . $host . ".json", json_encode($json_object)); break; } -die($_PROFILE['login'] . "-" . $host); \ No newline at end of file +if (isset($_GET["json"])) { + die(json_encode([ + "id" => $_PROFILE['login'] . "-" . $host + ])); +} else { + die($_PROFILE['login'] . "-" . $host); +} \ No newline at end of file -- cgit