test
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user