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
+43
View File
@@ -420,6 +420,49 @@ DBConnectManager.prototype.requestLicenseTimeData = function(maestroID, playerID
);
}
DBConnectManager.prototype.updateLicenseStartTime = function(maestroID, playerID, startTime, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/license_timer/update_license_start_time.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
var replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send(
"MaestroID=" + maestroID
+ "&PlayerID=" + playerID
+ "&StartTime=" + startTime
);
}
DBConnectManager.prototype.updateLicenseLeftTime = function(maestroID, playerID, leftTime, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/license_timer/update_license_left_time.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
var replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send(
"MaestroID=" + maestroID
+ "&PlayerID=" + playerID
+ "&LeftTime=" + leftTime
);
}
DBConnectManager.prototype.loadTempPlayerHistory = function(historyRecordManager) {
historyRecordManager.push(new HistoryRecord("05/14", "space_invaders", 14460));