Add: typing app list, activate/deactivate app
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user