Add: app highest record

This commit is contained in:
2018-10-23 22:29:24 +09:00
parent e384627c54
commit d45e44c6b2
12 changed files with 295 additions and 20 deletions
+33
View File
@@ -379,6 +379,18 @@ DBConnectManager.prototype.updateTodayBestRecord = function(maestroID, playerID,
);
}
DBConnectManager.prototype.updateAppHighestRecord = function(maestroID, playerID, appID, record) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/record/update_app_highest_record.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(
"MaestroID=" + maestroID
+ "&PlayerID=" + playerID
+ "&AppID=" + appID
+ "&Record=" + record
);
}
DBConnectManager.prototype.requestTodayBestRecord = function(maestroID, playerID, appID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/record/request_best_record.php", true);
@@ -400,6 +412,27 @@ DBConnectManager.prototype.requestTodayBestRecord = function(maestroID, playerID
);
}
DBConnectManager.prototype.requestAppHighestRecord = function(maestroID, playerID, appID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/record/request_app_highest_record.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 && replyJSON["AppHighestRecord"] != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send(
"MaestroID=" + maestroID
+ "&PlayerID=" + playerID
+ "&AppID=" + appID
);
}
DBConnectManager.prototype.requestAppRanking = function(maestroID, appID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/record/app_ranking.php", true);