Fix: maestro experience account type = 101
This commit is contained in:
@@ -33,9 +33,13 @@ class MaestroInfo {
|
||||
switch(this.accountType) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 100:
|
||||
case 101:
|
||||
return 20;
|
||||
|
||||
case 2:
|
||||
return 50;
|
||||
|
||||
case 3:
|
||||
return 100;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="javascript:void(0);" onClick="goHome()" href="">마우스 타자 연습</a>
|
||||
<a class="navbar-brand" href="javascript:void(0);" onClick="goHome()" href="">홈</a>
|
||||
</div>
|
||||
|
||||
<div class="eyebrow ml-auto mt-0 d-md-flex align-items-center">
|
||||
|
||||
@@ -56,7 +56,9 @@ function deleteMaestroAllRecords() {
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark py-3">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
<div class="navbar-header text-white">
|
||||
<a class="navbar-brand" href="javascript:void(0);" onClick="logout()" href="">홈</a>
|
||||
|
|
||||
<a class="navbar-brand" href="javascript:void(0);" onClick="goHome()" href="">마에스트로 계정 홈</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -72,11 +72,11 @@ function activateApp(appID) {
|
||||
"maestro_id=" + maestroID + "&app_id=" + appID,
|
||||
|
||||
(jsonData) => {
|
||||
// addPlayerListManager.updateAddPlayerListPage(1);
|
||||
// console.log(jsonData);
|
||||
showErrorMessage("[ " + jsonData["koreanName"] + "] 앱이 메뉴에 추가되었습니다. (위의 [마에스트로 앱 실행] 버튼을 눌러 확인해보세요)", "success");
|
||||
},
|
||||
|
||||
(errorMessage, errorCode) => {
|
||||
console.log("errorMessage : " + errorMessage);
|
||||
showErrorMessage(errorMessage, "error");
|
||||
}
|
||||
|
||||
@@ -89,11 +89,11 @@ function deactivateApp(appID) {
|
||||
"maestro_id=" + maestroID + "&app_id=" + appID,
|
||||
|
||||
(jsonData) => {
|
||||
// addPlayerListManager.updateAddPlayerListPage(1);
|
||||
// console.log(jsonData);
|
||||
showErrorMessage("[ " + jsonData["koreanName"] + "] 앱이 메뉴에서 삭제되었습니다. (위의 [마에스트로 앱 실행] 버튼을 눌러 확인해보세요)", "danger");
|
||||
},
|
||||
|
||||
(errorMessage, errorCode) => {
|
||||
console.log("errorMessage : " + errorMessage);
|
||||
showErrorMessage(errorMessage, "error");
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ function deactivateApp(appID) {
|
||||
|
||||
|
||||
|
||||
<div class="row mx-1">
|
||||
<div clas됩="row mx-1">
|
||||
<div class="col">
|
||||
|
||||
<h5 class="mt-2 mb-2">마우스 연습</h5>
|
||||
|
||||
@@ -87,7 +87,7 @@ function checkMaestroIDName() {
|
||||
}
|
||||
|
||||
function changeMaestroInfo() {
|
||||
if(registeredAccountType === 0) {
|
||||
if(registeredAccountType >= 100) {
|
||||
showErrorMessage("체험 계정은 정보 수정이 불가능합니다.", "error");
|
||||
return;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ function changeMaestroInfo() {
|
||||
}
|
||||
|
||||
function checkPassword() {
|
||||
if(registeredAccountType === 0) {
|
||||
if(registeredAccountType >= 100) {
|
||||
showErrorMessage("체험 계정은 암호 수정이 불가능합니다.", "error");
|
||||
$('html, body').animate({
|
||||
scrollTop: $("#message_box").offset().top + 'px'
|
||||
|
||||
@@ -28,7 +28,8 @@ function loadMaestroInfo(maestroID) {
|
||||
function updateCards(accountType) {
|
||||
console.log(accountType);
|
||||
switch(accountType) {
|
||||
case 0:
|
||||
case 100:
|
||||
case 101:
|
||||
$("#account_type_1").addClass("border-warning");
|
||||
$("#account_type_1_btn").addClass("btn-secondary disabled");
|
||||
$("#account_type_1_footer").addClass("text-danger");
|
||||
|
||||
@@ -9,8 +9,10 @@ $appID = $_POST["app_id"];
|
||||
|
||||
|
||||
activate_app($maestroID, $appID);
|
||||
$appInfo = get_app_name($appID);
|
||||
|
||||
set_data("activatedAppList", $activated_mouse_app_list);
|
||||
set_data("appName", $appInfo["AppName"]);
|
||||
set_data("koreanName", $appInfo["KoreanName"]);
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
@@ -28,4 +30,23 @@ function activate_app($maestroID, $appID) {
|
||||
$stmt->bind_result();
|
||||
}
|
||||
|
||||
function get_app_name($appID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT AppName, KoreanName
|
||||
FROM moty_app
|
||||
WHERE AppID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('i', $appID);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($appName, $koreanName);
|
||||
$stmt->fetch();
|
||||
|
||||
$result["AppName"] = $appName;
|
||||
$result["KoreanName"] = $koreanName;
|
||||
return $result;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -9,8 +9,10 @@ $appID = $_POST["app_id"];
|
||||
|
||||
|
||||
deactivate_app($maestroID, $appID);
|
||||
$appInfo = get_app_name($appID);
|
||||
|
||||
set_data("activatedAppList", $activated_mouse_app_list);
|
||||
set_data("appName", $appInfo["AppName"]);
|
||||
set_data("koreanName", $appInfo["KoreanName"]);
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
@@ -28,4 +30,23 @@ function deactivate_app($maestroID, $appID) {
|
||||
$stmt->bind_result();
|
||||
}
|
||||
|
||||
function get_app_name($appID) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT AppName, KoreanName
|
||||
FROM moty_app
|
||||
WHERE AppID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('i', $appID);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($appName, $koreanName);
|
||||
$stmt->fetch();
|
||||
|
||||
$result["AppName"] = $appName;
|
||||
$result["KoreanName"] = $koreanName;
|
||||
return $result;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -39,7 +39,7 @@ function get_maestro_experience_id() {
|
||||
$query = "
|
||||
SELECT MaestroID
|
||||
FROM moty_maestro
|
||||
WHERE AccountType = 0
|
||||
WHERE AccountType = 101
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
// $stmt->bind_param("s", $maestro_name);
|
||||
|
||||
Reference in New Issue
Block a user