Fix: admin CSS -> BootStrap, expiration, send_email page

This commit is contained in:
2018-09-16 19:03:04 +09:00
parent 0d324bab69
commit 14a3665a95
7 changed files with 146 additions and 130 deletions
+84
View File
@@ -0,0 +1,84 @@
function accoutType(accountType) {
switch(accountType) {
case 1:
return "20명 (1만원)";
case 2:
return "50명 (2만원)";
case 3:
return "100명 (3만원)";
case 4:
return "500명 (4만원)";
case 5:
return "1,000명 (5만원)";
}
return accountType + "? (N/A)";
}
function accountTypePrice(accountType) {
switch(accountType) {
case 1:
return 10000;
case 2:
return 20000;
case 3:
return 30000;
case 4:
return 40000;
case 5:
return 50000;
}
return 0;
}
function accoutTypeValue(accountType) {
switch(accountType) {
case "20명 (1만원)":
return 1;
case "50명 (2만원)":
return 2;
case "100명 (3만원)":
return 3;
case "500명 (4만원)":
return 4;
case "1,000명 (5만원)":
return 5;
}
return accountType + "? (N/A)";
}
function price(requestedAccountType, registeredAccountType) {
var priceRequested = accountTypePrice(requestedAccountType);
var priceRegistered = accountTypePrice(registeredAccountType);
return priceRequested - priceRegistered;
}
function status(status) {
switch(status) {
case 1:
return "요청";
case 2:
return "취소";
case 3:
return "업그레이드 적용";
}
return status + "? (N/A)";
}
-24
View File
@@ -1,24 +0,0 @@
function NumberUtil() {
}
NumberUtil.numberWithCommas = function(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
NumberUtil.numberOfDigits = function(number) {
if(number === 1000)
return 4;
return Math.floor(Math.log(number) / Math.LN10 + 1); // bug : 1000 -> expected 4 but 3
}
NumberUtil.getRecordText = function(value) {
var number = Math.floor(value);
var numberWithCommas = NumberUtil.numberWithCommas(number);
if(isTypingGame())
return numberWithCommas + " 타";
else
return numberWithCommas + " 점";
}