Merge pull request 'feat: webpack 빌드 통일, TipTap 에디터 적용' (#201) from unifyBuildPath into devel

Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/201
This commit is contained in:
2021-12-14 02:24:17 +09:00
90 changed files with 2377 additions and 1343 deletions
+40 -37
View File
@@ -1,39 +1,42 @@
module.exports = { module.exports = {
root: true, root: true,
parser: "vue-eslint-parser", parser: "vue-eslint-parser",
parserOptions: { "env": {
"project": "./tsconfig.json" "browser": true,
}, "es2021": true
ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'webpack.config.cjs', '*.js'], },
overrides: [{ ignorePatterns: ['*.test.ts', '.eslintrc.cjs', 'webpack.config.cjs', '*.js'],
files: ['*.ts', '*.tsx', "*.vue"], overrides: [{
}], files: ['*.ts', '*.tsx', "*.vue"],
plugins: [ }],
"@typescript-eslint", plugins: [
"@typescript-eslint"
],
], extends: [
extends: [ "eslint:recommended",
"eslint:recommended", "plugin:vue/vue3-essential",
'plugin:vue/essential', "plugin:@typescript-eslint/recommended"
'@vue/typescript', ],
"plugin:@typescript-eslint/eslint-recommended", parserOptions: {
"plugin:@typescript-eslint/recommended" "sourceType": "module",
], "project": "./tsconfig.json",
rules: { "ecmaVersion": 2021,
'@typescript-eslint/no-floating-promises': 'error', "parser": "@typescript-eslint/parser",
"vue/no-multiple-template-root": "off", extraFileExtensions: ['.vue']
"vue/no-v-for-template-key": "off", },
"vue/multi-word-component-names": "off",//TODO: 삭제 rules: {
}, '@typescript-eslint/no-floating-promises': 'error',
settings: { },
'import/resolver': { settings: {
alias: { 'import/resolver': {
map: [ alias: {
['@', './hwe/ts'], map: [
['@util', './hwe/ts/util'], ['@', './hwe/ts'],
['@scss', './hwe/scss'], ['@util', './hwe/ts/util'],
] ['@scss', './hwe/scss'],
} ]
} }
}, }
} },
};
+9 -5
View File
@@ -13,13 +13,17 @@ require(__DIR__ . '/../vendor/autoload.php');
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>설치</title> <title>설치</title>
<?php /* NOTE: 설치 이전에는 ServConfig가 준비되어있지 않으므로 예외로 수동 지정 */ ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('../dist_js/vendors.js') ?> <?= WebUtil::printJS('../dist_js/gateway/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?> <?= WebUtil::printCSS('../dist_js/gateway/vendor.css') ?>
<?= WebUtil::printJS('../dist_js/install.js') ?> <?= WebUtil::printJS('../dist_js/gateway/common_ts.js') ?>
<?= WebUtil::printCSS('../dist_css/vendor.css') ?> <?= WebUtil::printCSS('../dist_js/gateway/common_ts.css') ?>
<?= WebUtil::printCSS('../dist_css/common_ts.css') ?> <?= WebUtil::printJS('../dist_js/gateway/install.js') ?>
<?= WebUtil::printCSS('../dist_js/gateway/install.css') ?>
<?= WebUtil::printCSS('../css/install.css') ?> <?= WebUtil::printCSS('../css/install.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
+1 -1
View File
@@ -24,7 +24,7 @@ $plock = $db->queryFirstField('SELECT plock FROM plock');
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?> <?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('dist_css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
+1 -1
View File
@@ -22,7 +22,7 @@ $admin = getAdmin();
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?> <?=WebUtil::printCSS('../d_shared/common.css')?>
<?=WebUtil::printCSS('dist_css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
+1 -1
View File
@@ -23,7 +23,7 @@ $db = DB::db();
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
+12 -11
View File
@@ -23,8 +23,9 @@ $ipGroupList = Util::arrayGroupBy(
'ip_c' 'ip_c'
); );
function colorBlockedName($general){ function colorBlockedName($general)
if(!$general['blocked']){ {
if (!$general['blocked']) {
return $general['name']; return $general['name'];
} }
return "<span style='color:magenta;'>{$general['name']}</span>"; return "<span style='color:magenta;'>{$general['name']}</span>";
@@ -40,7 +41,7 @@ function colorBlockedName($general){
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
@@ -108,14 +109,14 @@ function colorBlockedName($general){
<td align=center width=129>IP</td> <td align=center width=129>IP</td>
<td align=center width=100>ID</td> <td align=center width=100>ID</td>
</tr> </tr>
<?php foreach($ipGroupList as $ipGroupC=>$users): ?> <?php foreach ($ipGroupList as $ipGroupC => $users) : ?>
<tr> <tr>
<td><?=join('<br>',array_map('\sammo\colorBlockedName', $users))?></td> <td><?= join('<br>', array_map('\sammo\colorBlockedName', $users)) ?></td>
<td><?=join('<br>',array_column($users, 'lastconnect'))?></td> <td><?= join('<br>', array_column($users, 'lastconnect')) ?></td>
<td><?=join('<br>',array_column($users, 'ip'))?></td> <td><?= join('<br>', array_column($users, 'ip')) ?></td>
<td><?=join('<br>',array_column($users, 'owner'))?></td> <td><?= join('<br>', array_column($users, 'owner')) ?></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
<?php <?php
//NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기 //NOTE: password의 md5 해시가 같은지 확인하는 방식으로는 앞으로 잡아낼 수 없다. 폐기
+4 -4
View File
@@ -39,7 +39,7 @@ $sel2[$type2] = "selected";
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
@@ -212,7 +212,7 @@ GROUP BY B.nation
$query .= " order by avg(B.dex5) desc"; $query .= " order by avg(B.dex5) desc";
break; break;
} }
foreach($db->query($query) as $nation){ foreach ($db->query($query) as $nation) {
$gen = $db->queryFirstRow('SELECT COUNT(*) as cnt, $gen = $db->queryFirstRow('SELECT COUNT(*) as cnt,
ROUND(AVG(gold)) as avgg, ROUND(AVG(gold)) as avgg,
ROUND(AVG(rice)) as avgr, ROUND(AVG(rice)) as avgr,
@@ -221,7 +221,7 @@ GROUP BY B.nation
ROUND(AVG(intel), 1) as avgi, ROUND(AVG(intel), 1) as avgi,
ROUND(AVG(explevel), 1) as avge, ROUND(AVG(explevel), 1) as avge,
SUM(crew) as crew SUM(crew) as crew
from general where nation=%i',$nation['nation']); from general where nation=%i', $nation['nation']);
$city = $db->queryFirstRow('SELECT COUNT(*) as cnt, $city = $db->queryFirstRow('SELECT COUNT(*) as cnt,
SUM(pop) as pop, SUM(pop_max) as pop_max, SUM(pop) as pop, SUM(pop_max) as pop_max,
@@ -312,7 +312,7 @@ from city where nation=%i', $nation['nation']);
?> ?>
</tr> </tr>
<?php <?php
foreach($db->query('SELECT * from statistic where month=1 or no=1') as $stat){ foreach ($db->query('SELECT * from statistic where month=1 or no=1') as $stat) {
echo " echo "
<tr> <tr>
<td align=center>{$stat['year']}</td> <td align=center>{$stat['year']}</td>
+1 -1
View File
@@ -86,7 +86,7 @@ $generalObj = General::createGeneralObjFromDB($gen);
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
+87 -65
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -25,76 +26,97 @@ $sel[$type] = "selected";
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>외교정보</title> <title>외교정보</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('../d_shared/common.css')?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('dist_css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>외 교 정 보<br><?=closeButton()?></td></tr> <tr>
<tr><td> <td>외 교 정 보<br><?= closeButton() ?></td>
<form name=form1 method=post> </tr>
정렬순서 : <tr>
<select name=type size=1> <td>
<option <?=$sel[0]??''?> value=0>상태</option> <form name=form1 method=post>
</select> 정렬순서 :
<input type=submit name=btn value='정렬하기'> <select name=type size=1>
</form> <option <?= $sel[0] ?? '' ?> value=0>상태</option>
</td></tr> </select>
</table> <input type=submit name=btn value='정렬하기'>
<table width=1000 align=center class='tb_layout bg0'> </form>
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr> </td>
</tr>
</table>
<table width=1000 align=center class='tb_layout bg0'>
<tr>
<td colspan=9 align=center bgcolor=blue>외 교 관 계</td>
</tr>
<tr>
<td width=130 align=center class='bg1'>국 가 명</td>
<td width=130 align=center class='bg1'>국 가 명</td>
<td width=80 align=center class='bg1'>상 태</td>
<td width=60 align=center class='bg1'>기 간</td>
</tr>
<?php
$nationName = [];
$nationColor = [];
foreach (getAllNationStaticInfo() as $nation) {
$nationName[$nation['nation']] = $nation['name'];
$nationColor[$nation['nation']] = $nation['color'];
}
foreach ($db->query('SELECT * from diplomacy where me < you order by state desc') as $dip) {
$me = $dip['me'];
$you = $dip['you'];
if ($dip['state'] == 2) {
continue;
}
switch ($dip['state']) {
case 0:
$state = "<font color=red>교 전</font>";
break;
case 1:
$state = "<font color=magenta>선포중</font>";
break;
case 2:
$state = "통 상";
break;
case 7:
$state = "<font color=green>불가침</font>";
break;
}
$date = TimeUtil::now();
echo "
<tr> <tr>
<td width=130 align=center class='bg1'>국 가 명</td> <td align=center style=color:" . newColor($nationColor[$me]) . ";background-color:{$nationColor[$me]};>$nationName[$me]</td>
<td width=130 align=center class='bg1'>국 가 명</td> <td align=center style=color:" . newColor($nationColor[$you]) . ";background-color:{$nationColor[$you]};>$nationName[$you]</td>
<td width=80 align=center class='bg1'>상 태</td>
<td width=60 align=center class='bg1'>기 간</td>
</tr>
<?php
$nationName = [];
$nationColor = [];
foreach (getAllNationStaticInfo() as $nation) {
$nationName[$nation['nation']] = $nation['name'];
$nationColor[$nation['nation']] = $nation['color'];
}
foreach($db->query('SELECT * from diplomacy where me < you order by state desc') as $dip){
$me = $dip['me'];
$you = $dip['you'];
if ($dip['state'] == 2) {
continue;
}
switch ($dip['state']) {
case 0: $state = "<font color=red>교 전</font>"; break;
case 1: $state = "<font color=magenta>선포중</font>"; break;
case 2: $state = "통 상"; break;
case 7: $state = "<font color=green>불가침</font>"; break;
}
$date = TimeUtil::now();
echo "
<tr>
<td align=center style=color:".newColor($nationColor[$me]).";background-color:{$nationColor[$me]};>$nationName[$me]</td>
<td align=center style=color:".newColor($nationColor[$you]).";background-color:{$nationColor[$you]};>$nationName[$you]</td>
<td align=center>$state</td> <td align=center>$state</td>
<td align=center>{$dip['term']} 개월</td> <td align=center>{$dip['term']} 개월</td>
</tr>"; </tr>";
} }
?> ?>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</table> </tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body> </body>
</html>
</html>
+1 -4
View File
@@ -27,13 +27,10 @@ $templates = new \League\Plates\Engine(__DIR__ . '/templates');
<meta name="viewport" content="width=1136" /> <meta name="viewport" content="width=1136" />
<title><?= UniqueConst::$serverName ?>: 명장일람</title> <title><?= UniqueConst::$serverName ?>: 명장일람</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/hallOfFame.css') ?> <?= WebUtil::printCSS('css/hallOfFame.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printDist('ts', 'common') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
</head> </head>
<body> <body>
+1 -4
View File
@@ -18,12 +18,9 @@ increaseRefresh("왕조일람", 1);
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 왕조일람</title> <title><?= UniqueConst::$serverName ?>: 왕조일람</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', 'common') ?>
</head> </head>
+183 -176
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -13,8 +14,8 @@ $templates->registerFunction('ConvertLog', '\sammo\ConvertLog');
$templates->registerFunction('newColor', '\sammo\newColor'); $templates->registerFunction('newColor', '\sammo\newColor');
increaseRefresh("왕조일람", 1); increaseRefresh("왕조일람", 1);
$emperior = $db->queryFirstRow('SELECT * FROM emperior WHERE `no`=%i',$select); $emperior = $db->queryFirstRow('SELECT * FROM emperior WHERE `no`=%i', $select);
$serverID = $emperior['server_id']??($emperior['serverID']??null); $serverID = $emperior['server_id'] ?? ($emperior['serverID'] ?? null);
?> ?>
@@ -22,193 +23,199 @@ $serverID = $emperior['server_id']??($emperior['serverID']??null);
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 왕조일람</title> <title><?= UniqueConst::$serverName ?>: 왕조일람</title>
<?=WebUtil::printCSS('../d_shared/common.css')?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('dist_css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<table align=center width=1000 class="tb_layout bg0"> <table align=center width=1000 class="tb_layout bg0">
<tr><td>역 대 왕 조<br> <tr>
<button onclick=window.close()>창 닫기</button> <td>역 대 왕 조<br>
<div style="float:right;"><a href="a_emperior.php"><button type='button'>전체보기</button></a><div> <button onclick=window.close()>창 닫기</button>
</td></tr> <div style="float:right;"><a href="a_emperior.php"><button type='button'>전체보기</button></a>
<div>
</td>
</tr>
</table> </table>
<?php <?php
if($emperior): if ($emperior) :
?> ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr> <tr>
<td bgcolor=skyblue align=center colspan=6> <td bgcolor=skyblue align=center colspan=6>
<font size=5><?=$emperior['phase']?></font> <font size=5><?= $emperior['phase'] ?></font>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class='bg1' width=98 align=center>국 가 수<br>(최종 / 최대)</td> <td class='bg1' width=98 align=center>국 가 수<br>(최종 / 최대)</td>
<td align=center width=398 colspan=2><?=$emperior['nation_count']?></td> <td align=center width=398 colspan=2><?= $emperior['nation_count'] ?></td>
<td class='bg1' width=98 align=center>장 수 수<br>(최종 / 최대)</td> <td class='bg1' width=98 align=center>장 수 수<br>(최종 / 최대)</td>
<td align=center width=398 colspan=2><?=$emperior['gen_count']?></td> <td align=center width=398 colspan=2><?= $emperior['gen_count'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>등 장 국 가</td> <td class='bg1' align=center>등 장 국 가</td>
<td colspan=5><?=$emperior['nation_name']?></td> <td colspan=5><?= $emperior['nation_name'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>국가별 성향</td> <td class='bg1' align=center>국가별 성향</td>
<td colspan=5><?=$emperior['nation_hist']?></td> <td colspan=5><?= $emperior['nation_hist'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>장 수 성 격</td> <td class='bg1' align=center>장 수 성 격</td>
<td colspan=5><?=$emperior['personal_hist']?></td> <td colspan=5><?= $emperior['personal_hist'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>장 수 특 기</td> <td class='bg1' align=center>장 수 특 기</td>
<td colspan=5><?=$emperior['special_hist']?></td> <td colspan=5><?= $emperior['special_hist'] ?></td>
</tr> </tr>
<tr> <tr>
<td align=center style=color:<?=newColor($emperior['color'])?>; bgcolor=<?=$emperior['color']?> colspan=6> <td align=center style=color:<?= newColor($emperior['color']) ?>; bgcolor=<?= $emperior['color'] ?> colspan=6>
<font size=5><?=$emperior['name']?> (<?=$emperior['year']?>年 <?=$emperior['month']?>月)</font> <font size=5><?= $emperior['name'] ?> (<?= $emperior['year'] ?>年 <?= $emperior['month'] ?>月)</font>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class='bg1' width=98 align=center>국 력</td> <td class='bg1' width=98 align=center>국 력</td>
<td align=center width=398 colspan=2><?=$emperior['power']?></td> <td align=center width=398 colspan=2><?= $emperior['power'] ?></td>
<td class='bg1' width=98 align=center>성 향</td> <td class='bg1' width=98 align=center>성 향</td>
<td align=center width=398 colspan=2><?=$emperior['type']?></td> <td align=center width=398 colspan=2><?= $emperior['type'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' width=98 align=center>장 수</td> <td class='bg1' width=98 align=center>장 수</td>
<td align=center width=398 colspan=2><?=$emperior['gennum']?></td> <td align=center width=398 colspan=2><?= $emperior['gennum'] ?></td>
<td class='bg1' width=98 align=center>속 령</td> <td class='bg1' width=98 align=center>속 령</td>
<td align=center width=398 colspan=2><?=$emperior['citynum']?></td> <td align=center width=398 colspan=2><?= $emperior['citynum'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>총 인 구</td> <td class='bg1' align=center>총 인 구</td>
<td align=center colspan=2><?=$emperior['pop']?></td> <td align=center colspan=2><?= $emperior['pop'] ?></td>
<td class='bg1' align=center>인 구 율</td> <td class='bg1' align=center>인 구 율</td>
<td align=center colspan=2><?=$emperior['poprate']?></td> <td align=center colspan=2><?= $emperior['poprate'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>국 고</td> <td class='bg1' align=center>국 고</td>
<td align=center colspan=2><?=$emperior['gold']?></td> <td align=center colspan=2><?= $emperior['gold'] ?></td>
<td class='bg1' align=center>병 량</td> <td class='bg1' align=center>병 량</td>
<td align=center colspan=2><?=$emperior['rice']?></td> <td align=center colspan=2><?= $emperior['rice'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>황 제</td> <td class='bg1' align=center>황 제</td>
<td width=64>&nbsp;</td> <td width=64>&nbsp;</td>
<td width=332><?=$emperior['l12name']?></td> <td width=332><?= $emperior['l12name'] ?></td>
<td class='bg1' align=center>승 상</td> <td class='bg1' align=center>승 상</td>
<td width=64>&nbsp;</td> <td width=64>&nbsp;</td>
<td width=332><?=$emperior['l11name']?></td> <td width=332><?= $emperior['l11name'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>위 장 군</td> <td class='bg1' align=center>위 장 군</td>
<td width=64>&nbsp;</td> <td width=64>&nbsp;</td>
<td width=332><?=$emperior['l10name']?></td> <td width=332><?= $emperior['l10name'] ?></td>
<td class='bg1' align=center>사 공</td> <td class='bg1' align=center>사 공</td>
<td width=64>&nbsp;</td> <td width=64>&nbsp;</td>
<td width=332><?=$emperior['l9name']?></td> <td width=332><?= $emperior['l9name'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>표 기 장 군</td> <td class='bg1' align=center>표 기 장 군</td>
<td width=64>&nbsp;</td> <td width=64>&nbsp;</td>
<td width=332><?=$emperior['l8name']?></td> <td width=332><?= $emperior['l8name'] ?></td>
<td class='bg1' align=center>태 위</td> <td class='bg1' align=center>태 위</td>
<td width=64>&nbsp;</td> <td width=64>&nbsp;</td>
<td width=332><?=$emperior['l7name']?></td> <td width=332><?= $emperior['l7name'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>거 기 장 군</td> <td class='bg1' align=center>거 기 장 군</td>
<td width=64>&nbsp;</td> <td width=64>&nbsp;</td>
<td width=332><?=$emperior['l6name']?></td> <td width=332><?= $emperior['l6name'] ?></td>
<td class='bg1' align=center>사 도</td> <td class='bg1' align=center>사 도</td>
<td width=64>&nbsp;</td> <td width=64>&nbsp;</td>
<td width=332><?=$emperior['l5name']?></td> <td width=332><?= $emperior['l5name'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>오 호 장 군</td> <td class='bg1' align=center>오 호 장 군</td>
<td colspan=5><?=$emperior['tiger']?></td> <td colspan=5><?= $emperior['tiger'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>건 안 칠 자</td> <td class='bg1' align=center>건 안 칠 자</td>
<td colspan=5><?=$emperior['eagle']?></td> <td colspan=5><?= $emperior['eagle'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>장 수 들<br>(공헌도 순서)</td> <td class='bg1' align=center>장 수 들<br>(공헌도 순서)</td>
<td colspan=5><?=$emperior['gen']?></td> <td colspan=5><?= $emperior['gen'] ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1' align=center>역 사 기 록</td> <td class='bg1' align=center>역 사 기 록</td>
<td colspan=5><?=formatHistoryToHTML(Json::decode($emperior['history']))?></td> <td colspan=5><?= formatHistoryToHTML(Json::decode($emperior['history'])) ?></td>
</tr> </tr>
</table> </table>
<?php <?php
endif; endif;
$showServers = $emperior; $showServers = $emperior;
if(!$serverID){ if (!$serverID) {
$serverID = UniqueConst::$serverID; $serverID = UniqueConst::$serverID;
}
if($showServers){
$nations = $db->query('SELECT * FROM ng_old_nations WHERE server_id=%s ORDER BY date DESC', $serverID);
foreach($nations as $nation){
if(!$nation['nation']??null){
continue;
}
$nation += Json::decode($nation['data']);
$nation['typeName'] = getNationType($nation['type']);
$nation['levelName'] = getNationLevel($nation['level']);
/** @var int[]|null $nationGenerals */
$nationGenerals = $nation['generals'];
if($nationGenerals){
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nationGenerals);
if(count($generals) != count($nationGenerals) && $serverID == UniqueConst::$serverID){
$liveGenerals = $nationGenerals;
foreach($generals as $general){
if(in_array($general['general_no'], $nationGenerals)){
unset($nationGenerals[$general['general_no']]);
}
}
$liveGenerals = $db->query('SELECT `no`as`general_no`, `name` FROM general WHERE no IN %li', $liveGenerals);
$nation['generalsFull'] = array_merge($liveGenerals, $generals);
}
else{
$nation['generalsFull'] = $generals;
}
}
else{
$nation['generalsFull'] = [];
}
if(key_exists('aux', $nation) && !is_array($nation['aux'])){
$nation += Json::decode($nation['aux']);
}
echo $templates->render('oldNation', $nation);
} }
}
?>
<table align=center width=1000 class='tb_layout bg0'> if ($showServers) {
<tr><td><?=closeButton()?></td></tr> $nations = $db->query('SELECT * FROM ng_old_nations WHERE server_id=%s ORDER BY date DESC', $serverID);
<tr><td><?=banner()?></td></tr> foreach ($nations as $nation) {
</table> if (!$nation['nation'] ?? null) {
continue;
}
$nation += Json::decode($nation['data']);
$nation['typeName'] = getNationType($nation['type']);
$nation['levelName'] = getNationLevel($nation['level']);
/** @var int[]|null $nationGenerals */
$nationGenerals = $nation['generals'];
if ($nationGenerals) {
$generals = $db->query('SELECT `general_no`, `name`, `last_yearmonth` FROM ng_old_generals WHERE server_id=%s AND general_no IN %li', $serverID, $nationGenerals);
if (count($generals) != count($nationGenerals) && $serverID == UniqueConst::$serverID) {
$liveGenerals = $nationGenerals;
foreach ($generals as $general) {
if (in_array($general['general_no'], $nationGenerals)) {
unset($nationGenerals[$general['general_no']]);
}
}
$liveGenerals = $db->query('SELECT `no`as`general_no`, `name` FROM general WHERE no IN %li', $liveGenerals);
$nation['generalsFull'] = array_merge($liveGenerals, $generals);
} else {
$nation['generalsFull'] = $generals;
}
} else {
$nation['generalsFull'] = [];
}
if (key_exists('aux', $nation) && !is_array($nation['aux'])) {
$nation += Json::decode($nation['aux']);
}
echo $templates->render('oldNation', $nation);
}
}
?>
<table align=center width=1000 class='tb_layout bg0'>
<tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table>
</body> </body>
</html> </html>
+1 -4
View File
@@ -45,12 +45,9 @@ if ($gameStor->isunited) {
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 장수일람</title> <title><?= UniqueConst::$serverName ?>: 장수일람</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printDist('ts', 'common') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
</head> </head>
+1 -4
View File
@@ -47,13 +47,10 @@ if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) {
<meta name="viewport" content="width=1136" /> <meta name="viewport" content="width=1136" />
<title><?= UniqueConst::$serverName ?>: 명예의 전당</title> <title><?= UniqueConst::$serverName ?>: 명예의 전당</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/hallOfFame.css') ?> <?= WebUtil::printCSS('css/hallOfFame.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printDist('ts', ['common', 'hallOfFame']) ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJs('dist_js/hallOfFame.js') ?>
</head> </head>
<body> <body>
+2 -4
View File
@@ -99,15 +99,13 @@ $nations = Json::decode($history['nations']);
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 연감</title> <title><?= UniqueConst::$serverName ?>: 연감</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS("js/map/theme_{$mapTheme}.js") ?> <?= WebUtil::printJS("js/map/theme_{$mapTheme}.js") ?>
<?= WebUtil::printJS('dist_js/history.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?> <?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printCSS('css/history.css') ?> <?= WebUtil::printCSS('css/history.css') ?>
<?= WebUtil::printDist('ts', ['common', 'history']) ?>
<script> <script>
var startYear = <?= $s_year ?>; var startYear = <?= $s_year ?>;
var startMonth = <?= $s_month ?>; var startMonth = <?= $s_month ?>;
+1 -5
View File
@@ -30,13 +30,9 @@ if ($con >= 2) {
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력일람</title> <title><?= UniqueConst::$serverName ?>: 세력일람</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/extKingdoms.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common', 'extKingdoms']) ?>
</head> </head>
<body> <body>
+1 -5
View File
@@ -28,13 +28,9 @@ $sel[$type] = "selected";
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 빙의일람</title> <title><?= UniqueConst::$serverName ?>: 빙의일람</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
<body> <body>
+5 -10
View File
@@ -32,12 +32,13 @@ if ($con >= 2) {
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력도</title> <title><?= UniqueConst::$serverName ?>: 세력도</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/normalize.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?= WebUtil::printJS('dist_js/map.js') ?> <?= WebUtil::printDist('ts', ['common', 'map']) ?>
<script> <script>
window.serverNick = '<?= DB::prefix() ?>'; window.serverNick = '<?= DB::prefix() ?>';
window.serverID = '<?= UniqueConst::$serverID ?>'; window.serverID = '<?= UniqueConst::$serverID ?>';
@@ -51,12 +52,6 @@ if ($con >= 2) {
}); });
</script> </script>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('css/normalize.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?>
</head> </head>
<body> <body>
+2 -5
View File
@@ -54,12 +54,7 @@ if ($admin['maxonline'] < $curonline) {
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<style> <style>
.big_bar { .big_bar {
@@ -87,6 +82,8 @@ if ($admin['maxonline'] < $curonline) {
margin-left: 1ch; margin-left: 1ch;
} }
</style> </style>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
<body> <body>
+2 -5
View File
@@ -30,12 +30,7 @@ $vote = $admin['vote'] ?: ['-'];
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<style> <style>
.little_bar { .little_bar {
@@ -46,6 +41,8 @@ $vote = $admin['vote'] ?: ['-'];
text-align: center; text-align: center;
} }
</style> </style>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common']) ?>
<script type="text/javascript"> <script type="text/javascript">
function captureKey(e) { function captureKey(e) {
if (e.keyCode == 13 && e.srcElement.type == 'text') { if (e.keyCode == 13 && e.srcElement.type == 'text') {
+1 -4
View File
@@ -52,12 +52,9 @@ if ($msg2 == "") {
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
<body> <body>
+1 -4
View File
@@ -120,12 +120,9 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
+1 -4
View File
@@ -87,12 +87,9 @@ if ($str3) {
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 베팅장</title> <title><?= UniqueConst::$serverName ?>: 베팅장</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/betting.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common', 'betting']) ?>
</head> </head>
<body> <body>
+1 -4
View File
@@ -18,16 +18,13 @@ $generalObj = General::createGeneralObjFromDB($session->generalID);
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 사령부</title> <title><?= UniqueConst::$serverName ?>: 사령부</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/chiefCenter.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/chiefCenter.css') ?> <?= WebUtil::printCSS('css/chiefCenter.css') ?>
<script type="text/javascript"> <script type="text/javascript">
var maxChiefTurn = <?= GameConst::$maxChiefTurn ?>; var maxChiefTurn = <?= GameConst::$maxChiefTurn ?>;
</script> </script>
<?= WebUtil::printDist('ts', ['common', 'chiefCenter']) ?>
</head> </head>
+1 -4
View File
@@ -35,13 +35,9 @@ $templates = new \League\Plates\Engine('templates');
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/currentCity.js') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<style> <style>
#general_list tr td { #general_list tr td {
@@ -57,6 +53,7 @@ $templates = new \League\Plates\Engine('templates');
font-size: x-small; font-size: x-small;
} }
</style> </style>
<?= WebUtil::printDist('ts', ['common', 'currentCity']) ?>
</head> </head>
<body> <body>
+10 -57
View File
@@ -54,23 +54,15 @@ $nationStor->cacheValues(['notice', 'scout_msg', 'available_war_setting_cnt']);
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 내무부</title> <title><?= UniqueConst::$serverName ?>: 내무부</title>
<script> <?= WebUtil::printStaticValues([
var editable = <?= (($me['officer_level'] >= 5 || $permission == 4) ? 'true' : 'false') ?>; 'editable' => ($me['officer_level'] >= 5 || $permission == 4),
var storedData = <?= Json::encode([ 'nationMsg' => $nationStor->notice ?? '',
"nationMsg" => $nationStor->notice ?? '', 'scoutMsg' => $nationStor->scout_msg ?? '',
"scoutMsg" => $nationStor->scout_msg ?? '' ]) ?>
]) ?>;
</script>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/dipcenter.js') ?>
<?= WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css') ?>
<?= WebUtil::printCSS('dist_css/vendors.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/dipcenter.css') ?> <?= WebUtil::printDist('vue', 'v_dipcenter', true) ?>
</head> </head>
<body> <body>
@@ -176,51 +168,12 @@ $nationStor->cacheValues(['notice', 'scout_msg', 'available_war_setting_cnt']);
} }
?> ?>
<table width=1000 class='tb_layout bg0' style='margin:auto;'> <div class='tb_layout bg0' style='margin:auto;width: 1000px;' id="editorForm">
</div>
<table class="tb_layout bg0" style="margin:auto;">
<form name=form1 method=post action=c_dipcenter.php> <form name=form1 method=post action=c_dipcenter.php>
<tr>
<td colspan=2 height=10></td>
</tr>
<tr>
<td colspan=2 align=center bgcolor=orange>국 가 방 침 &amp; 임관 권유 메시지</td>
</tr>
<tr>
<td colspan='2'>
<div id='noticeForm'>
<div class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'>
국가 방침
</div>
<div>
<input type='submit' class='submit' name=btn value='국가방침 수정'><input type='button' class='cancel_edit' value='취소'>
</div>
</div>
<input type='hidden' class='input_form' name='msg' data-global='nationMsg'>
<div class='edit_form viewer'></div>
</div>
</td>
</tr>
<tr>
<td colspan='2'>
<div id='scoutMsgForm'>
<div class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'>
임관 권유
</div>
<div>
<input type='submit' class='submit' name=btn value='임관 권유문 수정'><input type='button' class='cancel_edit' value='취소'>
</div>
</div>
<div style='border-bottom:solid gray 0.5px;'>870px x 200px를 넘어서는 내용은 표시되지 않습니다.</div>
<input type='hidden' class='input_form' name='scoutMsg' data-global='scoutMsg'>
<div style="width:870px;margin-left:auto;">
<div class='edit_form viewer'></div>
</div>
</div>
</div>
</td>
</tr>
<tr> <tr>
<td colspan=2 align=center bgcolor=green>예 산 &amp; 정 책</td> <td colspan=2 align=center bgcolor=green>예 산 &amp; 정 책</td>
</tr> </tr>
+5 -10
View File
@@ -92,11 +92,12 @@ $neutralStateCharMap = [
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 중원 정보</title> <title><?= UniqueConst::$serverName ?>: 중원 정보</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?= WebUtil::printJS('dist_js/map.js') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printCSS('css/history.css') ?>
<?= WebUtil::printDist('ts', ['common', 'map']) ?>
<script> <script>
window.serverNick = '<?= DB::prefix() ?>'; window.serverNick = '<?= DB::prefix() ?>';
window.serverID = '<?= UniqueConst::$serverID ?>'; window.serverID = '<?= UniqueConst::$serverID ?>';
@@ -110,12 +111,6 @@ $neutralStateCharMap = [
}); });
</script> </script>
<?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printCSS('css/history.css') ?>
</head> </head>
<body> <body>
+1 -4
View File
@@ -55,12 +55,9 @@ $templates = new \League\Plates\Engine('templates');
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 암행부</title> <title><?= UniqueConst::$serverName ?>: 암행부</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printDist('ts', ['common']) ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
</head> </head>
<body> <body>
+1 -5
View File
@@ -35,19 +35,15 @@ $nation = $db->queryFirstRow('SELECT nation,name,level,color,chief_set from nati
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 인사부</title> <title><?= UniqueConst::$serverName ?>: 인사부</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('dist_js/bossInfo.js') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<script type="text/javascript"> <script type="text/javascript">
var chiefStatMin = <?= GameConst::$chiefStatMin ?>; var chiefStatMin = <?= GameConst::$chiefStatMin ?>;
var myLevel = <?= $meLevel ?>; var myLevel = <?= $meLevel ?>;
</script> </script>
<?= WebUtil::printDist('ts', ['common', 'bossInfo']) ?>
<?php <?php
+1 -5
View File
@@ -37,13 +37,9 @@ $sel = [$type => "selected"];
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력도시</title> <title><?= UniqueConst::$serverName ?>: 세력도시</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printDist('ts', ['common', 'extExpandCity']) ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/extExpandCity.js') ?>
</head> </head>
<body> <body>
+1 -5
View File
@@ -46,13 +46,9 @@ if ($gameStor->isunited) {
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력장수</title> <title><?= UniqueConst::$serverName ?>: 세력장수</title>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printDist('ts', ['common']) ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
</head> </head>
<body> <body>
+1 -5
View File
@@ -29,13 +29,9 @@ if ($nationID == 0) {
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 세력정보</title> <title><?= UniqueConst::$serverName ?>: 세력정보</title>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printDist('ts', ['common']) ?>
</head> </head>
<body> <body>
+2 -6
View File
@@ -53,14 +53,10 @@ $use_auto_nation_turn = $me->getAuxVar('use_auto_nation_turn') ?? 1;
<script> <script>
var availableDieImmediately = <?= $availableDieImmediately ? 'true' : 'false' ?>; var availableDieImmediately = <?= $availableDieImmediately ? 'true' : 'false' ?>;
</script> </script>
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('dist_js/myPage.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printDist('ts', ['common', 'myPage']) ?>
</head> </head>
<body> <body>
+1 -6
View File
@@ -76,11 +76,7 @@ $cssList = $commandObj->getCSSFiles();
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?= WebUtil::printJS('dist_js/processing.js') ?>
<script> <script>
window.serverNick = '<?= DB::prefix() ?>'; window.serverNick = '<?= DB::prefix() ?>';
window.serverID = '<?= UniqueConst::$serverID ?>'; window.serverID = '<?= UniqueConst::$serverID ?>';
@@ -92,17 +88,16 @@ $cssList = $commandObj->getCSSFiles();
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2-bootstrap4.css') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/main.css') ?> <?= WebUtil::printCSS('css/main.css') ?>
<?= WebUtil::printCSS('css/map.css') ?> <?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printCSS('css/processing.css') ?> <?= WebUtil::printCSS('css/processing.css') ?>
<?php <?php
foreach ($cssList as $css) { foreach ($cssList as $css) {
print(WebUtil::printCSS($css)); print(WebUtil::printCSS($css));
} }
?> ?>
<?= WebUtil::printDist('ts', ['common', 'processing']) ?>
</head> </head>
<body class="img_back"> <body class="img_back">
+436 -357
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -15,7 +16,7 @@ TurnExecutionHelper::executeAllCommand();
$me = $db->queryFirstRow('select no,tournament,con,turntime from general where owner=%i', $userID); $me = $db->queryFirstRow('select no,tournament,con,turntime from general where owner=%i', $userID);
$admin = $gameStor->getValues(['tournament','phase','tnmt_msg','tnmt_type','develcost','tnmt_trig']); $admin = $gameStor->getValues(['tournament', 'phase', 'tnmt_msg', 'tnmt_type', 'develcost', 'tnmt_trig']);
$con = checkLimit($me['con']); $con = checkLimit($me['con']);
if ($con >= 2) { if ($con >= 2) {
@@ -24,11 +25,32 @@ if ($con >= 2) {
} }
switch ($admin['tnmt_type']) { switch ($admin['tnmt_type']) {
default: throw new \RuntimeException('invalid tnmt_type'); default:
case 0: $tnmt_type = "<font color=cyan>전력전</font>"; $tp = "total"; $tp2 = "종합"; $tp3 = "total"; break; throw new \RuntimeException('invalid tnmt_type');
case 1: $tnmt_type = "<font color=cyan>통솔전</font>"; $tp = "leadership"; $tp2 = "통솔"; $tp3 = "leadership"; break; case 0:
case 2: $tnmt_type = "<font color=cyan>일기토</font>"; $tp = "strength"; $tp2 = "무력"; $tp3 = "strength"; break; $tnmt_type = "<font color=cyan>전력전</font>";
case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "intel"; $tp2 = "지력"; $tp3 = "intel"; break; $tp = "total";
$tp2 = "종합";
$tp3 = "total";
break;
case 1:
$tnmt_type = "<font color=cyan>통솔전</font>";
$tp = "leadership";
$tp2 = "통솔";
$tp3 = "leadership";
break;
case 2:
$tnmt_type = "<font color=cyan>일기토</font>";
$tp = "strength";
$tp2 = "무력";
$tp3 = "strength";
break;
case 3:
$tnmt_type = "<font color=cyan>설전</font>";
$tp = "intel";
$tp2 = "지력";
$tp3 = "intel";
break;
} }
?> ?>
@@ -37,356 +59,406 @@ case 3: $tnmt_type = "<font color=cyan>설전</font>"; $tp = "intel"; $tp2 = "
<?php if ($con == 1) { <?php if ($con == 1) {
MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^"); MessageBox("접속제한이 얼마 남지 않았습니다! 제한량이 모자라다면 참여를 해보세요^^");
} ?> } ?>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?=UniqueConst::$serverName?>: 토너먼트</title> <title><?= UniqueConst::$serverName ?>: 토너먼트</title>
<?=WebUtil::printCSS('../d_shared/common.css')?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?=WebUtil::printCSS('dist_css/common.css')?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
<table align=center width=2000 class='tb_layout bg0'> <table align=center width=2000 class='tb_layout bg0'>
<tr><td>삼모전 토너먼트<br><?=closeButton()?></td></tr> <tr>
</table> <td>삼모전 토너먼트<br><?= closeButton() ?></td>
<table align=center class='tb_layout bg0'> </tr>
<?php </table>
if ($session->userGrade >= 5) { <table align=center class='tb_layout bg0'>
$sel = []; <?php
echo " if ($session->userGrade >= 5) {
$sel = [];
echo "
<form method=post action=c_tournament.php> <form method=post action=c_tournament.php>
<tr><td colspan=8><input type=textarea size=150 style=color:white;background-color:black; name=msg><input type=submit name=btn value='메시지'></td></tr> <tr><td colspan=8><input type=textarea size=150 style=color:white;background-color:black; name=msg><input type=submit name=btn value='메시지'></td></tr>
<tr><td colspan=8> <tr><td colspan=8>
<input type=button value='갱신' onclick='location.reload()'>"; <input type=button value='갱신' onclick='location.reload()'>";
switch ($admin['tnmt_trig']) { switch ($admin['tnmt_trig']) {
case 0: $sel[0] = "selected"; break; case 0:
case 1: $sel[1] = "selected"; break; $sel[0] = "selected";
case 2: $sel[2] = "selected"; break; break;
case 3: $sel[3] = "selected"; break; case 1:
case 4: $sel[4] = "selected"; break; $sel[1] = "selected";
case 5: $sel[5] = "selected"; break; break;
case 6: $sel[6] = "selected"; break; case 2:
case 7: $sel[7] = "selected"; break; $sel[2] = "selected";
} break;
case 3:
$sel[3] = "selected";
break;
case 4:
$sel[4] = "selected";
break;
case 5:
$sel[5] = "selected";
break;
case 6:
$sel[6] = "selected";
break;
case 7:
$sel[7] = "selected";
break;
}
if ($admin['tournament'] == 0) { if ($admin['tournament'] == 0) {
?> ?>
<select name=auto size=1 style=color:white;background-color:black;> <select name=auto size=1 style=color:white;background-color:black;>
<option style=color:white; value=0>수동진행</option> <option style=color:white; value=0>수동진행</option>
<option style=color:white; value=1>12분 05일</option> <option style=color:white; value=1>12분 05일</option>
<option style=color:white; value=2>07분 10시</option> <option style=color:white; value=2>07분 10시</option>
<option style=color:white; value=3>03분 04시</option> <option style=color:white; value=3>03분 04시</option>
<option style=color:white; value=4>01분 82분</option> <option style=color:white; value=4>01분 82분</option>
<option style=color:white; value=5>30초 41분</option> <option style=color:white; value=5>30초 41분</option>
<option style=color:white; value=6>15초 21분</option> <option style=color:white; value=6>15초 21분</option>
<option style=color:white; value=7>05초 07분</option> <option style=color:white; value=7>05초 07분</option>
</select> </select>
<select name=type size=1 style=color:white;background-color:black;> <select name=type size=1 style=color:white;background-color:black;>
<option style=color:white; value=0>전력전</option> <option style=color:white; value=0>전력전</option>
<option style=color:white; value=1>통솔전</option> <option style=color:white; value=1>통솔전</option>
<option style=color:white; value=2>일기토</option> <option style=color:white; value=2>일기토</option>
<option style=color:white; value=3>설전</option> <option style=color:white; value=3>설전</option>
</select> </select>
<input type=submit name=btn value='개최'> <input type=submit name=btn value='개최'>
<select name=trig size=1 style=color:white;background-color:black;> <select name=trig size=1 style=color:white;background-color:black;>
<option style=color:white; value=0 <?=$sel[0]??''?>>수동진행</option> <option style=color:white; value=0 <?= $sel[0] ?? '' ?>>수동진행</option>
<option style=color:white; value=1 <?=$sel[1]??''?>>12분 05일</option> <option style=color:white; value=1 <?= $sel[1] ?? '' ?>>12분 05일</option>
<option style=color:white; value=2 <?=$sel[2]??''?>>07분 10시</option> <option style=color:white; value=2 <?= $sel[2] ?? '' ?>>07분 10시</option>
<option style=color:white; value=3 <?=$sel[3]??''?>>03분 04시</option> <option style=color:white; value=3 <?= $sel[3] ?? '' ?>>03분 04시</option>
<option style=color:white; value=4 <?=$sel[4]??''?>>01분 82분</option> <option style=color:white; value=4 <?= $sel[4] ?? '' ?>>01분 82분</option>
<option style=color:white; value=5 <?=$sel[5]??''?>>30초 41분</option> <option style=color:white; value=5 <?= $sel[5] ?? '' ?>>30초 41분</option>
<option style=color:white; value=6 <?=$sel[6]??''?>>15초 21분</option> <option style=color:white; value=6 <?= $sel[6] ?? '' ?>>15초 21분</option>
<option style=color:white; value=7 <?=$sel[7]??''?>>05초 07분</option> <option style=color:white; value=7 <?= $sel[7] ?? '' ?>>05초 07분</option>
</select> </select>
<input type=submit name=btn value='자동개최설정'> <input type=submit name=btn value='자동개최설정'>
<input type=submit name=btn value='포상'> <input type=submit name=btn value='포상'>
<input type=submit name=btn value='회수'> <input type=submit name=btn value='회수'>
<?php <?php
} else { } else {
echo "<input type=submit name=btn value='중단' onclick='return confirm(\"진짜 중단하시겠습니까?\")'>"; echo "<input type=submit name=btn value='중단' onclick='return confirm(\"진짜 중단하시겠습니까?\")'>";
} }
switch ($admin['tournament']) { switch ($admin['tournament']) {
case 1: case 1:
echo "<input type=submit name=btn value='랜덤투입'>"; echo "<input type=submit name=btn value='랜덤투입'>";
echo "<input type=submit name=btn value='랜덤전부투입'>"; echo "<input type=submit name=btn value='랜덤전부투입'>";
break; break;
case 2: echo "<input type=submit name=btn value='예선'><input type=submit name=btn value='예선전부'>"; break; case 2:
case 3: echo "<input type=submit name=btn value='추첨'><input type=submit name=btn value='추첨전부'>"; break; echo "<input type=submit name=btn value='예선'><input type=submit name=btn value='예선전부'>";
case 4: echo "<input type=submit name=btn value='본선'><input type=submit name=btn value='본선전부'>"; break; break;
case 5: echo "<input type=submit name=btn value='배정'>"; break; case 3:
case 6: echo "<input type=submit name=btn value='베팅마감'>"; break; echo "<input type=submit name=btn value='추첨'><input type=submit name=btn value='추첨전부'>";
case 7: echo "<input type=submit name=btn value='16강'>"; break; break;
case 8: echo "<input type=submit name=btn value='8강'>"; break; case 4:
case 9: echo "<input type=submit name=btn value='4강'>"; break; echo "<input type=submit name=btn value='본선'><input type=submit name=btn value='본선전부'>";
case 10: echo "<input type=submit name=btn value='결승'>"; break; break;
} case 5:
echo "<input type=submit name=btn value='배정'>";
break;
case 6:
echo "<input type=submit name=btn value='베팅마감'>";
break;
case 7:
echo "<input type=submit name=btn value='16강'>";
break;
case 8:
echo "<input type=submit name=btn value='8강'>";
break;
case 9:
echo "<input type=submit name=btn value='4강'>";
break;
case 10:
echo "<input type=submit name=btn value='결승'>";
break;
}
echo " echo "
</td></tr> </td></tr>
</form>"; </form>";
} elseif ($me['no'] > 0 && $me['tournament'] == 0 && $admin['tournament'] == 1) { } elseif ($me['no'] > 0 && $me['tournament'] == 0 && $admin['tournament'] == 1) {
echo "<form method=post action=c_tournament.php><tr><td colspan=8><input type=button value='갱신' onclick='location.reload()'><input type=submit name=btn value='참가' onclick='return confirm(\"참가비 금{$admin['develcost']}이 필요합니다. 참가하시겠습니까?\")'></td></tr></form>"; echo "<form method=post action=c_tournament.php><tr><td colspan=8><input type=button value='갱신' onclick='location.reload()'><input type=submit name=btn value='참가' onclick='return confirm(\"참가비 금{$admin['develcost']}이 필요합니다. 참가하시겠습니까?\")'></td></tr></form>";
} else { } else {
echo "<tr><td colspan=8><input type=button value='갱신' onclick='location.reload()'></td></tr>"; echo "<tr><td colspan=8><input type=button value='갱신' onclick='location.reload()'></td></tr>";
} }
$str1 = getTournament($admin['tournament']); $str1 = getTournament($admin['tournament']);
$str2 = getTournamentTime(); $str2 = getTournamentTime();
if($str2){ if ($str2) {
$str2 = ', '.$str2; $str2 = ', ' . $str2;
} }
$str3 = getTournamentTerm(); $str3 = getTournamentTerm();
if($str3){ if ($str3) {
$str3 = ', '.$str3; $str3 = ', ' . $str3;
} }
?> ?>
<tr><td colspan=8>운영자 메세지 : <font color=orange size=5><?=$admin['tnmt_msg']?></font></td></tr> <tr>
<tr><td colspan=8 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr> <td colspan=8>운영자 메세지 : <font color=orange size=5><?= $admin['tnmt_msg'] ?></font>
<tr><td colspan=8 align=center class='bg2'><font color=magenta size=5>16강 승자전</font></td></tr> </td>
<tr><td height=10 colspan=8 align=center></td></tr> </tr>
<?php <tr>
<td colspan=8 align=center>
<font color=white size=6><?= $tnmt_type ?> (<?= $str1 . $str2 . $str3 ?>)</font>
</td>
</tr>
<tr>
<td colspan=8 align=center class='bg2'>
<font color=magenta size=5>16강 승자전</font>
</td>
</tr>
<tr>
<td height=10 colspan=8 align=center></td>
</tr>
<?php
echo " echo "
<tr> <tr>
<td colspan=8> <td colspan=8>
<table align=center width=2000 class='bg0 mimic_flex'> <table align=center width=2000 class='bg0 mimic_flex'>
<tr align=center>"; <tr align=center>";
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=60 order by grp, grp_no LIMIT 1'); $generalList = $db->query('SELECT npc,name,win from tournament where grp>=60 order by grp, grp_no LIMIT 1');
while(count($generalList) < 1){ while (count($generalList) < 1) {
$generalList[] = [ $generalList[] = [
'name'=>'-', 'name' => '-',
'npc'=>0, 'npc' => 0,
'win'=>0 'win' => 0
]; ];
} }
foreach($generalList as $i=>$general){ foreach ($generalList as $i => $general) {
if ($general['name'] == "") { if ($general['name'] == "") {
$general['name'] = "-"; $general['name'] = "-";
} }
if ($general['npc'] >= 2) { if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>"; $general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) { } elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>"; $general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
} }
echo "<td colspan=16>{$general['name']}</td>"; echo "<td colspan=16>{$general['name']}</td>";
} }
echo " echo "
</tr> </tr>
<tr align=center>"; <tr align=center>";
$cent = []; $cent = [];
for ($i=0; $i < 1; $i++) { for ($i = 0; $i < 1; $i++) {
$cent[$i] = "<font color=white>"; $cent[$i] = "<font color=white>";
} }
$line = []; $line = [];
$gen = []; $gen = [];
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=50 order by grp, grp_no LIMIT 2'); $generalList = $db->query('SELECT npc,name,win from tournament where grp>=50 order by grp, grp_no LIMIT 2');
while(count($generalList) < 2){ while (count($generalList) < 2) {
$generalList[] = [ $generalList[] = [
'name'=>'-', 'name' => '-',
'npc'=>0, 'npc' => 0,
'win'=>0 'win' => 0
]; ];
} }
foreach($generalList as $i=>$general){ foreach ($generalList as $i => $general) {
if ($general['name'] == "") { if ($general['name'] == "") {
$general['name'] = "-"; $general['name'] = "-";
} }
if ($general['npc'] >= 2) { if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>"; $general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) { } elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>"; $general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
} }
if ($general['win'] > 0) { if ($general['win'] > 0) {
$line[$i] = "<font color=red>"; $line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>"; $cent[intdiv($i, 2)] = "<font color=red>";
} else { } else {
$line[$i] = "<font color=white>"; $line[$i] = "<font color=white>";
} }
$gen[$i] = $general['name']; $gen[$i] = $general['name'];
} }
for ($i=0; $i < 1; $i++) { for ($i = 0; $i < 1; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>"; $cent[$i] = $cent[$i] . "┻" . "</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"."</font>"; $line[$i * 2] = $line[$i * 2] . "┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" . "</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓"."</font>"; $line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓" . "</font>";
echo "<td colspan=16>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>"; echo "<td colspan=16>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
} }
echo " echo "
</tr> </tr>
<tr align=center>"; <tr align=center>";
for ($i=0; $i < 2; $i++) { for ($i = 0; $i < 2; $i++) {
echo "<td colspan=8>{$gen[$i]}</td>"; echo "<td colspan=8>{$gen[$i]}</td>";
} }
echo " echo "
</tr> </tr>
<tr align=center>"; <tr align=center>";
for ($i=0; $i < 2; $i++) { for ($i = 0; $i < 2; $i++) {
$cent[$i] = "<font color=white>"; $cent[$i] = "<font color=white>";
} }
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=40 order by grp, grp_no LIMIT 4'); $generalList = $db->query('SELECT npc,name,win from tournament where grp>=40 order by grp, grp_no LIMIT 4');
while(count($generalList) < 4){ while (count($generalList) < 4) {
$generalList[] = [ $generalList[] = [
'name'=>'-', 'name' => '-',
'npc'=>0, 'npc' => 0,
'win'=>0 'win' => 0
]; ];
} }
foreach($generalList as $i=>$general){ foreach ($generalList as $i => $general) {
if ($general['name'] == "") { if ($general['name'] == "") {
$general['name'] = "-"; $general['name'] = "-";
} }
if ($general['npc'] >= 2) { if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>"; $general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) { } elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>"; $general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
} }
if ($general['win'] > 0) { if ($general['win'] > 0) {
$line[$i] = "<font color=red>"; $line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>"; $cent[intdiv($i, 2)] = "<font color=red>";
} else { } else {
$line[$i] = "<font color=white>"; $line[$i] = "<font color=white>";
} }
$gen[$i] = $general['name']; $gen[$i] = $general['name'];
} }
for ($i=0; $i < 2; $i++) { for ($i = 0; $i < 2; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>"; $cent[$i] = $cent[$i] . "┻" . "</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━━━━━━━━━━"."</font>"; $line[$i * 2] = $line[$i * 2] . "┏━━━━━━━━━━━━━━━━━━" . "</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━━━━━━━━━━┓"."</font>"; $line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━━━━━━━━━━━━━━━┓" . "</font>";
echo "<td colspan=8>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>"; echo "<td colspan=8>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
} }
echo " echo "
</tr> </tr>
<tr align=center>"; <tr align=center>";
for ($i=0; $i < 4; $i++) { for ($i = 0; $i < 4; $i++) {
echo "<td colspan=4>{$gen[$i]}</td>"; echo "<td colspan=4>{$gen[$i]}</td>";
} }
echo " echo "
</tr> </tr>
<tr align=center>"; <tr align=center>";
for ($i=0; $i < 4; $i++) { for ($i = 0; $i < 4; $i++) {
$cent[$i] = "<font color=white>"; $cent[$i] = "<font color=white>";
} }
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=30 order by grp, grp_no LIMIT 8'); $generalList = $db->query('SELECT npc,name,win from tournament where grp>=30 order by grp, grp_no LIMIT 8');
while(count($generalList) < 8){ while (count($generalList) < 8) {
$generalList[] = [ $generalList[] = [
'name'=>'-', 'name' => '-',
'npc'=>0, 'npc' => 0,
'win'=>0 'win' => 0
]; ];
} }
foreach($generalList as $i=>$general){ foreach ($generalList as $i => $general) {
if ($general['name'] == "") { if ($general['name'] == "") {
$general['name'] = "-"; $general['name'] = "-";
} }
if ($general['npc'] >= 2) { if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>"; $general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) { } elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>"; $general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
} }
if ($general['win'] > 0) { if ($general['win'] > 0) {
$line[$i] = "<font color=red>"; $line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>"; $cent[intdiv($i, 2)] = "<font color=red>";
} else { } else {
$line[$i] = "<font color=white>"; $line[$i] = "<font color=white>";
} }
$gen[$i] = $general['name']; $gen[$i] = $general['name'];
} }
for ($i=0; $i < 4; $i++) { for ($i = 0; $i < 4; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>"; $cent[$i] = $cent[$i] . "┻" . "</font>";
$line[$i*2] = $line[$i*2]."┏━━━━━━━━━"."</font>"; $line[$i * 2] = $line[$i * 2] . "┏━━━━━━━━━" . "</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━━━━━━┓"."</font>"; $line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━━━━━━┓" . "</font>";
echo "<td colspan=4>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>"; echo "<td colspan=4>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
} }
echo " echo "
</tr> </tr>
<tr align=center>"; <tr align=center>";
for ($i=0; $i < 8; $i++) { for ($i = 0; $i < 8; $i++) {
echo "<td colspan=2>{$gen[$i]}</td>"; echo "<td colspan=2>{$gen[$i]}</td>";
} }
echo " echo "
</tr> </tr>
<tr align=center>"; <tr align=center>";
for ($i=0; $i < 8; $i++) { for ($i = 0; $i < 8; $i++) {
$cent[$i] = "<font color=white>"; $cent[$i] = "<font color=white>";
} }
$generalList = $db->query('SELECT npc,name,win from tournament where grp>=20 order by grp, grp_no LIMIT 16'); $generalList = $db->query('SELECT npc,name,win from tournament where grp>=20 order by grp, grp_no LIMIT 16');
while(count($generalList) < 16){ while (count($generalList) < 16) {
$generalList[] = [ $generalList[] = [
'name'=>'-', 'name' => '-',
'npc'=>0, 'npc' => 0,
'win'=>0 'win' => 0
]; ];
} }
foreach($generalList as $i=>$general){ foreach ($generalList as $i => $general) {
if ($general['name'] == "") { if ($general['name'] == "") {
$general['name'] = "-"; $general['name'] = "-";
} }
if ($general['npc'] >= 2) { if ($general['npc'] >= 2) {
$general['name'] = "<font color=cyan>".$general['name']."</font>"; $general['name'] = "<font color=cyan>" . $general['name'] . "</font>";
} elseif ($general['npc'] == 1) { } elseif ($general['npc'] == 1) {
$general['name'] = "<font color=skyblue>".$general['name']."</font>"; $general['name'] = "<font color=skyblue>" . $general['name'] . "</font>";
} }
if ($general['win'] > 0) { if ($general['win'] > 0) {
$line[$i] = "<font color=red>"; $line[$i] = "<font color=red>";
$cent[intdiv($i, 2)] = "<font color=red>"; $cent[intdiv($i, 2)] = "<font color=red>";
} else { } else {
$line[$i] = "<font color=white>"; $line[$i] = "<font color=white>";
} }
$gen[$i] = $general['name']; $gen[$i] = $general['name'];
} }
for ($i=0; $i < 8; $i++) { for ($i = 0; $i < 8; $i++) {
$cent[$i] = $cent[$i]."┻"."</font>"; $cent[$i] = $cent[$i] . "┻" . "</font>";
$line[$i*2] = $line[$i*2]."┏━━━━"."</font>"; $line[$i * 2] = $line[$i * 2] . "┏━━━━" . "</font>";
$line[$i*2+1] = $line[$i*2+1]."━━━━┓"."</font>"; $line[$i * 2 + 1] = $line[$i * 2 + 1] . "━━━━┓" . "</font>";
echo "<td colspan=2>{$line[$i*2]}{$cent[$i]}{$line[$i*2+1]}</td>"; echo "<td colspan=2>{$line[$i * 2]}{$cent[$i]}{$line[$i * 2 + 1]}</td>";
} }
echo " echo "
</tr> </tr>
<tr align=center>"; <tr align=center>";
for ($i=0; $i < 16; $i++) { for ($i = 0; $i < 16; $i++) {
echo "<td width=125>{$gen[$i]}</td>"; echo "<td width=125>{$gen[$i]}</td>";
} }
echo" echo "
</tr>"; </tr>";
$globalBet = $db->queryFirstList('SELECT * FROM betting WHERE general_id = 0')??[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]; $globalBet = $db->queryFirstList('SELECT * FROM betting WHERE general_id = 0') ?? [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,];
$globalBet = array_splice($globalBet, -16); $globalBet = array_splice($globalBet, -16);
$globalBetTotal = array_sum($globalBet); $globalBetTotal = array_sum($globalBet);
$admin = $gameStor->getValues(['tournament', 'phase']); $admin = $gameStor->getValues(['tournament', 'phase']);
$bet = []; $bet = [];
for ($i=0; $i < 16; $i++) { for ($i = 0; $i < 16; $i++) {
if($globalBet[$i] == 0){ if ($globalBet[$i] == 0) {
$bet[$i] = '∞'; $bet[$i] = '∞';
continue; continue;
} }
$bet[$i] = round($globalBetTotal / $globalBet[$i], 2); $bet[$i] = round($globalBetTotal / $globalBet[$i], 2);
} }
echo " echo "
<tr align=center>"; <tr align=center>";
for ($i=0; $i < 16; $i++) { for ($i = 0; $i < 16; $i++) {
echo "<td><font color=skyblue>{$bet[$i]}</font></td>"; echo "<td><font color=skyblue>{$bet[$i]}</font></td>";
} }
echo " echo "
</tr> </tr>
<tr align=center><td height=10 colspan=16></td></tr> <tr align=center><td height=10 colspan=16></td></tr>
<tr align=center><td colspan=16><font color=skyblue size=4>배당률이 낮을수록 베팅된 금액이 많고 유저들이 우승후보로 많이 선택한 장수입니다.</font></td></tr> <tr align=center><td colspan=16><font color=skyblue size=4>배당률이 낮을수록 베팅된 금액이 많고 유저들이 우승후보로 많이 선택한 장수입니다.</font></td></tr>
@@ -394,87 +466,94 @@ echo "
</td> </td>
</tr>"; </tr>";
if ($admin['tournament'] >= 7 || $admin['tournament'] == 0) { if ($admin['tournament'] >= 7 || $admin['tournament'] == 0) {
printFighting($admin['tournament'], $admin['phase']); printFighting($admin['tournament'], $admin['phase']);
} }
echo " echo "
<tr><td height=10 colspan=8 align=center></td></tr> <tr><td height=10 colspan=8 align=center></td></tr>
<tr><td colspan=8 align=center class='bg2'><font color=orange size=5>조별 본선 순위</font></td></tr> <tr><td colspan=8 align=center class='bg2'><font color=orange size=5>조별 본선 순위</font></td></tr>
<tr>"; <tr>";
$num = array("一", "二", "三", "四", "五", "六", "七", "八"); $num = array("一", "二", "三", "四", "五", "六", "七", "八");
for ($i=0; $i < 8; $i++) { for ($i = 0; $i < 8; $i++) {
$grp = $i + 10; $grp = $i + 10;
echo " echo "
<td> <td>
<table align=center width=250 class='tb_layout bg0'> <table align=center width=250 class='tb_layout bg0'>
<tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr> <tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr>
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>"; <tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>";
$generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq',$grp); $generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq', $grp);
foreach($generalList as $k=>$general) { foreach ($generalList as $k => $general) {
printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']); printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']);
} }
foreach(Util::range(count($generalList), 4) as $idx){ foreach (Util::range(count($generalList), 4) as $idx) {
printRow($idx, '', '', '', '', '', '', '', '', '', ''); printRow($idx, '', '', '', '', '', '', '', '', '', '');
} }
echo " echo "
</table> </table>
</td>"; </td>";
} }
echo "</tr>"; echo "</tr>";
if ($admin['tournament'] == 4 || $admin['tournament'] == 5) { if ($admin['tournament'] == 4 || $admin['tournament'] == 5) {
printFighting($admin['tournament'], $admin['phase']); printFighting($admin['tournament'], $admin['phase']);
} }
echo " echo "
<tr><td colspan=8 align=center class='bg2'><font color=yellow size=5>조별 예선 순위</font></td></tr> <tr><td colspan=8 align=center class='bg2'><font color=yellow size=5>조별 예선 순위</font></td></tr>
<tr>"; <tr>";
for ($i=0; $i < 8; $i++) { for ($i = 0; $i < 8; $i++) {
$grp = $i; $grp = $i;
echo " echo "
<td> <td>
<table align=center width=250 class='tb_layout bg0'> <table align=center width=250 class='tb_layout bg0'>
<tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr> <tr><td colspan=9 style=background-color:black;>{$num[$i]}조</td></tr>
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>"; <tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center>{$tp2}</td><td align=center>경</td><td align=center>승</td><td align=center>무</td><td align=center>패</td><td align=center>점</td><td align=center>득</td></tr>";
$generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq',$grp); $generalList = $db->query('SELECT npc,name,leadership,strength,intel,leadership+strength+intel as total,prmt,win+draw+lose as game,win,draw,lose,gl,win*3+draw as gd from tournament where grp=%i order by gd desc, gl desc, seq', $grp);
foreach($generalList as $k=>$general) { foreach ($generalList as $k => $general) {
printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']); printRow($k, $general['npc'], $general['name'], $general[$tp], $general['game'], $general['win'], $general['draw'], $general['lose'], $general['gd'], $general['gl'], $general['prmt']);
} }
foreach(Util::range(count($generalList), 8) as $idx){ foreach (Util::range(count($generalList), 8) as $idx) {
printRow($idx, '', '', '', '', '', '', '', '', '', ''); printRow($idx, '', '', '', '', '', '', '', '', '', '');
} }
echo " echo "
</table> </table>
</td>"; </td>";
} }
if ($admin['tournament'] == 2 || $admin['tournament'] == 3) { if ($admin['tournament'] == 2 || $admin['tournament'] == 3) {
printFighting($admin['tournament'], $admin['phase']); printFighting($admin['tournament'], $admin['phase']);
} }
?> ?>
</tr> </tr>
<tr><td colspan=8> <tr>
<font color=white size=2> <td colspan=8>
ㆍ예선은 홈&amp;어웨이 풀리그로 진행됩니다. (총 14경기)<br> <font color=white size=2>
ㆍ상위 4명이 본선에 진출하게 되며 조추첨을 통해 조가 배정됩니다.<br> ㆍ예선은 홈&amp;어웨이 풀리그로 진행됩니다. (총 14경기)<br>
ㆍ각 조1위가 시드1로 랜덤하게 조에 배정되며, 역시 각 조2위가 시드2로 랜덤하게 조에 배정됩니다.<br> ㆍ상위 4명이 본선에 진출하게 되며 조추첨을 통해 조가 배정됩니다.<br>
ㆍ그후 남은 3, 4위는 완전 랜덤하게 모든 조에 랜덤하게 배정됩니다.<br> ㆍ각 조1위가 시드1로 랜덤하게 조에 배정되며, 역시 각 조2위가 시드2로 랜덤하게 조에 배정됩니다.<br>
ㆍ본선은 개인당 3경기를 치르게 되며 승점(승3, 무1, 패0), 득실, 참가순서(시드)에 따라 순위를 매깁니다.<br> ㆍ그후 남은 3, 4위는 완전 랜덤하게 모든 조에 랜덤하게 배정됩니다.<br>
ㆍ각 조 1, 2위는 16강에 지정된 위치에 배정됩니다.<br> ㆍ본선은 개인당 3경기를 치르게 되며 승점(승3, 무1, 패0), 득실, 참가순서(시드)에 따라 순위를 매깁니다.<br>
ㆍ16강부터는 1경기 토너먼트로 진행됩니다.<br> ㆍ각 조 1, 2위는 16강에 지정된 위치에 배정됩니다.<br>
ㆍ참가비는 금20~140이며, 성적에 따라 금과 약간의 명성이 포상으로 주어집니다.<br> ㆍ16강부터는 1경기 토너먼트로 진행됩니다.<br>
ㆍ16강자 100, 8강자 300, 4강자 600, 준우승자 1200, 우승자 2000 (220년 기준)<br> ㆍ참가비는 금20~140이며, 성적에 따라 금과 약간의 명성이 포상으로 주어집니다.<br>
ㆍ즐거운 삼토! ㆍ16강자 100, 8강자 300, 4강자 600, 준우승자 1200, 우승자 2000 (220년 기준)<br>
</font> ㆍ즐거운 삼토!
</td></tr> </font>
</table> </td>
<table align=center width=2000 class='tb_layout bg0'> </tr>
<tr><td><?=closeButton()?></td></tr> </table>
<tr><td><?=banner()?> </td></tr> <table align=center width=2000 class='tb_layout bg0'>
</table> <tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table>
</body> </body>
</html>
</html>
+1 -10
View File
@@ -85,18 +85,10 @@ uasort($troops, function ($lhs, $rhs) {
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<title><?= UniqueConst::$serverName ?>: 부대편성</title> <title><?= UniqueConst::$serverName ?>: 부대편성</title>
<?= WebUtil::preloadJS('dist_js/troop.js') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('dist_css/troop.css') ?> <?= WebUtil::printDist('ts', ['common', 'troop'], true) ?>
<script>
</script>
</head> </head>
<body> <body>
@@ -233,7 +225,6 @@ uasort($troops, function ($lhs, $rhs) {
</tr> </tr>
</table> </table>
</div> </div>
<?= WebUtil::printJS('dist_js/troop.js') ?>
</body> </body>
</html> </html>
+1 -4
View File
@@ -46,18 +46,15 @@ if ($nationID) {
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1100" /> <meta name="viewport" content="width=1100" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/battle_simulator.css') ?> <?= WebUtil::printCSS('css/battle_simulator.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<script> <script>
var defaultSpecialDomestic = '<?= GameConst::$defaultSpecialDomestic ?>'; var defaultSpecialDomestic = '<?= GameConst::$defaultSpecialDomestic ?>';
var city = <?= Json::encode($city) ?>; var city = <?= Json::encode($city) ?>;
var nation = <?= Json::encode($nation) ?>; var nation = <?= Json::encode($nation) ?>;
</script> </script>
<?= WebUtil::printJS('dist_js/battle_simulator.js') ?> <?= WebUtil::printDist('ts', ['common', 'battle_simulator']) ?>
</head> </head>
<body> <body>
+4 -4
View File
@@ -7,8 +7,8 @@ include "func.php";
// $btn, $msg, $scoutmsg, $rate, $bill, $secretlimit // $btn, $msg, $scoutmsg, $rate, $bill, $secretlimit
$btn = Util::getPost('btn'); $btn = Util::getPost('btn');
$msg = Util::getPost('msg'); //$msg = Util::getPost('msg');
$scoutmsg = Util::getPost('scoutMsg'); //$scoutmsg = Util::getPost('scoutMsg');
$rate = Util::getPost('rate', 'int'); $rate = Util::getPost('rate', 'int');
$bill = Util::getPost('bill', 'int'); $bill = Util::getPost('bill', 'int');
$secretlimit = Util::getPost('secretlimit', 'int'); $secretlimit = Util::getPost('secretlimit', 'int');
@@ -34,14 +34,14 @@ if ($permission < 0) {
$nationID = $me['nation']; $nationID = $me['nation'];
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env'); $nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
if ($btn == "국가방침 수정") { /*if ($btn == "국가방침 수정") {
$msg = mb_substr($msg, 0, 16384); $msg = mb_substr($msg, 0, 16384);
//$msg = StringUtil:: //$msg = StringUtil::
$nationStor->notice = WebUtil::htmlPurify($msg); $nationStor->notice = WebUtil::htmlPurify($msg);
} elseif ($btn == "임관 권유문 수정") { } elseif ($btn == "임관 권유문 수정") {
$scoutmsg = mb_substr($scoutmsg, 0, 1000); $scoutmsg = mb_substr($scoutmsg, 0, 1000);
$nationStor->scout_msg = WebUtil::htmlPurify($scoutmsg); $nationStor->scout_msg = WebUtil::htmlPurify($scoutmsg);
} elseif ($btn == "세율") { } else*/if ($btn == "세율") {
$rate = Util::valueFit($rate, 5, 30); $rate = Util::valueFit($rate, 5, 30);
$db->update('nation', [ $db->update('nation', [
'rate' => $rate, 'rate' => $rate,
+82 -53
View File
@@ -1,58 +1,72 @@
<?php <?php
namespace sammo; namespace sammo;
function printLimitMsg($turntime) { function printLimitMsg($turntime)
{
//FIXME: template로 이동. //FIXME: template로 이동.
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head>
<title>접속제한</title> <head>
<meta charset="UTF-8"> <title>접속제한</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta charset="UTF-8">
<meta name="viewport" content="width=1024" /> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<?=WebUtil::printCSS('../d_shared/common.css')?> <meta name="viewport" content="width=1024" />
<?=WebUtil::printCSS('dist_css/common.css')?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <?= WebUtil::printDist('ts', 'common', true) ?>
</head> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<body> </head>
<font size=4><b>
접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : <?=$turntime?>)<br> <body>
(자신의 턴이 되면 다시 접속 가능합니다. 당신의 건강을 위해 잠시 쉬어보시는 것은 어떨까요? ^^)<br> <font size=4><b>
</b></font> 접속 제한중입니다. 1턴 이내에 너무 많은 갱신을 하셨습니다. (다음 접속 가능 시각 : <?= $turntime ?>)<br>
</body> (자신의 턴이 되면 다시 접속 가능합니다. 당신의 건강을 위해 잠시 쉬어보시는 것은 어떨까요? ^^)<br>
</html> </b></font>
</body>
</html>
<?php <?php
} }
function bar($per, $h=7) { function bar($per, $h = 7)
if($h == 7) { $bd = 0; $h = 7; $h2 = 5; } {
else { $bd = 1; $h = 12; $h2 = 8; } if ($h == 7) {
$bd = 0;
$h = 7;
$h2 = 5;
} else {
$bd = 1;
$h = 12;
$h2 = 8;
}
$per = round($per, 1); $per = round($per, 1);
$str = "<div class='bar_out' style='height:{$h}px;'> $str = "<div class='bar_out' style='height:{$h}px;'>
<div class='bar_in' style='background:url(".ServConfig::$gameImagePath."/pr{$h2}.gif)'></div> <div class='bar_in' style='background:url(" . ServConfig::$gameImagePath . "/pr{$h2}.gif)'></div>
<div style='width:{$per}%;background:url(".ServConfig::$gameImagePath."/pb{$h2}.gif)'></div> <div style='width:{$per}%;background:url(" . ServConfig::$gameImagePath . "/pb{$h2}.gif)'></div>
</div>"; </div>";
return $str; return $str;
} }
function optionsForCities(callable $infoCall=null) { function optionsForCities(callable $infoCall = null)
{
if(!$infoCall){ if (!$infoCall) {
return join('', array_map(function($city){ return join('', array_map(function ($city) {
return "<option value='{$city->id}'>{$city->name}</option>"; return "<option value='{$city->id}'>{$city->name}</option>";
}, CityConst::all())); }, CityConst::all()));
} }
$infoList = []; $infoList = [];
$noInfoList = []; $noInfoList = [];
foreach(CityConst::all() as $city){ foreach (CityConst::all() as $city) {
$info = $infoCall($city); $info = $infoCall($city);
if(!$info){ if (!$info) {
$noInfoList[] = "<option value='{$city->id}'>{$city->name}</option>"; $noInfoList[] = "<option value='{$city->id}'>{$city->name}</option>";
continue; continue;
} }
@@ -62,7 +76,8 @@ function optionsForCities(callable $infoCall=null) {
return join('', array_merge($infoList, $noInfoList)); return join('', array_merge($infoList, $noInfoList));
} }
function Submit($url, $msg="", $msg2="") { function Submit($url, $msg = "", $msg2 = "")
{
echo "a"; // 파폭 버그 때문 echo "a"; // 파폭 버그 때문
echo " echo "
<form method=post name=f1 action='{$url}'> <form method=post name=f1 action='{$url}'>
@@ -74,49 +89,62 @@ function Submit($url, $msg="", $msg2="") {
} }
function GetNationColors() { function GetNationColors()
$colors = array("#FF0000", "#800000", "#A0522D", "#FF6347", "#FFA500", "#FFDAB9", "#FFD700", "#FFFF00", {
$colors = array(
"#FF0000", "#800000", "#A0522D", "#FF6347", "#FFA500", "#FFDAB9", "#FFD700", "#FFFF00",
"#7CFC00", "#00FF00", "#808000", "#008000", "#2E8B57", "#008080", "#20B2AA", "#6495ED", "#7FFFD4", "#7CFC00", "#00FF00", "#808000", "#008000", "#2E8B57", "#008080", "#20B2AA", "#6495ED", "#7FFFD4",
"#AFEEEE", "#87CEEB", "#00FFFF", "#00BFFF", "#0000FF", "#000080", "#483D8B", "#7B68EE", "#BA55D3", "#AFEEEE", "#87CEEB", "#00FFFF", "#00BFFF", "#0000FF", "#000080", "#483D8B", "#7B68EE", "#BA55D3",
"#800080", "#FF00FF", "#FFC0CB", "#F5F5DC", "#E0FFFF", "#FFFFFF", "#A9A9A9"); "#800080", "#FF00FF", "#FFC0CB", "#F5F5DC", "#E0FFFF", "#FFFFFF", "#A9A9A9"
);
return $colors; return $colors;
} }
function backButton() { function backButton()
{
return " return "
<input type=button value='돌아가기' onclick=location.replace('./')><br> <input type=button value='돌아가기' onclick=location.replace('./')><br>
"; ";
} }
function CoreBackButton() { function CoreBackButton()
{
return " return "
<input type=button value='돌아가기' onclick=location.replace('b_chiefcenter.php')><br> <input type=button value='돌아가기' onclick=location.replace('b_chiefcenter.php')><br>
"; ";
} }
function closeButton() { function closeButton()
{
return " return "
<input type=button value='창 닫기' onclick=window.close()><br> <input type=button value='창 닫기' onclick=window.close()><br>
"; ";
} }
function printCitiesBasedOnDistance(int $cityNo, int $maxDistance=1):string { function printCitiesBasedOnDistance(int $cityNo, int $maxDistance = 1): string
{
$distanceList = searchDistance($cityNo, $maxDistance, true); $distanceList = searchDistance($cityNo, $maxDistance, true);
$result = []; $result = [];
for($dist = 1; $dist <= $maxDistance; $dist++){ for ($dist = 1; $dist <= $maxDistance; $dist++) {
$cityList = array_map(function($cityID){ $cityList = array_map(function ($cityID) {
return CityConst::byID($cityID)->name; return CityConst::byID($cityID)->name;
}, Util::array_get($distanceList[$dist], [])); }, Util::array_get($distanceList[$dist], []));
$cityStr = join(', ', $cityList); $cityStr = join(', ', $cityList);
switch($dist) { switch ($dist) {
case 1: $color = "magenta"; break; case 1:
case 2: $color = "orange"; break; $color = "magenta";
default: $color = "yellow"; break; break;
case 2:
$color = "orange";
break;
default:
$color = "yellow";
break;
} }
$result[] = "{$dist}칸 떨어진 도시 : <span style='color:{$color};font-weight:bold;'>{$cityStr}</span>"; $result[] = "{$dist}칸 떨어진 도시 : <span style='color:{$color};font-weight:bold;'>{$cityStr}</span>";
@@ -125,7 +153,8 @@ function printCitiesBasedOnDistance(int $cityNo, int $maxDistance=1):string {
} }
function info($type=0) { function info($type = 0)
{
$db = DB::db(); $db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env'); $gameStor = KVStorage::getStorage($db, 'game_env');
@@ -136,14 +165,14 @@ function info($type=0) {
$gencount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc < 2'); $gencount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc < 2');
$npccount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc >= 2'); $npccount = $db->queryFirstField('SELECT count(no) FROM general WHERE npc >= 2');
switch($type) { switch ($type) {
case 0: case 0:
return "현재 : {$admin['year']}年 {$admin['month']}月 (<font color=cyan>$termtype</font> 서버)<br> 등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + <font color=cyan>NPC {$npccount} 명</font>"; return "현재 : {$admin['year']}年 {$admin['month']}月 (<font color=cyan>$termtype</font> 서버)<br> 등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + <font color=cyan>NPC {$npccount} 명</font>";
case 1: case 1:
return "현재 : {$admin['year']}年 {$admin['month']}月 (<font color=cyan>$termtype</font> 서버)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + <font color=cyan>NPC {$npccount} 명</font>"; return "현재 : {$admin['year']}年 {$admin['month']}月 (<font color=cyan>$termtype</font> 서버)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + <font color=cyan>NPC {$npccount} 명</font>";
case 2: case 2:
return "현재 : {$admin['year']}年 {$admin['month']}月 (<font color=cyan>$termtype</font> 서버)"; return "현재 : {$admin['year']}年 {$admin['month']}月 (<font color=cyan>$termtype</font> 서버)";
case 3: case 3:
return "등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + <font color=cyan>NPC {$npccount} 명</font>"; return "등록 장수 : 유저 {$gencount} / {$admin['maxgeneral']} 명 + <font color=cyan>NPC {$npccount} 명</font>";
} }
} }
+46 -33
View File
@@ -11,10 +11,10 @@ namespace sammo;
* TODO: side effect를 제거 * TODO: side effect를 제거
*/ */
/** /**
* 관리자 권한이 필요함을 출력. * 관리자 권한이 필요함을 출력.
* @return void * @return void
*/ */
function requireAdminPermissionHTML() function requireAdminPermissionHTML()
{ {
ob_start(); ob_start();
@@ -28,8 +28,8 @@ function requireAdminPermissionHTML()
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?> <?= WebUtil::printDist('ts', 'common', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
<body> <body>
@@ -119,7 +119,7 @@ function displaySpecialDomesticInfo(?string $type): string
]); ]);
} }
function allButton(bool $seizeNPCMode, array $opts=[]) function allButton(bool $seizeNPCMode, array $opts = [])
{ {
if ($seizeNPCMode) { if ($seizeNPCMode) {
$site = "a_npcList.php"; $site = "a_npcList.php";
@@ -143,7 +143,7 @@ function allButton(bool $seizeNPCMode, array $opts=[])
} }
function commandButton(array $opts=[]) function commandButton(array $opts = [])
{ {
$session = Session::getInstance(); $session = Session::getInstance();
$userID = Session::getUserID(); $userID = Session::getUserID();
@@ -196,13 +196,13 @@ function formatDefenceTrain(int $value): string
{ {
if ($value === 999) { if ($value === 999) {
return "×"; return "×";
} else if ($value >= 90){ } else if ($value >= 90) {
return "☆"; return "☆";
} else if ($value >= 80) { } else if ($value >= 80) {
return "◎"; return "◎";
} else if ($value >= 60) { } else if ($value >= 60) {
return "○"; return "○";
} else{ } else {
return "△"; return "△";
} }
} }
@@ -253,36 +253,49 @@ function getInvitationList(array $nationList)
} }
function getAutorunInfo($autorunOption){ function getAutorunInfo($autorunOption)
$templates = new \League\Plates\Engine(__DIR__.'/templates'); {
$templates = new \League\Plates\Engine(__DIR__ . '/templates');
$auto_info = []; $auto_info = [];
foreach($autorunOption['options'] as $auto_option => $value){ foreach ($autorunOption['options'] as $auto_option => $value) {
assert($value); assert($value);
switch($auto_option){ switch ($auto_option) {
case 'develop': $auto_info['내정'] = '내정'; break; case 'develop':
case 'warp': $auto_info['순간이동'] = '순간이동'; break; $auto_info['내정'] = '내정';
case 'recruit': $auto_info['징병'] = $auto_info['징병']??'징병'; break; break;
case 'recruit_high': $auto_info['징병'] = '모병'; break; case 'warp':
case 'train': $auto_info['훈사'] = '훈련/사기진작'; break; $auto_info['순간이동'] = '순간이동';
case 'battle': $auto_info['출병'] = '출병'; break; break;
case 'chief': $auto_info['사령턴'] = '사령턴'; break; case 'recruit':
$auto_info['징병'] = $auto_info['징병'] ?? '징병';
break;
case 'recruit_high':
$auto_info['징병'] = '모병';
break;
case 'train':
$auto_info['훈사'] = '훈련/사기진작';
break;
case 'battle':
$auto_info['출병'] = '출병';
break;
case 'chief':
$auto_info['사령턴'] = '사령턴';
break;
} }
} }
$limit = Util::toInt($autorunOption['limit_minutes']); $limit = Util::toInt($autorunOption['limit_minutes']);
if($limit >= 43200){ if ($limit >= 43200) {
$auto_info['제한'] = '항상 유효'; $auto_info['제한'] = '항상 유효';
} } else if ($limit % 60 == 0) {
else if($limit % 60 == 0){ $auto_info['제한'] = ($limit / 60) . '시간 유효';
$auto_info['제한'] = ($limit/60).'시간 유효'; } else {
} $auto_info['제한'] = ($limit) . '분 유효';
else{
$auto_info['제한'] = ($limit).'분 유효';
} }
$auto_info = join(', ', array_values($auto_info)); $auto_info = join(', ', array_values($auto_info));
return $templates->render('tooltip', [ return $templates->render('tooltip', [
'text'=>'자율행동', 'text' => '자율행동',
'info'=>$auto_info, 'info' => $auto_info,
'style'=>'text-decoration:underline', 'style' => 'text-decoration:underline',
'copyable_info'=>true 'copyable_info' => true
]); ]);
} }
+1 -7
View File
@@ -118,15 +118,9 @@ if (!$otherTextInfo) {
<meta name="viewport" content="width=500" /> <meta name="viewport" content="width=500" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?>
<?= WebUtil::printJS('dist_js/common_vue.js', true) ?>
<?= WebUtil::printJS('dist_js/v_main.js', true) ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?> <?= WebUtil::printDist('vue', 'v_main', true) ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('dist_css/common_vue.css') ?>
<?= WebUtil::printCSS('dist_css/v_main.css') ?>
<?= WebUtil::printCSS('css/map.css') ?> <?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printStaticValues([ <?= WebUtil::printStaticValues([
'serverNick' => DB::prefix(), 'serverNick' => DB::prefix(),
+1 -4
View File
@@ -31,11 +31,8 @@ if ($session->userGrade < 5 && !$allowReset) {
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/install.js') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<?= WebUtil::printCSS('css/install.css') ?> <?= WebUtil::printCSS('css/install.css') ?>
<?= WebUtil::printDist('ts', ['common', 'install']) ?>
</head> </head>
<body> <body>
+1 -4
View File
@@ -24,12 +24,9 @@ if ($session->userGrade == 5) {
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/install_db.js') ?>
<?= WebUtil::printCSS('css/normalize.css') ?> <?= WebUtil::printCSS('css/normalize.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<?= WebUtil::printCSS('css/install.css') ?> <?= WebUtil::printCSS('css/install.css') ?>
<?= WebUtil::printDist('ts', ['common', 'install_db']) ?>
</head> </head>
<body> <body>
-111
View File
@@ -1,111 +0,0 @@
<?php
namespace sammo;
include 'lib.php';
include 'func.php';
WebUtil::requireAJAX();
$session = Session::requireGameLogin([])->setReadOnly();
$userID = $session::getUserID();
$serverID = UniqueConst::$serverID;
$image = $_FILES['img'];
switch ($image['error']) {
case UPLOAD_ERR_OK:
break;
case UPLOAD_ERR_NO_FILE:
Json::die([
'result'=>false,
'reason'=>'파일이 없습니다.'
]);
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
Json::die([
'result'=>false,
'reason'=>'업로드된 파일이 지나치게 큽니다.'
]);
default:
Json::die([
'result'=>false,
'reason'=>'업로드되지 않았습니다.'
]);
}
if(!is_uploaded_file($image['tmp_name'])) {
Json::die([
'result'=>false,
'reason'=>'제대로 파일이 업로드되지 않았습니다.'
]);
}
if($image['size'] > 1048576) {
//파일크기 검사
Json::die([
'result'=>false,
'reason'=>'1MB 이하로 올려주세요!'
]);
}
$size = getImageSize($image['tmp_name']);
$imageType = $size[2];
$availableImageType = array('.jpg'=>IMAGETYPE_JPEG, '.png'=>IMAGETYPE_PNG, '.gif'=>IMAGETYPE_GIF);
$newExt = array_search($imageType, $availableImageType, true);
if(!$newExt) {
Json::die([
'result'=>false,
'reason'=>'jpg, gif, png 파일이 아닙니다!'
]);
}
$db = RootDB::db();
$imgStor = KVStorage::getStorage($db, 'img_storage');
$picName = hash_file('md5', $image['tmp_name']);
$newPicName = "$picName$newExt";
$destDir = AppConf::getUserIconPathFS().'/uploaded_image';
$dest = $destDir.'/'.$newPicName;
if(!file_exists($dest)){
if (!file_exists($destDir)) {
mkdir($destDir);
}
if(!is_dir($destDir)) {
Json::die([
'result'=>false,
'reason'=>'버그! 업로드 경로 확인!'
]);
}
if(!is_writable($destDir)){
Json::die([
'result'=>false,
'reason'=>'버그! 업로드 권한 확인!'
]);
}
$dest = $destDir.'/'.$newPicName;
if(!move_uploaded_file($image['tmp_name'], $dest)) {
Json::die([
'result'=>false,
'reason'=>'업로드에 실패했습니다!'
]);
}
}
$storedStatus = $imgStor->$newPicName??[];
$imgKey = "$serverID:$userID";
if(!key_exists($imgKey, $storedStatus)){
$storedStatus[$imgKey] = TimeUtil::now();
}
$imgStor->$newPicName = $storedStatus;
Json::die([
'result'=>true,
'reason'=>'성공',
'path'=>AppConf::getUserIconPathWeb().'/uploaded_image/'.$newPicName
]);
+1 -4
View File
@@ -19,14 +19,12 @@ include "func.php";
'serverNick' => DB::prefix(), 'serverNick' => DB::prefix(),
'serverID' => UniqueConst::$serverID 'serverID' => UniqueConst::$serverID
]) ?> ]) ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('d_shared/base_map.js') ?> <?= WebUtil::printJS('d_shared/base_map.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/map.css') ?> <?= WebUtil::printCSS('css/map.css') ?>
<?= WebUtil::printDist('ts', ['common', 'recent_map'], true) ?>
<style> <style>
html { html {
width: 700px; width: 700px;
@@ -52,7 +50,6 @@ include "func.php";
<div class="card-body"> <div class="card-body">
</div> </div>
</div> </div>
<?= WebUtil::printJS('dist_js/recent_map.js') ?>
</body> </body>
</html> </html>
+101
View File
@@ -0,0 +1,101 @@
<?php
namespace sammo\API\Misc;
use sammo\Session;
use DateTimeInterface;
use sammo\AppConf;
use sammo\KVStorage;
use sammo\RootDB;
use sammo\TimeUtil;
use sammo\UniqueConst;
use sammo\Validator;
class UploadImage extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('required', [
'imageData',
]);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$imageData = base64_decode($this->args['imageData'], true);
if ($imageData === false) {
return "올바른 데이터가 아닙니다.";
}
if(strlen($imageData) > 1024*1024){
//NOTE: 가변 길이를 적용해야할까?
return "이미지 크기가 1MB보다 큽니다.";
}
$contentType = (new \finfo(FILEINFO_MIME_TYPE))->buffer($imageData);
if (substr($contentType, 0, 5) !== 'image') {
return '이미지 파일이 아닙니다: ' . $contentType;
}
$extension = ltrim($contentType, 'image/');
$validExtensions = ['png', 'jpeg', 'jpg', 'gif', 'webp'];
if (!in_array(strtolower($extension), $validExtensions)) {
return '지원하지 않는 이미지 파일입니다: ' . $contentType;
}
$oMD = hash_init('md5');
hash_update($oMD, $imageData);
$imgName = hash_final($oMD);
$imgFullName = "{$imgName}.{$extension}";
$destDir = AppConf::getUserIconPathFS() . '/uploaded_image';
$destPath = "{$destDir}/{$imgFullName}";
if (!file_exists($destPath)) {
if (!file_exists($destDir)) {
mkdir($destDir);
}
if (!is_dir($destDir)) {
return '버그! 업로드 경로 확인!';
}
if (!is_writable($destDir)) {
return '버그! 업로드 권한 확인!';
}
if (!file_put_contents($destPath, $imageData)) {
return '업로드에 실패했습니다!';
}
}
$db = RootDB::db();
$imgStor = KVStorage::getStorage($db, 'img_storage');
$userID = $session->userID;
$serverID = UniqueConst::$serverID;
$storedStatus = $imgStor->$imgFullName ?? [];
$imgKey = "$serverID:$userID";
if (!key_exists($imgKey, $storedStatus)) {
$storedStatus[$imgKey] = TimeUtil::now();
}
$imgStor->$imgFullName = $storedStatus;
return [
'result' => true,
'path'=>AppConf::getUserIconPathWeb().'/uploaded_image/'.$imgFullName,
];
}
}
+58
View File
@@ -0,0 +1,58 @@
<?php
namespace sammo\API\Nation;
use sammo\Session;
use DateTimeInterface;
use sammo\DB;
use sammo\KVStorage;
use sammo\Validator;
use sammo\WebUtil;
use function sammo\checkSecretPermission;
class SetNotice extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('required', [
'msg',
])->rule('lengthMax', 'msg', 16384);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$msg = $this->args['msg'];
$userID = $session->userID;
$db = DB::db();
$me = $db->queryFirstRow('SELECT `no`,nation,`officer_level`,permission,penalty FROM general WHERE `owner`=%i', $userID);
$permission = checkSecretPermission($me, false);
if($permission < 0){
return "권한이 부족합니다.";
}
if ($me['officer_level'] < 5 && $permission != 4){
return "권한이 부족합니다.";
}
$nationID = $me['nation'];
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nationStor->notice = WebUtil::htmlPurify($msg);
return [
'result' => true
];
}
}
+58
View File
@@ -0,0 +1,58 @@
<?php
namespace sammo\API\Nation;
use sammo\Session;
use DateTimeInterface;
use sammo\DB;
use sammo\KVStorage;
use sammo\Validator;
use sammo\WebUtil;
use function sammo\checkSecretPermission;
class SetScoutMsg extends \sammo\BaseAPI
{
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('required', [
'msg',
])->rule('lengthMax', 'msg', 1000);
if (!$v->validate()) {
return $v->errorStr();
}
return null;
}
public function getRequiredSessionMode(): int
{
return static::REQ_GAME_LOGIN | static::REQ_READ_ONLY;
}
public function launch(Session $session, ?DateTimeInterface $modifiedSince, ?string $reqEtag)
{
$msg = $this->args['msg'];
$userID = $session->userID;
$db = DB::db();
$me = $db->queryFirstRow('SELECT `no`,nation,`officer_level`,permission,penalty FROM general WHERE `owner`=%i', $userID);
$permission = checkSecretPermission($me, false);
if($permission < 0){
return "권한이 부족합니다.";
}
if ($me['officer_level'] < 5 && $permission != 4){
return "권한이 부족합니다.";
}
$nationID = $me['nation'];
$nationStor = KVStorage::getStorage($db, $nationID, 'nation_env');
$nationStor->scout_msg = WebUtil::htmlPurify($msg);
return [
'result' => true
];
}
}
+1
View File
@@ -1,4 +1,5 @@
@import "./common/bootstrap5.scss"; @import "./common/bootstrap5.scss";
@import "./editor_component.scss";
html * { html * {
max-height: 1000000px; max-height: 1000000px;
@@ -1,4 +1,4 @@
@charset "UTF-8"; @import '@scss/common/bootstrap5.scss';
#scoutMsgForm .viewer{ #scoutMsgForm .viewer{
max-height:200px; max-height:200px;
+46
View File
@@ -0,0 +1,46 @@
.custom-image-original {
max-width: 100%;
display: block;
}
.custom-image-large {
width: 100%;
display: block;
}
.custom-image-medium {
width: 50%;
display: block;
}
.custom-image-small {
margin: auto;
width: 25%;
}
.custom-image-align-float-left{
float: left;
}
.custom-image-align-float-right{
float: right;
}
.custom-image-align-center{
margin-left: auto;
margin-right: auto;
display: block;
}
.custom-image-align-left{
margin-left: 0;
margin-right: auto;
display: block;
}
.custom-image-align-right{
margin-left: auto;
margin-right: 0;
display: block;
}
+1 -1
View File
@@ -1,6 +1,6 @@
@import "./common/break_500px.scss"; @import "./common/break_500px.scss";
@import "./common/bootstrap5.scss"; @import "./common/bootstrap5.scss";
@import "./editor_component.scss";
body { body {
color: white; color: white;
background-color: black; background-color: black;
+1 -7
View File
@@ -48,7 +48,6 @@ foreach (getCharacterList(false) as $id => [$name, $info]) {
<meta name="viewport" content="width=1024'" /> <meta name="viewport" content="width=1024'" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('../css/config.css') ?> <?= WebUtil::printCSS('../css/config.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/select_general_from_pool.css') ?> <?= WebUtil::printCSS('css/select_general_from_pool.css') ?>
@@ -66,12 +65,7 @@ foreach (getCharacterList(false) as $id => [$name, $info]) {
</script> </script>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printDist('ts', ['common', 'join', 'select_general_from_pool']) ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('dist_js/join.js') ?>
<?= WebUtil::printJS('dist_js/select_general_from_pool.js') ?>
</head> </head>
+1 -5
View File
@@ -38,7 +38,6 @@ foreach ($scoutMsgs as $nationID => $scoutMsg) {
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('../css/config.css') ?> <?= WebUtil::printCSS('../css/config.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/select_npc.css') ?> <?= WebUtil::printCSS('css/select_npc.css') ?>
@@ -70,10 +69,7 @@ foreach ($scoutMsgs as $nationID => $scoutMsg) {
</script> </script>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printDist('ts', ['common', 'join', 'select_npc']) ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('dist_js/select_npc.js') ?>
</head> </head>
+1 -4
View File
@@ -43,16 +43,13 @@ if ($permission < 1) {
<!--<?= WebUtil::printCSS('../e_lib/tui.editor/tui-editor-contents.min.css') ?>--> <!--<?= WebUtil::printCSS('../e_lib/tui.editor/tui-editor-contents.min.css') ?>-->
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('../css/config.css') ?> <?= WebUtil::printCSS('../css/config.css') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<?= WebUtil::printCSS('css/diplomacy.css') ?> <?= WebUtil::printCSS('css/diplomacy.css') ?>
<script> <script>
var permissionLevel = <?= $permission ?>; // var permissionLevel = <?= $permission ?>; //
</script> </script>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printDist('ts', ['common', 'diplomacy']) ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/diplomacy.js') ?>
</head> </head>
+1 -1
View File
@@ -102,7 +102,7 @@ export type BoardCommentItem = {
}; };
export default defineComponent({ export default defineComponent({
name: "Board", name: "PageBoard",
components: { components: {
TopBackBar, TopBackBar,
BoardArticle, BoardArticle,
@@ -246,13 +246,12 @@
</div> </div>
</div> </div>
<div class="row" v-for="(log, idx) in lastInheritPointLogs" :key="idx"> <div class="row" v-for="(log, idx) in lastInheritPointLogs" :key="idx">
<div class="col a-right" style="max-width:20ch"> <div class="col a-right" style="max-width: 20ch">
<small class="text-muted tnum">[{{log.date}}]</small> <small class="text-muted tnum">[{{ log.date }}]</small>
</div> </div>
<div class="col a-left"> <div class="col a-left">
{{log.text}} {{ log.text }}
</div> </div>
</div> </div>
</div> </div>
</template> </template>
@@ -273,7 +272,7 @@ type InheritanceType =
| "max_belong" | "max_belong"
| "max_domestic_critical" | "max_domestic_critical"
| "active_action" | "active_action"
// | "snipe_combat" // | "snipe_combat"
| "combat" | "combat"
| "sabotage" | "sabotage"
| "unifier" | "unifier"
@@ -284,11 +283,11 @@ type InheritanceType =
type InheritanceViewType = InheritanceType | "sum" | "new"; type InheritanceViewType = InheritanceType | "sum" | "new";
declare const lastInheritPointLogs: { declare const lastInheritPointLogs: {
server_id: string, server_id: string;
year: number, year: number;
month: number, month: number;
date: string, date: string;
text: string, text: string;
}[]; }[];
declare const items: Record<InheritanceType, number>; declare const items: Record<InheritanceType, number>;
@@ -323,9 +322,9 @@ const inheritanceViewText: Record<
}, },
active_action: { active_action: {
title: "능동 행동 수", title: "능동 행동 수",
info: "장수 동향에 본인의 이름이 직접 나타난 수입니다.<br>일부 사령턴은 제외됩니다." info: "장수 동향에 본인의 이름이 직접 나타난 수입니다.<br>일부 사령턴은 제외됩니다.",
}, },
/* snipe_combat: { /* snipe_combat: {
title: "병종 상성 우위 횟수", title: "병종 상성 우위 횟수",
info: "유리한 상성을 가지고 전투했습니다.", info: "유리한 상성을 가지고 전투했습니다.",
},*/ },*/
@@ -440,7 +439,7 @@ declare const availableUnique: Record<
>; >;
export default defineComponent({ export default defineComponent({
name: "InheritPoint", name: "PageInheritPoint",
data() { data() {
const inheritBuff = {} as Record<inheritBuffType, number>; const inheritBuff = {} as Record<inheritBuffType, number>;
for (const buffKey of Object.keys( for (const buffKey of Object.keys(
@@ -701,7 +700,7 @@ export default defineComponent({
text-align: right; text-align: right;
} }
.tnum{ .tnum {
font-feature-settings: 'tnum'; font-feature-settings: "tnum";
} }
</style> </style>
+1 -1
View File
@@ -389,7 +389,7 @@ type APIArgs = {
}; };
export default defineComponent({ export default defineComponent({
name: "Join", name: "PageJoin",
components: { components: {
TopBackBar, TopBackBar,
CTable, CTable,
@@ -511,7 +511,7 @@ declare const lastSetters: {
}; };
export default defineComponent({ export default defineComponent({
name: "NPCControl", name: "PageNPCControl",
components: { components: {
TopBackBar, TopBackBar,
NumberInputWithInfo, NumberInputWithInfo,
+124
View File
@@ -0,0 +1,124 @@
<template>
<div> &amp; 임관 권유 메시지</div>
<div id="noticeForm">
<div class="bg1" style="display: flex; justify-content: space-around">
<div style="flex: 1 1 auto">국가 방침</div>
<div>
<b-button
@click="enableEditNationMsg"
v-if="editable && !inEditNationMsg"
>국가방침 수정</b-button
>
<b-button @click="saveNationMsg" v-if="editable && inEditNationMsg"
>저장</b-button
>
<b-button v-if="editable && inEditNationMsg" @click="rollbackNationMsg"
>취소</b-button
>
</div>
</div>
<TipTap v-model="nationMsg" :editable="inEditNationMsg" />
</div>
<div id="scoutMsgForm">
<div class="bg1" style="display: flex; justify-content: space-around">
<div style="flex: 1 1 auto">임관 권유</div>
<div>
<b-button
@click="enableEditScoutMsg"
v-if="editable && !inEditScoutMsg"
>임관 권유문 수정</b-button
>
<b-button @click="saveScoutMsg" v-if="editable && inEditScoutMsg"
>저장</b-button
>
<b-button v-if="editable && inEditScoutMsg" @click="rollbackScoutMsg"
>취소</b-button
>
</div>
</div>
<div style="border-bottom: solid gray 0.5px">
870px x 200px를 넘어서는 내용은 표시되지 않습니다.
</div>
<div style="width: 870px; margin-left: auto">
<TipTap v-model="scoutMsg" :editable="inEditScoutMsg" />
</div>
</div>
</template>
<script lang="ts">
import "@scss/dipcenter.scss";
import "@scss/common_legacy.scss";
import "@scss/editor_component.scss";
import TipTap from "./components/TipTap.vue";
import { defineComponent } from "vue";
import { sammoAPI } from "./util/sammoAPI";
import { isString } from "lodash";
declare const editable: boolean;
declare const nationMsg: string;
declare const scoutMsg: string;
export default defineComponent({
name: "PartialDipcenter",
components: {
TipTap,
},
data() {
return {
editable,
oldNationMsg: nationMsg,
oldScoutMsg: scoutMsg,
nationMsg,
scoutMsg,
inEditNationMsg: false,
inEditScoutMsg: false,
};
},
methods: {
enableEditNationMsg() {
this.inEditNationMsg = true;
},
rollbackNationMsg() {
this.inEditNationMsg = false;
this.nationMsg = this.oldNationMsg;
},
async saveNationMsg() {
const msg = this.nationMsg;
try {
await sammoAPI("Nation/SetNotice", {
msg,
});
this.oldNationMsg = msg;
this.inEditNationMsg = false;
} catch (e) {
if (isString(e)) {
alert(e);
}
console.error(e);
}
},
enableEditScoutMsg() {
this.inEditScoutMsg = true;
},
rollbackScoutMsg() {
this.inEditScoutMsg = false;
this.scoutMsg = this.oldScoutMsg;
},
async saveScoutMsg() {
const msg = this.scoutMsg;
try {
await sammoAPI("Nation/SetScoutMsg", {
msg,
});
this.oldScoutMsg = msg;
this.inEditScoutMsg = false;
} catch (e) {
if (isString(e)) {
alert(e);
}
console.error(e);
}
},
},
});
</script>
@@ -287,7 +287,7 @@ function isDropdownChildren(e?: Event): boolean {
const searchModeKey = `sammo_${serverID}_searchMode`; const searchModeKey = `sammo_${serverID}_searchMode`;
export default defineComponent({ export default defineComponent({
name: "ReservedCommand", name: "PartialReservedCommand",
methods: { methods: {
updateNow() { updateNow() {
+3 -2
View File
@@ -13,7 +13,6 @@
"bossInfo": "bossInfo.ts", "bossInfo": "bossInfo.ts",
"myPage": "myPage.ts", "myPage": "myPage.ts",
"extExpandCity": "extExpandCity.ts", "extExpandCity": "extExpandCity.ts",
"dipcenter": "dipcenter.ts",
"diplomacy": "diplomacy.ts", "diplomacy": "diplomacy.ts",
"currentCity": "currentCity.ts", "currentCity": "currentCity.ts",
"hallOfFame": "hallOfFame.ts", "hallOfFame": "hallOfFame.ts",
@@ -27,6 +26,8 @@
"v_board": "v_board.ts", "v_board": "v_board.ts",
"v_NPCControl": "v_NPCControl.ts", "v_NPCControl": "v_NPCControl.ts",
"v_join": "v_join.ts", "v_join": "v_join.ts",
"v_main": "v_main.ts" "v_main": "v_main.ts",
"v_dipcenter": "v_dipcenter.ts"
} }
} }
+1 -1
View File
@@ -50,7 +50,7 @@
</table> </table>
</template> </template>
<script lang="ts"> <script lang="ts">
import { BoardArticleItem } from "@/Board.vue"; import { BoardArticleItem } from "@/PageBoard.vue";
import BoardComment from "@/components/BoardComment.vue"; import BoardComment from "@/components/BoardComment.vue";
import { defineComponent, PropType } from "vue"; import { defineComponent, PropType } from "vue";
import axios from "axios"; import axios from "axios";
+1 -1
View File
@@ -7,7 +7,7 @@
</tr> </tr>
</template> </template>
<script lang="ts"> <script lang="ts">
import { BoardCommentItem } from "@/Board.vue"; import { BoardCommentItem } from "@/PageBoard.vue";
import { defineComponent, PropType } from "vue"; import { defineComponent, PropType } from "vue";
export default defineComponent({ export default defineComponent({
+527
View File
@@ -0,0 +1,527 @@
<template>
<b-button-toolbar key-nav v-if="editable && editor" class="bg-dark">
<b-button-group class="mx-1">
<b-button
@click="editor.commands.undo()"
v-b-tooltip.hover
title="되돌리기"
><i class="bi bi-arrow-90deg-left"></i
></b-button>
<b-button @click="editor.commands.redo()" v-b-tooltip.hover title="재실행"
><i class="bi bi-arrow-90deg-right"></i
></b-button>
</b-button-group>
<b-button-group class="mx-1">
<b-button
@click="editor.chain().focus().toggleBold().run()"
:class="{ 'is-active': editor.isActive('bold') }"
v-b-tooltip.hover
title="진하게"
><i class="bi bi-type-bold"></i
></b-button>
<b-button
@click="editor.chain().focus().toggleItalic().run()"
:class="{ 'is-active': editor.isActive('italic') }"
v-b-tooltip.hover
title="기울이기"
><i class="bi bi-type-italic"></i
></b-button>
<b-button
@click="editor.chain().focus().toggleUnderline().run()"
:class="{ 'is-active': editor.isActive('underline') }"
v-b-tooltip.hover
title="밑줄"
><i class="bi bi-type-underline"></i
></b-button>
<!-- 효과 지우기 -->
</b-button-group>
<b-button-group class="mx-1">
<b-dropdown>
<template #button-content> 크기 </template>
<b-dropdown-item @click="editor.chain().focus().unsetFontSize().run()"
><span>기본</span></b-dropdown-item
>
<b-dropdown-divider />
<b-dropdown-item
v-for="sizeItem in fontSize"
:key="sizeItem"
@click="editor.chain().focus().setFontSize(sizeItem).run()"
><span
:style="{
'font-size': sizeItem,
'text-decoration': editor.isActive('textStyle', {
fontSize: sizeItem,
})
? 'underline'
: undefined,
}"
>{{ sizeItem }}</span
></b-dropdown-item
>
</b-dropdown>
<!-- 글꼴 -->
</b-button-group>
<b-button-group class="mx-1">
<b-button
@click="editor.chain().focus().toggleStrike().run()"
:class="{ 'is-active': editor.isActive('strike') }"
v-b-tooltip.hover
title="가로선"
><i class="bi bi-type-strikethrough"></i
></b-button>
<!-- 윗첨자, 아랫첨자 -->
</b-button-group>
<b-button-group class="mx-1">
<b-button
@click="
editor.chain().focus().unsetColor().unsetBackgroundColor().run()
"
v-b-tooltip.hover
title="색상 취소"
><i class="bi bi-droplet"></i
></b-button>
<input
type="color"
class="form-control form-control-color"
:value="
colorConvert(editor.getAttributes('textStyle').color, '#ffffff')
"
@input="editor.chain().focus().setColor($event.target.value).run()"
v-b-tooltip.hover
title="글자색"
/>
<input
type="color"
class="form-control form-control-color"
:value="
colorConvert(
editor.getAttributes('textStyle').backgroundColor,
'#000000'
)
"
@input="
editor.chain().focus().setBackgroundColor($event.target.value).run()
"
v-b-tooltip.hover
title="배경색"
/>
</b-button-group>
<b-button-group class="mx-1">
<b-button
v-b-tooltip.hover
@click="showImageModal = true"
title="이미지 추가"
><i class="bi bi-image"></i
></b-button>
<!-- 이미지추가 -->
<!-- 링크 -->
<!-- 영상링크 -->
<!-- -->
<!-- 구분선 삽입 -->
<b-button
@click="editor.chain().focus().setHorizontalRule().run()"
v-b-tooltip.hover
title="구분선"
><i class="bi bi-hr"></i
></b-button>
</b-button-group>
<b-button-group class="mx-1">
<!-- 글머리 기호 -->
<!-- 번호 매기기 -->
<b-button
@click="editor.chain().focus().setTextAlign('left').run()"
:class="{ 'is-active': editor.isActive({ textAlign: 'left' }) }"
v-b-tooltip.hover
title="왼쪽 정렬"
><i class="bi bi-text-left"></i
></b-button>
<b-button
@click="editor.chain().focus().setTextAlign('center').run()"
:class="{ 'is-active': editor.isActive({ textAlign: 'center' }) }"
v-b-tooltip.hover
title="가운데 정렬"
><i class="bi bi-text-center"></i
></b-button>
<b-button
@click="editor.chain().focus().setTextAlign('right').run()"
:class="{ 'is-active': editor.isActive({ textAlign: 'right' }) }"
v-b-tooltip.hover
title="오른쪽 정렬"
><i class="bi bi-text-right"></i
></b-button>
<!-- 문단정렬(, , , )(내어, 들여) -->
</b-button-group>
<b-button-group class="mx-1"> </b-button-group>
<b-button-group class="mx-1">
<!-- 줄간격 (1.0, 1.2, 1.4, 1.5, 1.6, 1.8, 2.0, 3.0) -->
</b-button-group>
<b-button-group class="mx-1">
<!-- 원본 코드 -->
</b-button-group>
</b-button-toolbar>
<bubble-menu
:tippy-options="{ animation: false, maxWidth: 600 }"
:editor="editor"
v-if="editable && editor"
v-show="editor.isActive('custom-image')"
>
<b-button-toolbar>
<b-button-group class="mx-1">
<b-button
@click="editor.chain().focus().setImage({ size: 'small' }).run()"
:class="{
'is-active': editor.isActive('custom-image', {
size: 'small',
}),
f_frac: true,
}"
v-b-tooltip.hover
title="1/4 너비로 채우기"
>1/4</b-button
>
<b-button
@click="editor.chain().focus().setImage({ size: 'medium' }).run()"
:class="{
'is-active': editor.isActive('custom-image', {
size: 'medium',
}),
f_frac: true,
}"
v-b-tooltip.hover
title="1/2 너비로 채우기"
>1/2</b-button
>
<b-button
@click="editor.chain().focus().setImage({ size: 'large' }).run()"
:class="{
'is-active': editor.isActive('custom-image', {
size: 'large',
}),
f_frac: true,
}"
v-b-tooltip.hover
title="가득 채우기"
>1</b-button
>
<b-button
@click="editor.chain().focus().setImage({ size: 'original' }).run()"
:class="{
'is-active': editor.isActive('custom-image', {
size: 'original',
}),
}"
>원본</b-button
>
</b-button-group>
<b-button-group class="mx-1">
<b-button
@click="editor.chain().focus().setImage({ align: 'float-left' }).run()"
:class="{
'is-active': editor.isActive('custom-image', {
float: 'float-left',
}),
}"
v-b-tooltip.hover
title="왼쪽으로 붙이기"
><i class="bi bi-chevron-bar-left"></i
></b-button>
<b-button
@click="editor.chain().focus().setImage({ align: 'left' }).run()"
:class="{
'is-active': editor.isActive('custom-image', {
float: 'left',
}),
}"
v-b-tooltip.hover
title="왼쪽으로"
><i class="bi bi-align-start"></i
></b-button>
<b-button
@click="editor.chain().focus().setImage({ align: 'center' }).run()"
:class="{
'is-active': editor.isActive('custom-image', {
float: 'center',
}),
}"
v-b-tooltip.hover
title="가운데로"
><i class="bi bi-align-center"></i
></b-button>
<b-button
@click="editor.chain().focus().setImage({ align: 'right' }).run()"
:class="{
'is-active': editor.isActive('custom-image', {
float: 'right',
}),
}"
v-b-tooltip.hover
title="오른쪽으로 붙이기"
><i class="bi bi-align-end"></i
></b-button>
<b-button
@click="editor.chain().focus().setImage({ align: 'float-right' }).run()"
:class="{
'is-active': editor.isActive('custom-image', {
float: 'float-right',
}),
}"
v-b-tooltip.hover
title="오른쪽으로 붙이기"
><i class="bi bi-chevron-bar-right"></i
></b-button>
</b-button-group>
</b-button-toolbar>
</bubble-menu>
<editor-content :editor="editor" />
<b-modal
v-model="showImageModal"
title="이미지 추가"
okTitle="추가"
cancelTitle="취소"
@ok="tryAddImage"
@show="resetModal"
@hidden="resetModal"
>
<div class="bg-light text-dark">
<b-form-group
label-cols-sm="4"
label-cols-lg="3"
content-cols-sm
content-cols-lg="7"
description="업로드할 파일을 선택해주세요. (jpg, png, gif, webp)"
label="이미지 업로드"
label-align="right"
:label-for="`${uuid}_image_upload`"
>
<input
class="form-control"
type="file"
:id="`${uuid}_image_upload`"
@change="chooseImage"
accept=".jpg,.jpeg,.png,.gif,.webp"
/>
</b-form-group>
<b-form-group
label-cols-sm="4"
label-cols-lg="3"
content-cols-sm
content-cols-lg="7"
description="링크할 이미지 주소를 입력해주세요."
label="이미지 링크"
label-align="right"
:label-for="`${uuid}_image_link`"
>
<b-form-input v-model="imageLink"></b-form-input>
</b-form-group>
</div>
</b-modal>
</template>
<script lang="ts">
//import "@scss/common/bootstrap5.scss";
import { defineComponent } from "vue";
import { Editor, EditorContent, BubbleMenu } from "@tiptap/vue-3";
import { FontSize } from "@/tiptap-ext/FontSize";
import StarterKit from "@tiptap/starter-kit";
import Underline from "@tiptap/extension-underline";
import TextStyle from "@tiptap/extension-text-style";
import TextAlign from "@tiptap/extension-text-align";
import Color from "@tiptap/extension-color";
//import Image from "@tiptap/extension-image";
import CustomImage from "@/tiptap-ext/CustomImage";
import Link from "@tiptap/extension-link";
import { BackgroundColor } from "@/tiptap-ext/BackgroundColor";
import {
BButtonGroup,
BButtonToolbar,
BButton,
BDropdown,
BDropdownItem,
BDropdownDivider,
BModal,
} from "bootstrap-vue-3";
import { v4 as uuidv4 } from "uuid";
import { unwrap } from "@/util/unwrap";
import { getBase64FromFileObject } from "@/util/getBase64FromFileObject";
import { sammoAPI } from "@/util/sammoAPI";
import { isObject, isString } from "lodash";
import { AxiosError } from "axios";
const compoment = defineComponent({
components: {
EditorContent,
BubbleMenu,
BModal,
BButtonGroup,
BButtonToolbar,
BButton,
BDropdown,
BDropdownItem,
BDropdownDivider,
},
methods: {
chooseImage(e: Event) {
const target = unwrap(e.target) as HTMLInputElement;
this.imageUploadFiles = target.files;
},
colorConvert(val: string | undefined, defaultVal: string) {
if (!val) {
return defaultVal;
}
if (val.startsWith("rgb")) {
const rgb = val.split("(")[1].split(")")[0].split(",");
const vals: string[] = [];
for (const subColor of rgb) {
const hexSubColor = parseInt(subColor).toString(16);
if (hexSubColor.length == 1) {
vals.push("0");
}
vals.push(hexSubColor);
}
return `#${vals.join("")}`;
}
return val;
},
async tryAddImage(bvModalEvt: Event) {
if (this.imageUploadFiles === null || this.imageUploadFiles.length == 0) {
this.addImageLink(bvModalEvt);
return;
}
const targetImage = unwrap(this.imageUploadFiles.item(0));
let imageResult: {
result: true;
path: string;
};
try {
const base64Binary = await getBase64FromFileObject(targetImage);
imageResult = await sammoAPI("Misc/UploadImage", {
imageData: base64Binary,
});
} catch (e) {
if (isString(e)) {
alert(e);
bvModalEvt.preventDefault();
}
if (isObject(e) && "response" in e) {
const axiosErr = e as AxiosError;
if (axiosErr.response?.status === 413) {
alert("허용 용량을 초과했습니다.");
bvModalEvt.preventDefault();
}
}
console.error(e);
return false;
}
const imagePath = imageResult.path;
this.editor.chain().focus().setImage({ src: imagePath }).run();
},
addImageLink(bvModalEvt: Event) {
if (!this.imageLink) {
alert("업로드할 이미지를 선택하거나, 이미지 주소를 입력해주세요.");
bvModalEvt.preventDefault();
return false;
}
this.editor.chain().focus().setImage({ src: this.imageLink }).run();
},
resetModal() {
this.imageLink = "";
this.imageUploadFiles = null;
},
},
props: {
modelValue: {
type: String,
default: "",
},
editable: {
type: Boolean,
default: true,
},
},
data() {
return {
uuid: uuidv4(),
editor: null as unknown as InstanceType<typeof Editor>,
fontList: ["Pretendard", "맑은 고딕", "궁서", "돋움"],
fontSize: [
"8px",
"10px",
"12px",
"14px",
"18px",
"22px",
"28px",
"36px",
"48px",
"72px",
],
imageUploadFiles: null as FileList | null,
imageLink: "",
showImageModal: false,
};
},
watch: {
modelValue(value: string) {
const isSame = this.editor.getHTML() === value;
if (isSame) {
return;
}
this.editor.commands.setContent(value, false);
},
editable(value: boolean) {
this.editor.options.editable = value;
if (value == true) {
this.editor.commands.focus();
}
},
},
mounted() {
const editor = new Editor({
extensions: [
StarterKit,
Underline,
FontSize,
TextStyle,
TextAlign.configure({
types: ["heading", "paragraph"],
}),
Color.configure({
types: ["textStyle"],
}),
BackgroundColor.configure({
types: ["textStyle"],
}),
CustomImage,
Link,
],
editable: this.editable,
content: this.modelValue,
onUpdate: () => {
this.$emit("update:modelValue", this.editor.getHTML());
},
});
this.editor = editor;
},
beforeUnmount() {
this.editor.destroy();
},
});
export default compoment;
</script>
+1 -1
View File
@@ -1,6 +1,6 @@
/* Forked from https://github.com/asiffermann/summernote-image-title */ /* Forked from https://github.com/asiffermann/summernote-image-title */
import $ from 'jquery'; import $ from 'jquery';
import 'summernote/dist/summernote-bs4.js'; import 'summernote/dist/summernote-bs5.js';
$(function ($) { $(function ($) {
$.extend(true, $.summernote.lang, { $.extend(true, $.summernote.lang, {
+70
View File
@@ -0,0 +1,70 @@
import { Extension } from '@tiptap/core'
import '@tiptap/extension-text-style'
export type BackgroundColorOptions = {
types: string[],
}
declare module '@tiptap/core' {
interface Commands<ReturnType> {
backgroundColor: {
/**
* Set the text color
*/
setBackgroundColor: (color: string) => ReturnType,
/**
* Unset the text color
*/
unsetBackgroundColor: () => ReturnType,
}
}
}
export const BackgroundColor = Extension.create<BackgroundColorOptions>({
name: 'backgroundColor',
addOptions() {
return {
types: ['textStyle'],
}
},
addGlobalAttributes() {
return [
{
types: this.options.types,
attributes: {
backgroundColor: {
default: null,
parseHTML: element => element.style.backgroundColor.replace(/['"]+/g, ''),
renderHTML: attributes => {
if (!attributes.backgroundColor) {
return {}
}
return {
style: `background-color: ${attributes.backgroundColor}`,
}
},
},
},
},
]
},
addCommands() {
return {
setBackgroundColor: backgroundColor => ({ chain }) => {
return chain()
.setMark('textStyle', { backgroundColor })
.run()
},
unsetBackgroundColor: () => ({ chain }) => {
return chain()
.setMark('textStyle', { backgroundColor: null })
.removeEmptyTextStyle()
.run()
},
}
},
})
+82
View File
@@ -0,0 +1,82 @@
//https://github.com/joevallender/tiptap2-image-example/blob/main/src/extensions/custom-image-3.js
import Image, { ImageOptions } from '@tiptap/extension-image'
import { mergeAttributes } from '@tiptap/core'
export interface CustomImageOptions extends ImageOptions {
sizes: string[],
}
declare module '@tiptap/core' {
interface Commands<ReturnType> {
setImage: (options: { src: string, alt?: string, title?: string, size: string }) => ReturnType,
}
}
export default Image.extend<CustomImageOptions>({
name: 'custom-image',
addOptions() {
return {
...Image.options,
sizes: ['original', 'small', 'medium', 'large'],
}
},
addAttributes() {
return {
src: {
default: null,
},
alt: {
default: null,
},
title: {
default: null,
},
size: {
default: 'original',
rendered: false
},
align: {
default: 'center',
rendered: false
}
}
},
addCommands() {
return {
// This is unchanged from the original
// Image setImage function
// However, if I extended addComands in
// the same way as addAttributes `this`
// seemed to lose context, so I've just
// copied it in here directly
setImage: (options) => ({ tr, commands }) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
if (tr.selection?.node?.type?.name == 'custom-image') {
return commands.updateAttributes('custom-image', options)
}
else {
return commands.insertContent({
type: this.name,
attrs: options
})
}
},
}
},
renderHTML({ node, HTMLAttributes }) {
// When we render the HTML, grab the
// size and add an appropriate
// corresponding class
HTMLAttributes.class = ' custom-image-' + node.attrs.size;
HTMLAttributes.class += ' custom-image-align-' + node.attrs.align;
return [
'img',
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)
]
}
})
+70
View File
@@ -0,0 +1,70 @@
import { Extension } from '@tiptap/core';
import '@tiptap/extension-text-style';
type FontSizeOptions = {
types: string[],
}
declare module '@tiptap/core' {
interface Commands<ReturnType> {
fontSize: {
/**
* Set the font size attribute
*/
setFontSize: (size: string) => ReturnType,
/**
* Unset the font size attribute
*/
unsetFontSize: () => ReturnType,
}
}
}
export const FontSize = Extension.create<FontSizeOptions>({
name: 'fontSize',
addOptions() {
return {
types: ['textStyle'],
}
},
addGlobalAttributes() {
return [
{
types: this.options.types,
attributes: {
fontSize: {
default: null,
parseHTML: element => element.style.fontSize.replace(/['"]+/g, ''),
renderHTML: attributes => {
if (!attributes.fontSize) {
return {}
}
return {
style: `font-size: ${attributes.fontSize}`,
}
},
},
},
},
]
},
addCommands() {
return {
setFontSize: fontSize => ({ chain }) => {
return chain()
.setMark('textStyle', { fontSize })
.run()
},
unsetFontSize: () => ({ chain }) => {
return chain()
.setMark('textStyle', { fontSize: null })
.removeEmptyTextStyle()
.run()
},
}
},
});
+17
View File
@@ -0,0 +1,17 @@
import { unwrap } from "./unwrap";
//https://stackoverflow.com/questions/36280818/how-to-convert-file-to-base64-in-javascript
export function getBase64FromFileObject(file: File): Promise<string> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => {
let encoded = unwrap(reader.result).toString().replace(/^data:(.*,)?/, '');
if ((encoded.length % 4) > 0) {
encoded += '='.repeat(4 - (encoded.length % 4));
}
resolve(encoded);
};
reader.onerror = error => reject(error);
});
}
+1 -1
View File
@@ -1,7 +1,7 @@
import "@scss/common/bootstrap5.scss"; import "@scss/common/bootstrap5.scss";
import { createApp } from 'vue' import { createApp } from 'vue'
import NPCControl from '@/NPCControl.vue'; import NPCControl from '@/PageNPCControl.vue';
import BootstrapVue3 from 'bootstrap-vue-3' import BootstrapVue3 from 'bootstrap-vue-3'
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest'; import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
+2 -2
View File
@@ -1,5 +1,5 @@
import { createApp } from 'vue' import { createApp } from 'vue'
import Board from '@/Board.vue'; import PageBoard from '@/PageBoard.vue';
import BootstrapVue3 from 'bootstrap-vue-3' import BootstrapVue3 from 'bootstrap-vue-3'
import "@scss/common/bootstrap5.scss"; import "@scss/common/bootstrap5.scss";
import 'bootstrap-vue-3/dist/bootstrap-vue-3.css' import 'bootstrap-vue-3/dist/bootstrap-vue-3.css'
@@ -9,6 +9,6 @@ declare const isSecretBoard: boolean;
setAxiosXMLHttpRequest(); setAxiosXMLHttpRequest();
createApp(Board, { createApp(PageBoard, {
isSecretBoard isSecretBoard
}).use(BootstrapVue3).mount('#app') }).use(BootstrapVue3).mount('#app')
+15 -16
View File
@@ -1,21 +1,21 @@
import $ from 'jquery'; import { createApp } from 'vue'
import 'bootstrap'; import PartialDipcenter from '@/PartialDipcenter.vue';
import 'summernote/dist/summernote-bs4'; import BootstrapVue3 from 'bootstrap-vue-3';
import 'summernote/dist/summernote-bs4.css'; import { htmlReady } from './util/htmlReady';
import '@/summernote-image-flip'; //import { activateFlip } from './legacy/activateFlip';
import '@/summernote-ko-KR'; //import { activateFlip } from "@/legacy/activateFlip";
import { activateFlip } from "@/legacy/activateFlip";
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest'; import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
//import { htmlReady } from './util/htmlReady';
declare const editable: boolean; createApp(PartialDipcenter).use(BootstrapVue3).mount('#editorForm');
setAxiosXMLHttpRequest();
declare const storedData: {
nationMsg: string,
scoutMsg: string,
}
$(function ($) { htmlReady(function(){
setAxiosXMLHttpRequest(); //activateFlip();
})
/*
function guiEditorInit($obj: JQuery<HTMLElement>, editable: boolean) { function guiEditorInit($obj: JQuery<HTMLElement>, editable: boolean) {
const $submitBtn = $obj.find('.submit'); const $submitBtn = $obj.find('.submit');
const $noticeInput = $obj.find('.input_form'); const $noticeInput = $obj.find('.input_form');
@@ -145,5 +145,4 @@ $(function ($) {
guiEditorInit($('#noticeForm'), editable); guiEditorInit($('#noticeForm'), editable);
guiEditorInit($('#scoutMsgForm'), editable); guiEditorInit($('#scoutMsgForm'), editable);
activateFlip(); activateFlip();
*/
})
+2 -2
View File
@@ -1,7 +1,7 @@
import "@scss/common/bootstrap5.scss"; import "@scss/common/bootstrap5.scss";
import { createApp } from 'vue' import { createApp } from 'vue'
import InheritPoint from '@/inheritPoint.vue'; import PageInheritPoint from '@/PageInheritPoint.vue';
import BootstrapVue3 from 'bootstrap-vue-3' import BootstrapVue3 from 'bootstrap-vue-3'
createApp(InheritPoint).use(BootstrapVue3).mount('#app'); createApp(PageInheritPoint).use(BootstrapVue3).mount('#app');
+3 -3
View File
@@ -1,7 +1,7 @@
import { createApp } from 'vue' import { createApp } from 'vue'
import Join from '@/Join.vue'; import PageJoin from '@/PageJoin.vue';
import BootstrapVue3 from 'bootstrap-vue-3' import BootstrapVue3 from 'bootstrap-vue-3'
import "@scss/common/bootstrap5.scss"; import "@scss/common/bootstrap5.scss";
import 'bootstrap-vue-3/dist/bootstrap-vue-3.css' import "@scss/editor_component.scss";
createApp(Join).use(BootstrapVue3).mount('#app') createApp(PageJoin).use(BootstrapVue3).mount('#app')
+3 -2
View File
@@ -1,11 +1,12 @@
import '@scss/main.scss'; import '@scss/main.scss';
import "@scss/common_legacy.scss";
exportWindow(scrollHardTo, 'scrollHardTo'); exportWindow(scrollHardTo, 'scrollHardTo');
import { exportWindow } from '@util/exportWindow'; import { exportWindow } from '@util/exportWindow';
import { scrollHardTo } from '@util/scrollHardTo'; import { scrollHardTo } from '@util/scrollHardTo';
import { createApp } from 'vue' import { createApp } from 'vue'
import ReservedCommand from '@/ReservedCommand.vue'; import PartialReservedCommand from '@/PartialReservedCommand.vue';
import BootstrapVue3 from 'bootstrap-vue-3' import BootstrapVue3 from 'bootstrap-vue-3'
import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest'; import { setAxiosXMLHttpRequest } from '@util/setAxiosXMLHttpRequest';
import Multiselect from 'vue-multiselect'; import Multiselect from 'vue-multiselect';
@@ -15,6 +16,6 @@ import { auto500px } from './util/auto500px';
setAxiosXMLHttpRequest(); setAxiosXMLHttpRequest();
createApp(ReservedCommand).use(BootstrapVue3).component('v-multiselect', Multiselect).mount('#reservedCommandList'); createApp(PartialReservedCommand).use(BootstrapVue3).component('v-multiselect', Multiselect).mount('#reservedCommandList');
auto500px(); auto500px();
+1 -6
View File
@@ -110,13 +110,8 @@ $lastSetters = [
'defaultStatNPCMax' => GameConst::$defaultStatNPCMax, 'defaultStatNPCMax' => GameConst::$defaultStatNPCMax,
'defaultStatMax' => GameConst::$defaultStatMax, 'defaultStatMax' => GameConst::$defaultStatMax,
]) ?> ]) ?>
<?= WebUtil::printCSS('dist_css/vendors_vue.css') ?>
<?= WebUtil::printCSS('dist_css/common_vue.css') ?>
<?= WebUtil::printCSS('dist_css/v_NPCControl.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?> <?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?> <?= WebUtil::printDist('vue', ['v_NPCControl'], true) ?>
<?= WebUtil::printJS('dist_js/common_vue.js', true) ?>
<?= WebUtil::printJS('dist_js/v_NPCControl.js', true) ?>
</head> </head>
<body> <body>
+1 -5
View File
@@ -44,15 +44,11 @@ $boardName = $isSecretBoard ? '기밀실' : '회의실';
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=1024" /> <meta name="viewport" content="width=1024" />
<?= WebUtil::printCSS('dist_css/common_vue.css') ?>
<?= WebUtil::printCSS('dist_css/v_board.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?> <?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?>
<?= WebUtil::printJS('dist_js/common_vue.js', true) ?>
<?= WebUtil::printJS('dist_js/v_board.js', true) ?>
<?= WebUtil::printStaticValues([ <?= WebUtil::printStaticValues([
'isSecretBoard' => $isSecretBoard, 'isSecretBoard' => $isSecretBoard,
]) ?> ]) ?>
<?= WebUtil::printDist('vue', 'v_board', true) ?>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
+1 -5
View File
@@ -75,12 +75,8 @@ $lastInheritPointLogs = $db->query('SELECT server_id, year, month, date, text FR
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<?= WebUtil::printCSS('dist_css/common_vue.css') ?>
<?= WebUtil::printCSS('dist_css/v_inheritPoint.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?> <?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?> <?= WebUtil::printDist('vue', 'v_inheritPoint', true) ?>
<?= WebUtil::printJS('dist_js/common_vue.js', true) ?>
<?= WebUtil::printJS('dist_js/v_inheritPoint.js', true) ?>
<?= WebUtil::printStaticValues([ <?= WebUtil::printStaticValues([
'items' => $items, 'items' => $items,
'currentInheritBuff' => $currentInheritBuff, 'currentInheritBuff' => $currentInheritBuff,
+2 -5
View File
@@ -81,12 +81,9 @@ foreach(CityConst::all() as $city){
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<?= WebUtil::printCSS('dist_css/common_vue.css') ?>
<?= WebUtil::printCSS('dist_css/v_join.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?> <?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
<?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?> <?= WebUtil::printDist('vue', 'v_join', true) ?>
<?= WebUtil::printJS('dist_js/common_vue.js', true) ?>
<?= WebUtil::printJS('dist_js/v_join.js', true) ?>
<?= WebUtil::printStaticValues([ <?= WebUtil::printStaticValues([
'serverID' => UniqueConst::$serverID, 'serverID' => UniqueConst::$serverID,
'nationList' => array_values($nationList), 'nationList' => array_values($nationList),
+2 -5
View File
@@ -15,14 +15,11 @@ require(__DIR__ . '/../vendor/autoload.php');
<!-- 스타일 --> <!-- 스타일 -->
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('../dist_css/vendor.css') ?>
<?= WebUtil::printCSS('../dist_css/common_ts.css') ?>
<?= WebUtil::printCSS('../css/admin_member.css') ?> <?= WebUtil::printCSS('../css/admin_member.css') ?>
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('../dist_js/vendors.js') ?> <?= WebUtil::printDist('gateway', 'admin_member', true) ?>
<?= WebUtil::printJS('../dist_js/common_ts.js') ?>
<?= WebUtil::printJS('../dist_js/admin_member.js') ?>
</head> </head>
<body> <body>
+4 -9
View File
@@ -26,21 +26,16 @@ $acl = $session->acl;
<!-- 스타일 --> <!-- 스타일 -->
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('../dist_css/vendor.css') ?>
<?= WebUtil::printCSS('../dist_css/common_ts.css') ?>
<?= WebUtil::printCSS('../css/config.css') ?>
<?= WebUtil::printCSS('../css/entrance.css') ?>
<?= WebUtil::printCSS('../css/admin_server.css') ?>
<!-- 액션 --> <!-- 액션 -->
<script> <script>
var isAdmin = <?= ($userGrade >= 5 || $acl) ? 'true' : 'false' ?>; var isAdmin = <?= ($userGrade >= 5 || $acl) ? 'true' : 'false' ?>;
</script> </script>
<?= WebUtil::printJS('../d_shared/common_path.js', true) ?> <?= WebUtil::printJS('../d_shared/common_path.js', true) ?>
<?= WebUtil::printJS('../dist_js/vendors.js', true) ?> <?= WebUtil::printDist('gateway', 'entrance', true) ?>
<?= WebUtil::printJS('../dist_js/common_ts.js', true) ?> <?= WebUtil::printCSS('../css/config.css') ?>
<?= WebUtil::printJS('../dist_js/entrance.js', true) ?> <?= WebUtil::printCSS('../css/entrance.css') ?>
<?= WebUtil::printCSS('../css/admin_server.css') ?>
</head> </head>
<body> <body>
+2 -5
View File
@@ -15,16 +15,13 @@ require(__DIR__ . '/../vendor/autoload.php');
<!-- 스타일 --> <!-- 스타일 -->
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('../dist_css/vendor.css') ?>
<?= WebUtil::printCSS('../dist_css/common_ts.css') ?>
<?= WebUtil::printCSS('../css/config.css') ?> <?= WebUtil::printCSS('../css/config.css') ?>
<?= WebUtil::printCSS('../css/user_info.css') ?> <?= WebUtil::printCSS('../css/user_info.css') ?>
<!-- 액션 --> <!-- 액션 -->
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('../dist_js/vendors.js') ?> <?= WebUtil::printDist('gateway', 'user_info', true) ?>
<?= WebUtil::printJS('../dist_js/common_ts.js') ?>
<?= WebUtil::printJS('../dist_js/user_info.js') ?>
</head> </head>
<body> <body>
+1 -7
View File
@@ -52,14 +52,8 @@ foreach (ServConfig::getServerList() as $setting) {
var kakao_oauth_redirect_uri = '<?= KakaoKey::REDIRECT_URI ?>'; var kakao_oauth_redirect_uri = '<?= KakaoKey::REDIRECT_URI ?>';
</script> </script>
<?= WebUtil::printJS('d_shared/common_path.js') ?> <?= WebUtil::printJS('d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/login.js') ?>
<?= WebUtil::printCSS('d_shared/common.css') ?> <?= WebUtil::printCSS('d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/vendor.css') ?> <?= WebUtil::printDist('gateway', 'login') ?>
<?= WebUtil::printCSS('dist_css/common_ts.css') ?>
<?= WebUtil::printCSS('dist_css/login.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
<meta name="description" content="실시간으로 진행되는 삼국지 웹게임(삼모전)입니다"> <meta name="description" content="실시간으로 진행되는 삼국지 웹게임(삼모전)입니다">
<meta name="keywords" content="삼국지,삼모전,웹게임,힏체,힏체섭,히데체,히데체섭,HiDCHe,체섭"> <meta name="keywords" content="삼국지,삼모전,웹게임,힏체,힏체섭,히데체,히데체섭,HiDCHe,체섭">
+19 -7
View File
@@ -140,7 +140,7 @@ if (!$v->validate()) {
$target = Util::getPost('target'); $target = Util::getPost('target');
$server = basename($request['server']); $server = basename($request['server']);
$settingBasePath = __DIR__ . "/{$server}/d_setting/";
$allowFullUpdate = in_array('fullUpdate', $session->acl[$server] ?? []); $allowFullUpdate = in_array('fullUpdate', $session->acl[$server] ?? []);
$allowFullUpdate |= $session->userGrade >= 6; $allowFullUpdate |= $session->userGrade >= 6;
@@ -244,20 +244,28 @@ if ($server == $baseServerName) {
$version = getVersion(); $version = getVersion();
$gitHash = getHash(); $gitHash = getHash();
if ( if (
hash_file("sha256", __DIR__ . '/' . $server . '/d_setting/VersionGit.dynamic.orig.php') == hash_file("sha256", $settingBasePath . 'VersionGit.dynamic.orig.php') ==
hash_file("sha256", __DIR__ . '/' . $server . '/d_setting/VersionGit.php') hash_file("sha256", $settingBasePath . 'VersionGit.php')
) { ) {
if (file_exists($settingBasePath . 'VersionGit.json')) {
unlink($settingBasePath . 'VersionGit.json');
}
$result = true; $result = true;
} else { } else {
$result = Util::generateFileUsingSimpleTemplate( $result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/' . $server . '/d_setting/VersionGit.orig.php', $settingBasePath . 'VersionGit.orig.php',
__DIR__ . '/' . $server . '/d_setting/VersionGit.php', $settingBasePath . 'VersionGit.php',
[ [
'verionGit' => $version, 'verionGit' => $version,
'hash' => $gitHash 'hash' => $gitHash
], ],
true true
); );
file_put_contents($settingBasePath . 'VersionGit.json', Json::encode([
'versionGit' => $version,
'hash' => $gitHash,
]));
} }
//git 업데이트했는데, package.json이 바뀌면 곤란하니까 //git 업데이트했는데, package.json이 바뀌면 곤란하니까
@@ -333,14 +341,18 @@ $zip->close();
$version = getVersion($target); $version = getVersion($target);
$gitHash = getHash($target); $gitHash = getHash($target);
$result = Util::generateFileUsingSimpleTemplate( $result = Util::generateFileUsingSimpleTemplate(
__DIR__ . '/' . $server . '/d_setting/VersionGit.orig.php', $settingBasePath . 'VersionGit.orig.php',
__DIR__ . '/' . $server . '/d_setting/VersionGit.php', $settingBasePath . 'VersionGit.php',
[ [
'verionGit' => $version, 'verionGit' => $version,
'hash' => $gitHash 'hash' => $gitHash
], ],
true true
); );
file_put_contents($settingBasePath . 'VersionGit.json', Json::encode([
'versionGit' => $version,
'hash' => $gitHash,
]));
genJS($server); genJS($server);
$storage->$server = [$target, $version]; $storage->$server = [$target, $version];
+1 -5
View File
@@ -30,12 +30,8 @@ if ($canJoin != 'Y') {
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>회원가입</title> <title>회원가입</title>
<?= WebUtil::printJS('../dist_js/vendors.js') ?>
<?= WebUtil::printJS('../dist_js/common_ts.js') ?>
<?= WebUtil::printJS('../dist_js/join.js') ?>
<?= WebUtil::printCSS('../dist_css/vendor.css') ?>
<?= WebUtil::printCSS('../dist_css/common_ts.css') ?>
<?= WebUtil::printCSS('../css/login.css') ?> <?= WebUtil::printCSS('../css/login.css') ?>
<?= WebUtil::printDist('gateway', ['join']) ?>
</head> </head>
<body> <body>
+19 -6
View File
@@ -19,15 +19,27 @@
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@popperjs/core": "^2.11.0",
"@tiptap/extension-color": "^2.0.0-beta.9",
"@tiptap/extension-image": "^2.0.0-beta.24",
"@tiptap/extension-link": "^2.0.0-beta.33",
"@tiptap/extension-text-align": "^2.0.0-beta.29",
"@tiptap/extension-text-style": "^2.0.0-beta.23",
"@tiptap/extension-underline": "^2.0.0-beta.22",
"@tiptap/starter-kit": "^2.0.0-beta.156",
"@tiptap/vue-3": "^2.0.0-beta.83",
"@types/bootstrap": "^5.1.6", "@types/bootstrap": "^5.1.6",
"@types/downloadjs": "^1.4.2", "@types/downloadjs": "^1.4.2",
"@types/linkifyjs": "^2.1.4", "@types/linkifyjs": "^2.1.4",
"@types/quill": "^2.0.9",
"@types/select2": "^4.0.54", "@types/select2": "^4.0.54",
"@types/summernote": "^0.8.6", "@types/uuid": "^8.3.3",
"@vueup/vue-quill": "^1.0.0-beta.7",
"async-validator": "^4.0.7", "async-validator": "^4.0.7",
"axios": "^0.24.0", "axios": "^0.24.0",
"bootstrap": "^5.1.3", "bootstrap": "^5.1.3",
"bootstrap-vue-3": "^0.1.0", "bootstrap-vue-3": "^0.1.0",
"buffer": "^6.0.3",
"core-js": "^3.19.3", "core-js": "^3.19.3",
"date-fns": "^2.27.0", "date-fns": "^2.27.0",
"downloadjs": "^1.4.7", "downloadjs": "^1.4.7",
@@ -38,7 +50,7 @@
"lodash": "^4.17.21", "lodash": "^4.17.21",
"query-string": "^7.0.1", "query-string": "^7.0.1",
"select2": "^4.0", "select2": "^4.0",
"summernote": "^0.8.20", "uuid": "^8.3.2",
"vue": "^3.2.2", "vue": "^3.2.2",
"vue-multiselect": "^3.0.0-alpha.2", "vue-multiselect": "^3.0.0-alpha.2",
"vue-types": "^4.1.1", "vue-types": "^4.1.1",
@@ -55,22 +67,23 @@
"@types/node": "^16.11.12", "@types/node": "^16.11.12",
"@typescript-eslint/eslint-plugin": "^5.6.0", "@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0", "@typescript-eslint/parser": "^5.6.0",
"@vue/compiler-sfc": "^3.2.24", "@vue/compiler-sfc": "^3.2.26",
"@vue/eslint-config-typescript": "^9.1.0", "@vue/eslint-config-typescript": "^9.1.0",
"babel-plugin-lodash": "^3.3.4", "babel-plugin-lodash": "^3.3.4",
"babel-preset-modern-browsers": "^15.0.2", "babel-preset-modern-browsers": "^15.0.2",
"bootswatch": "^5.1.3", "bootswatch": "^5.1.3",
"clean-terminal-webpack-plugin": "^3.0.0", "clean-terminal-webpack-plugin": "^3.0.0",
"css-loader": "^6.5.1", "css-loader": "^6.5.1",
"esbuild-loader": "^2.16.0", "esbuild-loader": "^2.17.0",
"eslint": "^8.4.1", "eslint": "^8.4.1",
"eslint-plugin-vue": "^8.2.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"mini-css-extract-plugin": "^2.4.5", "mini-css-extract-plugin": "^2.4.5",
"pre-commit": "^1.2.2", "pre-commit": "^1.2.2",
"sass": "^1.44.0", "sass": "^1.45.0",
"sass-loader": "^12.4.0", "sass-loader": "^12.4.0",
"style-loader": "^3.3.1", "style-loader": "^3.3.1",
"typescript": "^4.5.2", "typescript": "^4.5.3",
"url-loader": "^4.1.1", "url-loader": "^4.1.1",
"vue-eslint-parser": "^8.0.1", "vue-eslint-parser": "^8.0.1",
"vue-loader": "^16.5.0", "vue-loader": "^16.5.0",
+3 -2
View File
@@ -57,8 +57,9 @@ $err_logs = $fdb->select('err_log', [
<!-- 스타일 --> <!-- 스타일 -->
<?= WebUtil::printCSS('d_shared/common.css') ?> <?= WebUtil::printCSS('d_shared/common.css') ?>
<?= WebUtil::printCSS('dist_css/vendor.css') ?> <?= WebUtil::printCSS('dist_js/gateway/vendor.css') ?>
<?= WebUtil::printCSS('dist_css/common_ts.css') ?> <?= WebUtil::printCSS('dist_js/gateway/common_ts.css') ?>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" /> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />
</head> </head>
+45 -4
View File
@@ -139,6 +139,48 @@ class WebUtil
return static::preloadAsset($path, 'script'); return static::preloadAsset($path, 'script');
} }
public static function printDist(string $type, string|array $entryName, bool $isDefer = false)
{
if (is_string($entryName)) {
$entryName = [$entryName];
}
$serverBasePath = \phpUri::parse(ServConfig::$serverWebPath)->path;
if ($type == 'gateway') {
$serverBasePath .= "/dist_js/{$type}";
$basePath = dirname(__DIR__, 2) . "/dist_js/{$type}";
} else {
if (!class_exists('\\sammo\\VersionGit') || is_subclass_of('\\sammo\\VersionGit', '\\sammo\\VersionGitDynamic')) {
$version = DB::prefix() . '_dynamic';
} else {
$version = VersionGit::getVersion();
}
$serverBasePath .= "/dist_js/{$version}/{$type}";
$basePath = dirname(__DIR__, 2) . "/dist_js/{$version}/{$type}";
}
$outputs = ["\n"];
foreach (["vendors", "common_ts", ...$entryName] as $moduleName) {
foreach (['js', 'css'] as $ext) {
$checkPath = $basePath . "/{$moduleName}.{$ext}";
if (!file_exists($checkPath)) {
$outputs[] = "<!-- '{$type}/{$moduleName}.{$ext}' -->\n";
continue;
}
$mtime = filemtime($checkPath);
if ($ext == 'css') {
$outputs[] = "<link href='{$serverBasePath}/{$moduleName}.{$ext}?{$mtime}' rel='stylesheet' type='text/css' />\n";
} else if ($ext == 'js') {
$typeText = $isDefer ? 'defer' : '';
$outputs[] = "<script src='{$serverBasePath}/{$moduleName}.{$ext}?{$mtime}' {$typeText}></script>\n";
}
}
}
return join("", $outputs);
}
public static function printJS(string $path, bool $isDefer = false) public static function printJS(string $path, bool $isDefer = false)
{ {
//async 옵션 고려? //async 옵션 고려?
@@ -214,13 +256,12 @@ class WebUtil
return $purifier->purify($text); return $purifier->purify($text);
} }
public static function errorBackMsg(string $msg, ?string $target=null): string public static function errorBackMsg(string $msg, ?string $target = null): string
{ {
$jmsg = Json::encode($msg); $jmsg = Json::encode($msg);
if(!$target){ if (!$target) {
$moveNext = 'history.go(-1);'; $moveNext = 'history.go(-1);';
} } else {
else{
$moveNext = "location.replace('{$target}');"; $moveNext = "location.replace('{$target}');";
} }
+109 -138
View File
@@ -6,12 +6,47 @@ const { resolve } = require('path');
const CleanTerminalPlugin = require('clean-terminal-webpack-plugin'); const CleanTerminalPlugin = require('clean-terminal-webpack-plugin');
const { ESBuildMinifyPlugin } = require('esbuild-loader') const { ESBuildMinifyPlugin } = require('esbuild-loader')
const webpack = require('webpack'); const webpack = require('webpack');
const fs = require('fs');
module.exports = (env, argv) => { module.exports = (env, argv) => {
const target = env.target ?? 'hwe'; const target = env.target ?? 'hwe';
const mode = argv.mode ?? 'production'; const mode = argv.mode ?? 'production';
const tsDir = resolve(__dirname, `${target}/ts/`); const tsDir = resolve(__dirname, `${target}/ts/`);
const build_exports = require(`${tsDir}/build_exports.json`); const build_exports = require(`${tsDir}/build_exports.json`);
const versionGitPath = resolve(__dirname, target, 'd_setting', 'VersionGit.json');
const versionValue = (() => {
if (!fs.existsSync(versionGitPath)) {
return undefined;
}
const versionInfo = JSON.parse(fs.readFileSync(versionGitPath, 'utf-8'));
return versionInfo.versionGit;
})()
const versionTarget = versionValue ?? `${target}_dynamic`;
const outputPath = resolve(__dirname, 'dist_js', versionTarget);
fs.mkdirSync(outputPath, {
recursive: true
});
const genBuildHook = function (oTarget) {
const checkFilePath = resolve(outputPath, `build_${oTarget}.txt`);
let emitDone = false;
let writeDone = false;
return function (percentage, msg, ...args) {
if (msg == 'emitting') {
emitDone = true;
}
if (percentage == 0) {
if (fs.existsSync(checkFilePath)) {
fs.unlinkSync(checkFilePath);
}
} else if (percentage == 1 && emitDone && !writeDone) {
fs.writeFileSync(checkFilePath, new Date().toISOString(), 'utf-8');
writeDone = true;
}
};
};
//TODO: esbuild에 browserslist 사용 가능하면 적용 //TODO: esbuild에 browserslist 사용 가능하면 적용
//서버마다 ts 파일 구성이 다를 가능성이 높기 때문에 어떤 파일이 필요한지는 ts/build_exports.json을 확인한다. //서버마다 ts 파일 구성이 다를 가능성이 높기 때문에 어떤 파일이 필요한지는 ts/build_exports.json을 확인한다.
@@ -24,8 +59,35 @@ module.exports = (env, argv) => {
entryIngame[entry] = `${tsDir}/${filePath}`; entryIngame[entry] = `${tsDir}/${filePath}`;
} }
const optimization = {
splitChunks: {
cacheGroups: {
commons: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
priority: -10,
chunks: 'all',
reuseExistingChunk: true,
},
default: {
name: 'common_ts',
minChunks: 2,
priority: -20,
chunks: 'all',
reuseExistingChunk: true,
},
},
},
minimizer: [
new ESBuildMinifyPlugin({
css: true
}),
],
moduleIds: 'deterministic',
};
const ingame_vue = { const ingame_vue = {
name: `ingame_${target}_vue`, name: `ingame_${versionTarget}_vue`,
resolve: { resolve: {
extensions: [".ts", ".tsx", ".vue", ".js"], extensions: [".ts", ".tsx", ".vue", ".js"],
alias: { alias: {
@@ -33,41 +95,16 @@ module.exports = (env, argv) => {
'@': tsDir, '@': tsDir,
'@scss': path.resolve(tsDir, '../scss'), '@scss': path.resolve(tsDir, '../scss'),
'@util': path.resolve(tsDir, 'util'), '@util': path.resolve(tsDir, 'util'),
} },
}, },
mode, mode,
entry: entryIngameVue, entry: entryIngameVue,
output: { output: {
filename: '[name].js', filename: '[name].js',
path: resolve(__dirname, `${target}/dist_js`) path: resolve(outputPath, 'vue')
}, },
devtool: 'source-map', devtool: 'source-map',
optimization: { optimization,
splitChunks: {
cacheGroups: {
commons: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors_vue',
priority: -10,
chunks: 'all',
reuseExistingChunk: true,
},
default: {
name: 'common_vue',
minChunks: 2,
priority: -20,
chunks: 'all',
reuseExistingChunk: true,
},
},
},
minimizer: [
new ESBuildMinifyPlugin({
css: true
}),
],
moduleIds: 'deterministic',
},
module: { module: {
rules: [ rules: [
//FROM `vue inspect` and some tweaks //FROM `vue inspect` and some tweaks
@@ -79,7 +116,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
loader: 'ts', loader: 'ts',
target: 'es2019', target: 'es2021',
} }
} }
] ]
@@ -92,7 +129,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
loader: 'tsx', loader: 'tsx',
target: 'es2019', target: 'es2021',
} }
} }
] ]
@@ -105,7 +142,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
loader: 'js', loader: 'js',
target: 'es2019', target: 'es2021',
} }
} }
] ]
@@ -128,55 +165,30 @@ module.exports = (env, argv) => {
}, },
{ {
test: /\.(png|jpe?g|gif|webp)$/, test: /\.(png|jpe?g|gif|webp)$/,
use: [ use: ['file-loader']
{
loader: 'file-loader',
options: {
name: '../dist_misc/[name].[contenthash:8].[ext]'
}
}
]
}, },
{ {
test: /\.(svg)$/, test: /\.(svg)$/,
use: [ use: ['file-loader']
{
loader: 'file-loader',
options: {
name: '../dist_misc/[name].[contenthash:8].[ext]'
}
}
]
}, },
{ {
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/, test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)$/,
use: [ use: ['file-loader']
{
loader: 'file-loader',
options: {
name: '../dist_misc/[name].[contenthash:8].[ext]'
}
}
]
}, },
{ {
test: /\.(woff2?|eot|ttf|otf)$/i, test: /\.(woff2?|eot|ttf|otf)$/i,
use: [ use: ['file-loader']
{
loader: 'file-loader',
options: {
name: '../dist_misc/[name].[contenthash:8].[ext]'
}
}
]
}, },
] ]
}, },
plugins: [ plugins: [
new CleanTerminalPlugin(), new CleanTerminalPlugin(),
new VueLoaderPlugin(), new VueLoaderPlugin(),
new MiniCssExtractPlugin({ new MiniCssExtractPlugin(),
filename: '../dist_css/[name].css' new webpack.ProgressPlugin({
percentBy: 'modules',
dependencies: false,
handler: genBuildHook('vue')
}), }),
//new BundleAnalyzerPlugin() //new BundleAnalyzerPlugin()
], ],
@@ -185,7 +197,7 @@ module.exports = (env, argv) => {
}, },
}; };
const ingame = { const ingame = {
name: `ingame_${target}`, name: `ingame_${versionTarget}`,
resolve: { resolve: {
extensions: [".js", ".ts", ".tsx"], extensions: [".js", ".ts", ".tsx"],
alias: { alias: {
@@ -198,33 +210,10 @@ module.exports = (env, argv) => {
entry: entryIngame, entry: entryIngame,
output: { output: {
filename: '[name].js', filename: '[name].js',
path: resolve(__dirname, `${target}/dist_js`) path: resolve(outputPath, 'ts')
}, },
devtool: 'source-map', devtool: 'source-map',
optimization: { optimization,
splitChunks: {
cacheGroups: {
commons: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
},
default: {
name: 'common_ts',
minChunks: 2,
priority: -20,
chunks: 'all',
reuseExistingChunk: true,
},
},
},
minimizer: [
new ESBuildMinifyPlugin({
css: true
}),
],
moduleIds: 'deterministic',
},
module: { module: {
rules: [{ rules: [{
test: /\.ts$/, test: /\.ts$/,
@@ -234,7 +223,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
loader: 'ts', loader: 'ts',
target: 'es2019', target: 'es2021',
} }
} }
] ]
@@ -247,7 +236,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
loader: 'tsx', loader: 'tsx',
target: 'es2019', target: 'es2021',
} }
} }
] ]
@@ -260,7 +249,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
loader: 'js', loader: 'js',
target: 'es2019', target: 'es2021',
} }
} }
] ]
@@ -272,22 +261,16 @@ module.exports = (env, argv) => {
}, },
plugins: [ plugins: [
new CleanTerminalPlugin(), new CleanTerminalPlugin(),
new MiniCssExtractPlugin({ new MiniCssExtractPlugin(),
filename: '../dist_css/[name].css' new webpack.ProgressPlugin(genBuildHook('ts')),
}),
//new BundleAnalyzerPlugin() //new BundleAnalyzerPlugin()
], ],
cache: { cache: {
type: 'filesystem', type: 'filesystem',
}, },
externals: {
// require("jquery") is external and available
// on the global var jQuery
"jQuery": "jquery"
}
}; };
const gateway = { const gateway = {
name: 'gateway', name: `gateway`,
resolve: { resolve: {
extensions: [".js", ".ts", ".tsx"], extensions: [".js", ".ts", ".tsx"],
alias: { alias: {
@@ -307,33 +290,10 @@ module.exports = (env, argv) => {
}, },
output: { output: {
filename: '[name].js', filename: '[name].js',
path: path.resolve(__dirname, 'dist_js'), path: resolve(__dirname, 'dist_js', 'gateway')
}, },
devtool: 'source-map', devtool: 'source-map',
optimization: { optimization,
splitChunks: {
cacheGroups: {
commons: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
},
default: {
name: 'common_ts',
minChunks: 2,
priority: -20,
chunks: 'all',
reuseExistingChunk: true,
},
},
},
minimizer: [
new ESBuildMinifyPlugin({
css: true
}),
],
moduleIds: 'deterministic',
},
module: { module: {
rules: [{ rules: [{
test: /\.ts$/, test: /\.ts$/,
@@ -343,7 +303,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
loader: 'ts', loader: 'ts',
target: 'es2019', target: 'es2021',
} }
} }
] ]
@@ -356,7 +316,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
loader: 'tsx', loader: 'tsx',
target: 'es2019', target: 'es2021',
} }
} }
] ]
@@ -369,7 +329,7 @@ module.exports = (env, argv) => {
loader: 'esbuild-loader', loader: 'esbuild-loader',
options: { options: {
loader: 'js', loader: 'js',
target: 'es2019', target: 'es2021',
} }
} }
] ]
@@ -379,9 +339,8 @@ module.exports = (env, argv) => {
}] }]
}, },
plugins: [ plugins: [
new MiniCssExtractPlugin({ new MiniCssExtractPlugin(),
filename: '../dist_css/[name].css' new webpack.ProgressPlugin(genBuildHook('gateway')),
}),
//new BundleAnalyzerPlugin() //new BundleAnalyzerPlugin()
], ],
cache: { cache: {
@@ -389,10 +348,22 @@ module.exports = (env, argv) => {
}, },
}; };
if (target == 'hwe') { if (env.WEBPACK_WATCH || !versionValue) {
return [gateway, ingame_vue, ingame]; return [gateway, ingame_vue, ingame];
} }
else {
return [ingame_vue, ingame]; const buildConfList = [];
if (target == 'hwe' && !fs.existsSync(resolve(outputPath, `build_gateway.txt`))) {
buildConfList.push(gateway);
} }
if (!fs.existsSync(resolve(outputPath, `build_vue.txt`))) {
buildConfList.push(ingame_vue);
}
if (!fs.existsSync(resolve(outputPath, `build_ts.txt`))) {
buildConfList.push(ingame);
}
return buildConfList;
} }