Add: requestTodayBestRecord, updateTodayBestRecord
This commit is contained in:
@@ -352,6 +352,39 @@ class DBConnectManager {
|
||||
xhr.send("AppID=" + appID);
|
||||
}
|
||||
|
||||
updateTodayBestRecord(maestroID, userID, appID, record) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", this.phpPath + "server/record/update_best_record.php", true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.send(
|
||||
"MaestroID=" + maestroID
|
||||
+ "&UserID=" + userID
|
||||
+ "&AppID=" + appID
|
||||
+ "&BestRecord=" + record
|
||||
);
|
||||
}
|
||||
|
||||
requestTodayBestRecord(maestroID, userID, appID, onSucceededListener, onFailedListener) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", this.phpPath + "server/record/request_best_record.php", true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.onreadystatechange = function() {
|
||||
if(xhr.readyState == 4 && xhr.status == 200) {
|
||||
let replyJSON = JSON.parse(xhr.responseText);
|
||||
|
||||
if(replyJSON != null && replyJSON["BestRecord"] != null)
|
||||
onSucceededListener(replyJSON);
|
||||
else
|
||||
onFailedListener(replyJSON);
|
||||
}
|
||||
};
|
||||
xhr.send(
|
||||
"MaestroID=" + maestroID
|
||||
+ "&UserID=" + userID
|
||||
+ "&AppID=" + appID
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
loadTempPlayerHistory(historyRecordManager) {
|
||||
|
||||
Reference in New Issue
Block a user