Fix: Experience player maestro ID Account Type = 100
This commit is contained in:
@@ -8,9 +8,9 @@ class ScreenBottom {
|
||||
|
||||
this.bottomBarCenterY = game.world.height - ScreenBottom.BOTTOM_BAR_HEIGHT / 2;
|
||||
|
||||
this.leftText = this.printBottomText(this.leftText, "sample", "left");
|
||||
this.centerText = this.printBottomText(this.centerText, "sample", "center");
|
||||
this.rightText = this.printBottomText(this.rightText, "sample", "right");
|
||||
this.leftText = this.printBottomText(this.leftText, "", "left");
|
||||
this.centerText = this.printBottomText(this.centerText, "", "center");
|
||||
this.rightText = this.printBottomText(this.rightText, "", "right");
|
||||
}
|
||||
|
||||
makeBottomLine() {
|
||||
|
||||
@@ -61,8 +61,8 @@ function deleteMaestroAllRecords() {
|
||||
</div>
|
||||
|
||||
<div class="eyebrow ml-auto mt-0 d-md-flex align-items-center">
|
||||
<a class="btn btn-outline-warning btn-lg mr-2" href="javascript:void(0);" onClick="runMaestroAccountApp()">테스트 계정 앱 실행</a>
|
||||
<a class="btn btn-danger btn-lg mr-2" href="javascript:void(0);" onClick="deleteMaestroAllRecords()">테스트 계정 초기화</a>
|
||||
<a class="btn btn-outline-warning btn-lg mr-2" href="javascript:void(0);" onClick="runMaestroAccountApp()">마에스트로 앱 실행</a>
|
||||
<a class="btn btn-danger btn-lg mr-2" href="javascript:void(0);" onClick="deleteMaestroAllRecords()">마에스트로 앱 초기화</a>
|
||||
<a class="btn btn-primary btn-lg" href="javascript:void(0);" onClick="logout()">마에스트로 로그아웃</a>
|
||||
</div>
|
||||
<!--
|
||||
|
||||
@@ -5,39 +5,71 @@ include "./../lib/send_reply_json.php";
|
||||
include "./../setup/connect_db.php";
|
||||
|
||||
|
||||
$maestro_experience_id = get_maestro_experience_id("test");
|
||||
if($maestro_experience_id === null) {
|
||||
set_error_message("등록된 마에스트로 관리자 계정이 없습니다. (".$maestro_experience_id.")");
|
||||
$maestroAccountType = 100;
|
||||
|
||||
$experienceMaestroInfo = get_experience_maestro_info();
|
||||
if($experienceMaestroInfo === null) {
|
||||
set_error_message("등록된 마에스트로 관리자 계정이 없습니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
|
||||
set_data("maestroID", $maestro_experience_id);
|
||||
set_data("playerID", -1);
|
||||
set_data("playerName", "TestPlayer");
|
||||
$maestroTestPlayerInfo = get_maestro_test_player_info($experienceMaestroInfo["MaestroID"]);
|
||||
|
||||
set_data("maestroID", $experienceMaestroInfo["MaestroID"]);
|
||||
set_data("maestroAccountType", $maestroAccountType);
|
||||
set_data("playerID", $maestroTestPlayerInfo["PlayerID"]);
|
||||
set_data("playerName", $maestroTestPlayerInfo["Name"]);
|
||||
set_data("playerAccountType", $maestroTestPlayerInfo["AccountType"]);
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
|
||||
function get_maestro_experience_id($maestro_name) {
|
||||
function get_experience_maestro_info() {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT MaestroID
|
||||
SELECT MaestroID, MaestroTestID
|
||||
FROM moty_maestro
|
||||
WHERE Name = ?
|
||||
WHERE AccountType = 100
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("s", $maestro_name);
|
||||
// $stmt->bind_param("s", $maestro_name);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestro_experience_id);
|
||||
$stmt->bind_result($maestroID, $maestroTestID);
|
||||
// while($stmt->fetch()) {
|
||||
// ;
|
||||
// }
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
return $maestro_experience_id;
|
||||
$result["MaestroID"] = $maestroID;
|
||||
$result["MaestroTestID"] = $maestroTestID;
|
||||
return $result;
|
||||
}
|
||||
|
||||
function get_maestro_test_player_info($maestro_id) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT PlayerID, Name, AccountType
|
||||
FROM moty_player
|
||||
WHERE MaestroID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("i", $maestro_id);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($playerID, $name, $accountType);
|
||||
// while($stmt->fetch()) {
|
||||
// ;
|
||||
// }
|
||||
$stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
$result["PlayerID"] = $playerID;
|
||||
$result["Name"] = $name;
|
||||
$result["AccountType"] = $accountType;
|
||||
return $result;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user