31 lines
588 B
PHP
31 lines
588 B
PHP
<?php
|
|
header('Content-Type: application/json');
|
|
|
|
include "./../lib/send_reply_json.php";
|
|
include "./../setup/connect_db.php";
|
|
|
|
$maestroID = $_POST["maestro_id"];
|
|
$appID = $_POST["app_id"];
|
|
|
|
|
|
activate_app($maestroID, $appID);
|
|
|
|
set_data("activatedAppList", $activated_mouse_app_list);
|
|
send_result_success();
|
|
exit;
|
|
|
|
|
|
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();
|
|
}
|
|
|
|
?>
|