Add: get player enter_code from server
This commit is contained in:
@@ -62,6 +62,23 @@ DBConnectManager.prototype.requestCheckPlayerLogin = function(maestroName, playe
|
||||
xhr.send("maestro_name=" + maestroName + "&name=" + playerName + "&enter_code=" + enterCode);
|
||||
}
|
||||
|
||||
DBConnectManager.prototype.requestPlayerEnterCode = function(maestroID, playerID, onSucceededListener, onFailedListener) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", this.phpPath + "server/player/get_entercode.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["EnterCode"] != null)
|
||||
onSucceededListener(replyJSON);
|
||||
else
|
||||
onFailedListener(replyJSON);
|
||||
}
|
||||
};
|
||||
xhr.send("maestro_id=" + maestroID + "&player_id=" + playerID);
|
||||
}
|
||||
|
||||
/*
|
||||
DBConnectManager.prototype.requestAppList = function(maestroID, onSucceededListener, onFailedListener) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
||||
Reference in New Issue
Block a user