Add: app highest record
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user