Add: typing app list, activate/deactivate app

This commit is contained in:
2018-07-05 18:25:23 +09:00
parent ae523ea4ad
commit 8a4ff2053a
8 changed files with 338 additions and 36 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
header('Content-Type: application/json');
$maestroID = $_POST["maestro_id"];
$appID = $_POST["app_id"];
include "./../setup/connect_db.php";
activate_app($maestroID, $appID);
$replyJSON["RESULT"] = "ok";
echo json_encode($replyJSON, JSON_UNESCAPED_UNICODE);
$db_conn->close();
function activate_app($maestroID, $appID) {
global $db_conn;
$query = "
INSERT INTO moty_active_app (MaestroID, AppID)
VALUES (?, ?);
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param('ii', $maestroID, $appID);
$stmt->execute();
$stmt->bind_result();
}
?>