Add: php server files for timer

This commit is contained in:
2018-12-13 00:36:48 +09:00
parent edbd4743af
commit 537b0c1db1
10 changed files with 374 additions and 88 deletions
@@ -0,0 +1,33 @@
<?php
header('Content-Type: application/json');
$maestro_id = $_POST["MaestroID"];
$player_id = $_POST["PlayerID"];
$start_time = $_POST["StartTime"];
// echo $maestro_id." / ".$player_id;
include "./../lib/send_reply_json.php";
include "./../setup/connect_db.php";
update_start_time($maestro_id, $player_id, $start_time);
send_result_success();
exit;
function update_start_time($maestro_id, $player_id, $start_time) {
global $db_conn;
$query = "
UPDATE license_time
SET StartTime = ?
WHERE MaestroID = ? AND PlayerID = ?
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param('iii', $start_time, $maestro_id, $player_id);
$stmt->execute();
}
?>