From 3a1be0744ca3eb5a7acf99aab4460f0e105c779f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Tue, 4 Sep 2018 18:14:15 +0900 Subject: [PATCH] Add: maestro accountType 4(500 players), 5(1,000 players) --- src/web/js/lib/maestro_info.js | 9 +++++++++ src/web/module/maestro_upgrade.html | 15 +++++++++++++++ src/web/server/player/registered_player_count.php | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/web/js/lib/maestro_info.js b/src/web/js/lib/maestro_info.js index 1e798cf..1c854aa 100644 --- a/src/web/js/lib/maestro_info.js +++ b/src/web/js/lib/maestro_info.js @@ -42,6 +42,15 @@ class MaestroInfo { case 3: return 100; + + case 4: + return 500; + + case 5: + return 1000; + + default: + return 0; } } diff --git a/src/web/module/maestro_upgrade.html b/src/web/module/maestro_upgrade.html index a3b7f8a..1dbed53 100644 --- a/src/web/module/maestro_upgrade.html +++ b/src/web/module/maestro_upgrade.html @@ -97,6 +97,21 @@ function updateCards(accountType) { $("#account_type_3_footer").text("현재 적용된 요금제입니다."); break; + case 4: + case 5: + default: + $("#account_type_1_btn").addClass("btn-secondary disabled"); + $("#account_type_1_footer").addClass("text-muted"); + $("#account_type_1_footer").text("낮은 요금제로 내릴 수는 없습니다."); + + $("#account_type_2_btn").addClass("btn-secondary disabled"); + $("#account_type_2_footer").addClass("text-muted"); + $("#account_type_2_footer").text("낮은 요금제로 내릴 수는 없습니다."); + + $("#account_type_3_btn").addClass("btn-secondary disabled"); + $("#account_type_3_footer").addClass("text-muted"); + $("#account_type_3_footer").text("낮은 요금제로 내릴 수는 없습니다."); + break; } } diff --git a/src/web/server/player/registered_player_count.php b/src/web/server/player/registered_player_count.php index e4b0e9b..1e11ca5 100644 --- a/src/web/server/player/registered_player_count.php +++ b/src/web/server/player/registered_player_count.php @@ -8,7 +8,7 @@ $maestroID = $_POST["maestro_id"]; $playerCount = getPlayerCount($maestroID); -if($result === null) { +if($playerCount === null || $playerCount === 0) { set_error_message("등록된 학생이 없습니다."); send_result_fail(); exit;