<?php
include_once "init.php";
$getId = $_GET['id'];
$firebase = new \Firebase\FirebaseLib(DEFAULT_URL, DEFAULT_TOKEN);
$license_key = $firebase->get(DEFAULT_PATH . "/ARCusers/$getId/License/license key");
if (isset($_GET['LicenseKey'])) {
if ($license_key == '"' . $_GET['addlicensekey'] . '"') {
$firebase->set(DEFAULT_PATH . "/ARCusers/$getId/License/license key activation", true);
} else {
echo "false";
echo $getId;
}
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Firebase</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<form class="pure-form" method="get">
<h2>License key</h2>
<input name="addlicensekey" placeholder="put your license key" type="text">
<br><br><br>
<button type="submit" onclick="" name="LicenseKey" class="pure-button pure-button-primary">
Submit
</button>
<br>
<hr>
<br>
</form>
</body>
</html>