This commit is contained in:
2026-02-28 18:53:26 +01:00
parent 9eb7740027
commit d28f171263
11 changed files with 30 additions and 22 deletions

View File

@@ -1,8 +1,8 @@
<?php
require "../../main.php";
require "../api.php";
$mcServ = new mcServ();
$db = $mcServ->getDB();
$api = new mcServApi();
$db = $api->getDB();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (!isset($_POST["username"]) || !isset($_POST["passwd"])) {
@@ -22,9 +22,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$result = $stmt->fetch(PDO::FETCH_ASSOC);
if ($result) {
$config = $mcServ->getConf();
$config = $api->getConf();
$session["session_id"] = $mcServ->generateSessionID();
$session["session_id"] = $api->generateSessionID();
$device_id = rand(1, 999);
$json[$device_id] = $session;