blob: 1a719b021d4adc67fb0d6f712d29070181a31c12 (
plain)
1
2
3
4
5
6
7
8
9
10
|
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $_PROFILE;
if (!$isLoggedIn) header("Location: /-/login") and die();
$names = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/computers/names.json"), true);
$names[$_GET["id"]] = $_GET["name"];
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/computers/names.json", json_encode($names));
die();
|