diff --git a/src/web/maestro/extension.html b/src/web/maestro/extension.html index c0581f2..a323aac 100644 --- a/src/web/maestro/extension.html +++ b/src/web/maestro/extension.html @@ -39,6 +39,7 @@ --> + diff --git a/src/web/module/maestro_extension.html b/src/web/module/maestro_extension.html index f8695da..a053466 100644 --- a/src/web/module/maestro_extension.html +++ b/src/web/module/maestro_extension.html @@ -2,7 +2,6 @@ var registeredAccountType = -1; - $(document).ready(function() { loadMaestroInfo(maestroID); }); @@ -15,9 +14,10 @@ function loadMaestroInfo(maestroID) { (function(jsonData) { // console.log(jsonData); registeredAccountType = jsonData.accountType; + showEndDate(jsonData.availableActivateDateTime); - showPlayerCount(jsonData.accountType, jsonData.playerCount); - updateCards(registeredAccountType); + showPrice(); + showMaestroName(jsonData.name); }), (function(errorMessage, errorCode) { @@ -44,120 +44,31 @@ function showEndDate(date) { $("#countdown_day").addClass("bg-secondary text-light"); else $("#countdown_day").addClass("text-muted"); + + $("#end_day").html(endDate); } -function showPlayerCount(accountType, playerCount) { - $("#maestro_info_player_count").val("학생수 : " + playerCount + " / " + accountTypePlayerCount(accountType)); +function showPrice() { + $("#price_account").html( + NumberUtil.numberWithCommas(accountTypePrice(registeredAccountType)) + "원" + ); + // accountTypePrice(accountType) + "원"); } -var CARD_TYPE_EXPERIENCE = "experience"; -var CARD_TYPE_LOWER_PRICE = "lower_price"; -var CARD_TYPE_PRESENT_PRICE = "present_price"; -var CARD_TYPE_UPPER_PRICE = "upper_price"; - -function updateCards(accountType) { - // console.log(accountType); - switch(accountType) { - case 100: - case 101: - setCardConent(1, CARD_TYPE_EXPERIENCE); - setCardConent(2, CARD_TYPE_EXPERIENCE); - setCardConent(3, CARD_TYPE_EXPERIENCE); - setCardConent(4, CARD_TYPE_EXPERIENCE); - setCardConent(5, CARD_TYPE_EXPERIENCE); - break; - - case 1: - setCardConent(1, CARD_TYPE_PRESENT_PRICE); - setCardConent(2, CARD_TYPE_UPPER_PRICE); - setCardConent(3, CARD_TYPE_UPPER_PRICE); - setCardConent(4, CARD_TYPE_UPPER_PRICE); - setCardConent(5, CARD_TYPE_UPPER_PRICE); - break; - - case 2: - setCardConent(1, CARD_TYPE_LOWER_PRICE); - setCardConent(2, CARD_TYPE_PRESENT_PRICE); - setCardConent(3, CARD_TYPE_UPPER_PRICE); - setCardConent(4, CARD_TYPE_UPPER_PRICE); - setCardConent(5, CARD_TYPE_UPPER_PRICE); - break; - - case 3: - setCardConent(1, CARD_TYPE_LOWER_PRICE); - setCardConent(2, CARD_TYPE_LOWER_PRICE); - setCardConent(3, CARD_TYPE_PRESENT_PRICE); - setCardConent(4, CARD_TYPE_UPPER_PRICE); - setCardConent(5, CARD_TYPE_UPPER_PRICE); - break; - - case 4: - setCardConent(1, CARD_TYPE_LOWER_PRICE); - setCardConent(2, CARD_TYPE_LOWER_PRICE); - setCardConent(3, CARD_TYPE_LOWER_PRICE); - setCardConent(4, CARD_TYPE_PRESENT_PRICE); - setCardConent(5, CARD_TYPE_UPPER_PRICE); - break; - - case 5: - default: - setCardConent(1, CARD_TYPE_LOWER_PRICE); - setCardConent(2, CARD_TYPE_LOWER_PRICE); - setCardConent(3, CARD_TYPE_LOWER_PRICE); - setCardConent(4, CARD_TYPE_LOWER_PRICE); - setCardConent(5, CARD_TYPE_PRESENT_PRICE); - break; - - } +function showMaestroName(maestroName) { + $("#maestro_name_account").html(maestroName); } -function setCardConent(cardNo, cardType) { - var htmlID = "#account_type_" + cardNo; - var buttonID = htmlID + "_btn"; - var footerID = htmlID + "_footer"; - - switch(cardType) { - case CARD_TYPE_EXPERIENCE: - $(htmlID).addClass("border-warning"); - $(buttonID).addClass("btn-secondary disabled"); - $(footerID).addClass("text-danger"); - $(footerID).text("체험 계정은 업그레이드가 불가능합니다."); - break; - - case CARD_TYPE_LOWER_PRICE: - $(htmlID).addClass("border-muted"); - $(buttonID).addClass("btn-secondary disabled"); - $(footerID).addClass("text-muted"); - $(footerID).text("낮은 요금제"); - break; - - case CARD_TYPE_PRESENT_PRICE: - $(htmlID).addClass("border-warning"); - $(buttonID).addClass("btn-secondary disabled"); - $(footerID).addClass("text-warning"); - $(footerID).text("현재 요금제"); - break; - - case CARD_TYPE_UPPER_PRICE: - $(htmlID).addClass("border-primary"); - $(buttonID).addClass("btn-primary"); - $(footerID).addClass("text-primary"); - $(footerID).text("업그레이드 가능"); - break; - } -} - -function upgradeMaestroInfo(accountType) { - console.log("upgrade to " + accountType); - var upgradeAccountType = accountType; +function extendMaestroAccount() { + // console.log("extend maestro account"); sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode); - "./../server/maestro/request_upgrade_maestro.php", - "maestro_id=" + maestroID + "®istered_account_type=" + registeredAccountType + "&upgrade_account_type=" + upgradeAccountType, + "./../server/maestro/request_extend_maestro.php", + "maestro_id=" + maestroID + "&account_type=" + registeredAccountType, (function(jsonData) { // console.log(jsonData); - alert("업그레이드 요청이 등록되었습니다."); + alert("연장 신청이 등록되었습니다.\n입금 확인과 처리에 시간이 조금 걸립니다. 양해 부탁드립니다."); location.href="main_menu.html"; }), @@ -196,12 +107,43 @@ function upgradeMaestroInfo(accountType) {
-
계정 연장 신청
+
마에스트로 계정 연장 신청
- +
+

유효 기간을 +1년 연장합니다.

+
    +
  1. + 만료일() 기준으로 1년이 추가됩니다.
    (연장 신청한 날짜와는 무관합니다) +
  2. +
  3. 아래 내용을 참고하여 송금을 부탁드립니다.
  4. +
  5. 송금 내역이 확인되는대로 연장 처리를 진행합니다.
  6. +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ +
+ + 빠른 입금 확인과 계정 연장 처리 작업을 위해, 송금자명을 마에스트로 아이디로 입력 부탁드립니다. +
+
+
+ +
+ +
+
@@ -211,9 +153,13 @@ function upgradeMaestroInfo(accountType) {

마에스트로 계정 연장 안내

    -
  1. 위에서 업그레이드 하실 상품을 선택하세요.
  2. -
  3. 연장을 신청하신 후, 추가 금액을 계좌이체해 주세요.
  4. -
  5. 입금 내역이 확인되는대로 마에스트로 계정의 유효기간 +1년을 적용해 드리겠습니다.
  6. +
  7. 계정 연장을 위한 송금 내용을 이메일로 발송했습니다.
  8. +
  9. + 입금 확인 및 적용을 수작업으로 하고 있습니다. 최대한 빨리 확인하고 적용할 수 있도록 노력하겠습니다.
    + (보통 늦어도 반나절 이내에 처리됩니다) +
  10. +
  11. 유효 기간은 +1년씩만 연장할 수 있습니다.
  12. +
  13. 계정 업그레이드를 하셔도 +1년 연장 효과가 적용됩니다.
diff --git a/src/web/sql/make_db.sql b/src/web/sql/make_db.sql index 37ff6f9..b12539d 100644 --- a/src/web/sql/make_db.sql +++ b/src/web/sql/make_db.sql @@ -32,6 +32,16 @@ CREATE TABLE maestro_upgrade ( FOREIGN KEY (MaestroID) REFERENCES maestro(MaestroID) ); +CREATE TABLE maestro_extension ( + MaestroExtensionID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + AccountType INT UNSIGNED NOT NULL, + RequestedDateTime DATETIME NOT NULL, + Status INT UNSIGNED NOT NULL, + MaestroID INT UNSIGNED NOT NULL, + + FOREIGN KEY (MaestroID) REFERENCES maestro(MaestroID) +); + CREATE TABLE player ( PlayerID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, MaestroID INT UNSIGNED NOT NULL,