refactor: common_ts 분리 후 일괄 로드

This commit is contained in:
2021-12-11 00:07:59 +09:00
parent 3c23e0fb93
commit 8464f96e40
42 changed files with 6515 additions and 5727 deletions
+1
View File
@@ -13,6 +13,7 @@ require(__DIR__.'/../vendor/autoload.php');
<title>설치</title> <title>설치</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/vendors.js') ?>
<?=WebUtil::printJS('dist_js/common_ts.js') ?>
<?=WebUtil::printJS('../dist_js/install.js')?> <?=WebUtil::printJS('../dist_js/install.js')?>
<?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?> <?=WebUtil::printCSS('../e_lib/bootstrap.min.css')?>
<?=WebUtil::printCSS('../css/install.css')?> <?=WebUtil::printCSS('../css/install.css')?>
+94 -46
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -31,19 +32,24 @@ $templates = new \League\Plates\Engine(__DIR__.'/templates');
<?= 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::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?> <?= WebUtil::printJS('dist_js/common.js') ?>
</head> </head>
<body> <body>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<tr><td>명 장 일 람<br><?=closeButton()?></td></tr> <tr>
<td>명 장 일 람<br><?= closeButton() ?></td>
</tr>
</table> </table>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<form name=form1 action=a_bestGeneral.php method=post> <form name=form1 action=a_bestGeneral.php method=post>
<tr><td align=center> <tr>
<td align=center>
<input type=submit name=btn value='유저 보기'> <input type=submit name=btn value='유저 보기'>
<input type=submit name=btn value='NPC 보기'> <input type=submit name=btn value='NPC 보기'>
</td></tr> </td>
</tr>
</form> </form>
</table> </table>
<div style="margin:auto;width:1100px;"> <div style="margin:auto;width:1100px;">
@@ -64,8 +70,14 @@ foreach (getAllNationStaticInfo() as $nation) {
} }
$types = [ $types = [
["명 성", "int", function($v){$v['value'] = $v['experience']; return $v; }], ["명 성", "int", function ($v) {
["계 급", "int", function($v){$v['value'] = $v['dedication']; return $v; }], $v['value'] = $v['experience'];
return $v;
}],
["계 급", "int", function ($v) {
$v['value'] = $v['dedication'];
return $v;
}],
["계 략 성 공", "int", function ($v) use ($gameStor) { ["계 략 성 공", "int", function ($v) use ($gameStor) {
$v['value'] = $v['firenum']; $v['value'] = $v['firenum'];
if ($gameStor->isunited) { if ($gameStor->isunited) {
@@ -79,49 +91,75 @@ $types = [
$v['fgColor'] = newColor($v['bgColor']); $v['fgColor'] = newColor($v['bgColor']);
return $v; return $v;
}], }],
["전 투 횟 수", "int", function($v){$v['value'] = $v['warnum']; return $v; }], ["전 투 횟 수", "int", function ($v) {
["승 리", "int", function($v){$v['value'] = $v['killnum']; return $v; }], $v['value'] = $v['warnum'];
return $v;
}],
["승 리", "int", function ($v) {
$v['value'] = $v['killnum'];
return $v;
}],
["승 률", "percent", function ($v) { ["승 률", "percent", function ($v) {
if ($v['warnum'] < 10) { if ($v['warnum'] < 10) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['killnum'] / max(1, $v['warnum']); $v['value'] = $v['killnum'] / max(1, $v['warnum']);
} }
return $v; return $v;
}], }],
["점 령", "int", function($v){$v['value'] = $v['occupied']; return $v; }], ["점 령", "int", function ($v) {
["사 살", "int", function($v){$v['value'] = $v['killcrew']; return $v; }], $v['value'] = $v['occupied'];
return $v;
}],
["사 살", "int", function ($v) {
$v['value'] = $v['killcrew'];
return $v;
}],
["살 상 률", "percent", function ($v) { ["살 상 률", "percent", function ($v) {
if ($v['warnum'] < 10) { if ($v['warnum'] < 10) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['killcrew'] / max(1, $v['deathcrew']); $v['value'] = $v['killcrew'] / max(1, $v['deathcrew']);
} }
return $v; return $v;
}], }],
["대 인 사 살", "int", function($v){$v['value'] = $v['killcrew_person']; return $v; }], ["대 인 사 살", "int", function ($v) {
$v['value'] = $v['killcrew_person'];
return $v;
}],
["대 인 살 상 률", "percent", function ($v) { ["대 인 살 상 률", "percent", function ($v) {
if ($v['warnum'] < 10) { if ($v['warnum'] < 10) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['killcrew_person'] / max(1, $v['deathcrew_person']); $v['value'] = $v['killcrew_person'] / max(1, $v['deathcrew_person']);
} }
return $v; return $v;
}], }],
["보 병 숙 련 도", "int", function($v){$v['value'] = $v['dex1']; return $v; }], ["보 병 숙 련 도", "int", function ($v) {
["궁 병 숙 련 도", "int", function($v){$v['value'] = $v['dex2']; return $v; }], $v['value'] = $v['dex1'];
["기 병 숙 련 도", "int", function($v){$v['value'] = $v['dex3']; return $v; }], return $v;
["귀 병 숙 련 도", "int", function($v){$v['value'] = $v['dex4']; return $v; }], }],
[" 병 숙 련 도", "int", function($v){$v['value'] = $v['dex5']; return $v; }], [" 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex2'];
return $v;
}],
["기 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex3'];
return $v;
}],
["귀 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex4'];
return $v;
}],
["차 병 숙 련 도", "int", function ($v) {
$v['value'] = $v['dex5'];
return $v;
}],
["전 력 전 승 률", "percent", function ($v) { ["전 력 전 승 률", "percent", function ($v) {
$totalCnt = $v['ttw'] + $v['ttd'] + $v['ttl']; $totalCnt = $v['ttw'] + $v['ttd'] + $v['ttl'];
if ($totalCnt < 50) { if ($totalCnt < 50) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['ttw'] / max(1, $totalCnt); $v['value'] = $v['ttw'] / max(1, $totalCnt);
} }
return $v; return $v;
@@ -130,8 +168,7 @@ $types = [
$totalCnt = $v['tlw'] + $v['tld'] + $v['tll']; $totalCnt = $v['tlw'] + $v['tld'] + $v['tll'];
if ($totalCnt < 50) { if ($totalCnt < 50) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['tlw'] / max(1, $totalCnt); $v['value'] = $v['tlw'] / max(1, $totalCnt);
} }
return $v; return $v;
@@ -140,8 +177,7 @@ $types = [
$totalCnt = $v['tsw'] + $v['tsd'] + $v['tsl']; $totalCnt = $v['tsw'] + $v['tsd'] + $v['tsl'];
if ($totalCnt < 50) { if ($totalCnt < 50) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['tsw'] / max(1, $totalCnt); $v['value'] = $v['tsw'] / max(1, $totalCnt);
} }
return $v; return $v;
@@ -150,21 +186,28 @@ $types = [
$totalCnt = $v['tiw'] + $v['tid'] + $v['til']; $totalCnt = $v['tiw'] + $v['tid'] + $v['til'];
if ($totalCnt < 50) { if ($totalCnt < 50) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['tiw'] / max(1, $totalCnt); $v['value'] = $v['tiw'] / max(1, $totalCnt);
} }
return $v; return $v;
}], }],
["베 팅 투 자 액", "int", function($v){$v['value'] = $v['betgold']; return $v; }], ["베 팅 투 자 액", "int", function ($v) {
["베 팅 당 첨", "int", function($v){$v['value'] = $v['betwin']; return $v; }], $v['value'] = $v['betgold'];
["베 팅 수 익 금", "int", function($v){$v['value'] = $v['betwingold']; return $v; }], return $v;
}],
["베 팅 당 첨", "int", function ($v) {
$v['value'] = $v['betwin'];
return $v;
}],
["베 팅 수 익 금", "int", function ($v) {
$v['value'] = $v['betwingold'];
return $v;
}],
["베 팅 수 익 률", "percent", function ($v) { ["베 팅 수 익 률", "percent", function ($v) {
if ($v['betgold'] < GameConst::$defaultGold) { if ($v['betgold'] < GameConst::$defaultGold) {
$v['value'] = 0; $v['value'] = 0;
} } else {
else{
$v['value'] = $v['betwingold'] / max(1, $v['betgold']); $v['value'] = $v['betwingold'] / max(1, $v['betgold']);
} }
return $v; return $v;
@@ -177,8 +220,9 @@ foreach($db->query(
experience, dedication, experience, dedication,
dex1, dex2, dex3, dex4, dex5, dex1, dex2, dex3, dex4, dex5,
horse, weapon, book, item horse, weapon, book, item
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2") as $general FROM general WHERE %l",
){ $btn == "NPC 보기" ? "npc>=2" : "npc<2"
) as $general) {
$generalID = $general['no']; $generalID = $general['no'];
$general['bgColor'] = $nationColor[$general['nation']] ?? GameConst::$basecolor4; $general['bgColor'] = $nationColor[$general['nation']] ?? GameConst::$basecolor4;
$general['fgColor'] = newColor($general['bgColor']); $general['fgColor'] = newColor($general['bgColor']);
@@ -187,8 +231,7 @@ foreach($db->query(
if (key_exists('picture', $general)) { if (key_exists('picture', $general)) {
$imageTemp = GetImageURL($general['imgsvr']); $imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}"; $general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
} } else {
else{
$general['pictureFullPath'] = GetImageURL(0) . "/default.jpg"; $general['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
} }
@@ -217,8 +260,7 @@ foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
if ($typeValue == 'percent') { if ($typeValue == 'percent') {
$general['printValue'] = number_format($value * 100, 2) . '%'; $general['printValue'] = number_format($value * 100, 2) . '%';
} } else {
else {
$general['printValue'] = number_format($value); $general['printValue'] = number_format($value);
} }
return $general; return $general;
@@ -247,7 +289,10 @@ $itemTypes = [
'item' => '도 구' 'item' => '도 구'
]; ];
$simpleItemTypes = array_keys($itemTypes); array_map(function($itemType){return $itemType[1];}, $itemTypes); $simpleItemTypes = array_keys($itemTypes);
array_map(function ($itemType) {
return $itemType[1];
}, $itemTypes);
$itemOwners = []; $itemOwners = [];
foreach ($generals as $general) { foreach ($generals as $general) {
@@ -260,11 +305,9 @@ foreach($generals as $general){
if (key_exists($itemClassName, $itemOwners)) { if (key_exists($itemClassName, $itemOwners)) {
$itemOwners[$itemClassName][] = $general; $itemOwners[$itemClassName][] = $general;
} } else {
else{
$itemOwners[$itemClassName] = [$general]; $itemOwners[$itemClassName] = [$general];
} }
} }
} }
@@ -331,8 +374,13 @@ foreach(GameConst::$allItems as $itemType=>$itemList){
?> ?>
</div> </div>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+13 -4
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -18,6 +19,7 @@ increaseRefresh("왕조일람", 1);
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -27,9 +29,11 @@ increaseRefresh("왕조일람", 1);
<body> <body>
<table align=center width=1000 class="tb_layout bg0"> <table align=center width=1000 class="tb_layout bg0">
<tr><td>역 대 왕 조<br> <tr>
<td>역 대 왕 조<br>
<button onclick=window.close()>창 닫기</button><br> <button onclick=window.close()>창 닫기</button><br>
</td></tr> </td>
</tr>
</table> </table>
<?php <?php
@@ -122,8 +126,13 @@ foreach($emperiors as $emperior){
?> ?>
<table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'> <table style="margin-top:10px;" align=center width=1000 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+18 -6
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -48,14 +49,19 @@ if($gameStor->isunited){
<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::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?> <?= WebUtil::printJS('dist_js/common.js') ?>
</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><form name=form1 method=post>정렬순서 : <td>장 수 일 람<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select id='viewType' name='type' size=1> <select id='viewType' name='type' size=1>
<option value=1>국가</option> <option value=1>국가</option>
<option value=2>통솔</option> <option value=2>통솔</option>
@@ -73,8 +79,10 @@ if($gameStor->isunited){
<option value=14>연령</option> <option value=14>연령</option>
<option value=15>NPC</option> <option value=15>NPC</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
$nationname = []; $nationname = [];
@@ -201,8 +209,12 @@ echo "
?> ?>
<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>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
+22 -23
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -31,8 +32,7 @@ $scenarioList = (function(){
if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) { if ($scenarioIdx && key_exists($scenarioIdx, $scenarioList[$seasonIdx] ?? [])) {
$searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name']; $searchScenarioName = $scenarioList[$seasonIdx][$scenarioIdx]['name'];
$searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx); $searchFilter = $db->sqleval('season = %i AND scenario = %i', $seasonIdx, $scenarioIdx);
} } else {
else{
$searchScenarioName = '* 모두 *'; $searchScenarioName = '* 모두 *';
$searchFilter = $db->sqleval('season = %i', $seasonIdx); $searchFilter = $db->sqleval('season = %i', $seasonIdx);
} }
@@ -52,31 +52,28 @@ else{
<?= 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::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJs('dist_js/hallOfFame.js') ?> <?= WebUtil::printJs('dist_js/hallOfFame.js') ?>
</head> </head>
<body> <body>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<tr><td>명 예 의 전 당<br><?=closeButton()?></td></tr> <tr>
<tr><td> <td>명 예 의 전 당<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
시나리오 검색 : <select id="by_scenario" name="by_scenario"> 시나리오 검색 : <select id="by_scenario" name="by_scenario">
<?php foreach ($scenarioList as $iterSeasonIdx => $subScenarioList) : ?> <?php foreach ($scenarioList as $iterSeasonIdx => $subScenarioList) : ?>
<option <option data-season="<?= $iterSeasonIdx ?>" value="" <?= ($iterSeasonIdx == $seasonIdx && $scenarioIdx === null) ? "selected='selected'" : '' ?>>* 시즌 : <?= $iterSeasonIdx ?> 종합 *</option>
data-season="<?=$iterSeasonIdx?>"
value=""
<?=($iterSeasonIdx == $seasonIdx && $scenarioIdx === null)?"selected='selected'":''?>
>* 시즌 : <?=$iterSeasonIdx?> 종합 *</option>
<?php foreach ($subScenarioList as $info) : ?> <?php foreach ($subScenarioList as $info) : ?>
<option <option data-season="<?= $iterSeasonIdx ?>" value="<?= $info['scenario'] ?>" <?= ($iterSeasonIdx == $seasonIdx && $info['scenario'] === $scenarioIdx) ? "selected='selected'" : '' ?>><?= $info['name'] ?>(<?= $info['cnt'] ?>회)</option>
data-season="<?=$iterSeasonIdx?>"
value="<?=$info['scenario']?>"
<?=($iterSeasonIdx == $seasonIdx && $info['scenario']===$scenarioIdx)?"selected='selected'":''?>
><?=$info['name']?>(<?=$info['cnt']?>회)</option>
<?php endforeach; ?> <?php endforeach; ?>
<?php endforeach; ?> <?php endforeach; ?>
?> ?>
</select> </select>
</td></tr> </td>
</tr>
</table> </table>
<div style="margin:auto;width:1100px;"> <div style="margin:auto;width:1100px;">
<?php <?php
@@ -128,8 +125,7 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
if (!key_exists('bgColor', $general)) { if (!key_exists('bgColor', $general)) {
if (!key_exists('color', $general)) { if (!key_exists('color', $general)) {
$general['bgColor'] = GameConst::$basecolor4; $general['bgColor'] = GameConst::$basecolor4;
} } else {
else{
$general['bgColor'] = $general['color']; $general['bgColor'] = $general['color'];
} }
} }
@@ -141,8 +137,7 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
if (key_exists('picture', $general)) { if (key_exists('picture', $general)) {
$imageTemp = GetImageURL($general['imgsvr']); $imageTemp = GetImageURL($general['imgsvr']);
$general['pictureFullPath'] = "$imageTemp/{$general['picture']}"; $general['pictureFullPath'] = "$imageTemp/{$general['picture']}";
} } else {
else{
$general['pictureFullPath'] = GetImageURL(0) . "/default.jpg"; $general['pictureFullPath'] = GetImageURL(0) . "/default.jpg";
} }
@@ -150,8 +145,7 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
$value = $general['value']; $value = $general['value'];
if ($typeValue == 'percent') { if ($typeValue == 'percent') {
$general['printValue'] = number_format($value * 100, 2) . '%'; $general['printValue'] = number_format($value * 100, 2) . '%';
} } else {
else {
$general['printValue'] = number_format($value); $general['printValue'] = number_format($value);
} }
} }
@@ -167,8 +161,13 @@ foreach($types as $typeName=>[$typeDescribe, $typeValue]) {
?> ?>
</div> </div>
<table align=center width=1100 class='tb_layout bg0'> <table align=center width=1100 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+29 -12
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -47,8 +48,7 @@ $e = $e_year * 12 + $e_month;
if ($serverID !== UniqueConst::$serverID) { if ($serverID !== UniqueConst::$serverID) {
$mapTheme = $db->queryFirstField('SELECT map FROM ng_games WHERE server_id=%s', $serverID) ?: 'che'; $mapTheme = $db->queryFirstField('SELECT map FROM ng_games WHERE server_id=%s', $serverID) ?: 'che';
} } else {
else{
$mapTheme = $admin['map_theme'] ?? 'che'; $mapTheme = $admin['map_theme'] ?? 'che';
} }
@@ -56,8 +56,7 @@ else{
if ($serverID !== UniqueConst::$serverID && !$yearmonth) { if ($serverID !== UniqueConst::$serverID && !$yearmonth) {
$year = $s_year; $year = $s_year;
$month = $s_month; $month = $s_month;
} } else if (!$yearmonth) {
else if (!$yearmonth) {
$year = $admin['year']; $year = $admin['year'];
$month = $admin['month'] - 1; $month = $admin['month'] - 1;
} else { } else {
@@ -101,6 +100,7 @@ $nations = Json::decode($history['nations']);
<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/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::printJS('dist_js/history.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
@@ -121,8 +121,11 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
<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>
</tr>
<tr>
<td>
<form name=form1 method=post> <form name=form1 method=post>
연월 선택 : 연월 선택 :
<input type=submit name=btn value="◀◀ 이전달"> <input type=submit name=btn value="◀◀ 이전달">
@@ -133,10 +136,15 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
<input type=submit name=btn value='조회하기'> <input type=submit name=btn value='조회하기'>
<input type=submit name=btn value="다음달 ▶▶"> <input type=submit name=btn value="다음달 ▶▶">
</form> </form>
</td></tr> </td>
</tr>
</table> </table>
<table align=center width=1000 height=520 class='tb_layout bg0'> <table align=center width=1000 height=520 class='tb_layout bg0'>
<thead><tr><th colspan=5 align=center class='bg1'>중 원 지 도</th></tr></thead> <thead>
<tr>
<th colspan=5 align=center class='bg1'>중 원 지 도</th>
</tr>
</thead>
<tbody> <tbody>
<tr height=520> <tr height=520>
<td width=698> <td width=698>
@@ -166,13 +174,17 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
</table> </table>
</td> </td>
</tr> </tr>
<tr><th colspan=5 align=center class='bg1'>중 원 정 세</th></tr> <tr>
<th colspan=5 align=center class='bg1'>중 원 정 세</th>
</tr>
<tr> <tr>
<td colspan=5 valign=top> <td colspan=5 valign=top>
<?= formatHistoryToHTML(Json::decode($history['global_history'])) ?> <?= formatHistoryToHTML(Json::decode($history['global_history'])) ?>
</td> </td>
</tr> </tr>
<tr><th colspan=5 align=center class='bg1'>장 수 동 향</th></tr> <tr>
<th colspan=5 align=center class='bg1'>장 수 동 향</th>
</tr>
<tr> <tr>
<td colspan=5 valign=top> <td colspan=5 valign=top>
<?= formatHistoryToHTML(Json::decode($history['global_action'])) ?> <?= formatHistoryToHTML(Json::decode($history['global_action'])) ?>
@@ -181,8 +193,12 @@ var nations = <?=$nations?$history['nations']:'{}'?>;
</tbody> </tbody>
</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>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
<script> <script>
window.serverNick = '<?= DB::prefix() ?>'; window.serverNick = '<?= DB::prefix() ?>';
@@ -197,4 +213,5 @@ reloadWorldMap({
}); });
</script> </script>
</body> </body>
</html> </html>
+26 -10
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -15,7 +16,10 @@ increaseRefresh("세력일람", 2);
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner=%i', $userID); $me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner=%i', $userID);
$con = checkLimit($me['con']); $con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); } if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@@ -27,6 +31,7 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/extKingdoms.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -36,12 +41,16 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
<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>
<td>세 력 일 람<br><?= closeButton() ?></td>
</tr>
</table> </table>
<?php <?php
$nations = getAllNationStaticInfo(); $nations = getAllNationStaticInfo();
uasort($nations, function($lhs, $rhs){return $rhs['power']<=>$lhs['power'];}); uasort($nations, function ($lhs, $rhs) {
return $rhs['power'] <=> $lhs['power'];
});
$nations[0] = getNationStaticInfo(0); $nations[0] = getNationStaticInfo(0);
@@ -79,8 +88,7 @@ foreach ($nations as $nation) {
$generalPermission = checkSecretPermission($general, false); $generalPermission = checkSecretPermission($general, false);
if ($generalPermission == 4) { if ($generalPermission == 4) {
$ambassadors[] = $general['name']; $ambassadors[] = $general['name'];
} } else if ($generalPermission == 3) {
else if($generalPermission == 3){
$auditors[] = $general['name']; $auditors[] = $general['name'];
} }
} }
@@ -140,9 +148,13 @@ foreach ($nations as $nation) {
<tr> <tr>
<td colspan=8> 장수 일람 : "; <td colspan=8> 장수 일람 : ";
foreach ($generals as $general) { foreach ($generals as $general) {
if($general['npc'] >= 2) { echo "<font color=cyan>{$general['name']}</font>, "; } if ($general['npc'] >= 2) {
elseif($general['npc'] == 1) { echo "<font color=skyblue>{$general['name']}</font>, "; } echo "<font color=cyan>{$general['name']}</font>, ";
else { echo "{$general['name']}, "; } } elseif ($general['npc'] == 1) {
echo "<font color=skyblue>{$general['name']}</font>, ";
} else {
echo "{$general['name']}, ";
}
} }
echo " echo "
</td> </td>
@@ -186,8 +198,12 @@ echo"
?> ?>
<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>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
+19 -8
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -28,6 +29,7 @@ $sel[$type] = "selected";
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -37,8 +39,12 @@ $sel[$type] = "selected";
<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><form name=form1 method=post>정렬순서 : <td>빙 의 일 람<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1> <select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>이름</option> <option <?= $sel[1] ?? '' ?> value=1>이름</option>
<option <?= $sel[2] ?? '' ?> value=2>국가</option> <option <?= $sel[2] ?? '' ?> value=2>국가</option>
@@ -49,8 +55,10 @@ $sel[$type] = "selected";
<option <?= $sel[7] ?? '' ?> value=7>명성</option> <option <?= $sel[7] ?? '' ?> value=7>명성</option>
<option <?= $sel[8] ?? '' ?> value=8>계급</option> <option <?= $sel[8] ?? '' ?> value=8>계급</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
$nationName = []; $nationName = [];
@@ -83,8 +91,7 @@ if($isAsc){
usort($generalList, function ($lhs, $rhs) use ($sortKey) { usort($generalList, function ($lhs, $rhs) use ($sortKey) {
return $lhs[$sortKey] <=> $rhs[$sortKey]; return $lhs[$sortKey] <=> $rhs[$sortKey];
}); });
} } else {
else{
usort($generalList, function ($lhs, $rhs) use ($sortKey) { usort($generalList, function ($lhs, $rhs) use ($sortKey) {
return $rhs[$sortKey] <=> $lhs[$sortKey]; return $rhs[$sortKey] <=> $lhs[$sortKey];
}); });
@@ -124,8 +131,12 @@ else{
<?php endforeach; ?> <?php endforeach; ?>
</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>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
+16 -4
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -18,10 +19,14 @@ $mapTheme = $gameStor->map_theme??'che';
$me = $db->queryFirstRow('SELECT con,turntime from general where owner=%i', $userID); $me = $db->queryFirstRow('SELECT con,turntime from general where owner=%i', $userID);
$con = checkLimit($me['con']); $con = checkLimit($me['con']);
if($con >= 2) { printLimitMsg($me['turntime']); exit(); } if ($con >= 2) {
printLimitMsg($me['turntime']);
exit();
}
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<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">
@@ -29,6 +34,7 @@ if($con >= 2) { printLimitMsg($me['turntime']); exit(); }
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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::printJS('dist_js/map.js') ?>
@@ -55,7 +61,9 @@ $(function(){
<body> <body>
<table align=center width=1200 class='tb_layout bg0'> <table align=center width=1200 class='tb_layout bg0'>
<tr><td>세 력 도<br><?=closeButton()?></td></tr> <tr>
<td>세 력 도<br><?= closeButton() ?></td>
</tr>
</table> </table>
<table align=center width=1200 height=520 class='tb_layout bg0'> <table align=center width=1200 height=520 class='tb_layout bg0'>
<tr height=520> <tr height=520>
@@ -73,8 +81,12 @@ $(function(){
</tr> </tr>
</table> </table>
<table align=center width=1200 class='tb_layout bg0'> <table align=center width=1200 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
+72 -14
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -47,6 +48,7 @@ if ($admin['maxonline'] < $curonline) {
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 트래픽정보</title> <title><?= UniqueConst::$serverName ?>: 트래픽정보</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -54,6 +56,7 @@ if ($admin['maxonline'] < $curonline) {
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -64,6 +67,7 @@ if ($admin['maxonline'] < $curonline) {
position: relative; position: relative;
height: 30px; height: 30px;
} }
.big_bar span { .big_bar span {
float: right; float: right;
padding: 0; padding: 0;
@@ -84,15 +88,23 @@ span.out_bar{
} }
</style> </style>
</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>
<td>트 래 픽 정 보<br><?= closeButton() ?></td>
</tr>
</table> </table>
<br> <br>
<table align=center width=1016> <table align=center width=1016>
<tr><td align=left> <tr>
<td align=left>
<table align=center class='tb_layout bg0'> <table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 량</font></td></tr> <tr>
<td colspan=4 align=center class='bg2'>
<font size=5>접 속 량</font>
</td>
</tr>
<?php <?php
$refresh[] = $admin['refresh']; $refresh[] = $admin['refresh'];
foreach ($refresh as $i => $value) { foreach ($refresh as $i => $value) {
@@ -117,7 +129,9 @@ foreach($refresh as $i=>$value){
<?php <?php
} }
?> ?>
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr> <tr>
<td colspan=4 height=5 align=center class='bg1'></td>
</tr>
<tr> <tr>
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxrefresh'] ?></td> <td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxrefresh'] ?></td>
</tr> </tr>
@@ -127,7 +141,11 @@ foreach($refresh as $i=>$value){
</td> </td>
<td align=right> <td align=right>
<table align=center class='tb_layout bg0'> <table align=center class='tb_layout bg0'>
<tr><td colspan=4 align=center class='bg2'><font size=5>접 속 자</font></td></tr> <tr>
<td colspan=4 align=center class='bg2'>
<font size=5>접 속 자</font>
</td>
</tr>
<?php <?php
$online[] = $curonline; $online[] = $curonline;
foreach ($online as $i => $value) { foreach ($online as $i => $value) {
@@ -152,16 +170,23 @@ foreach($online as $i=>$value){
<?php <?php
} }
?> ?>
<tr><td colspan=4 height=5 align=center class='bg1'></td></tr> <tr>
<td colspan=4 height=5 align=center class='bg1'></td>
</tr>
<tr> <tr>
<td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxonline'] ?></td> <td colspan=4 height=30 align=center class='bg0'>최고기록: <?= $admin['maxonline'] ?></td>
</tr> </tr>
</table> </table>
</td></tr> </td>
</tr>
</table> </table>
<br> <br>
<table align=center class='tb_layout bg0'> <table align=center class='tb_layout bg0'>
<tr><td colspan=3 align=center class='bg2'><font size=5>주 의 대 상 자 (순간과도갱신)</font></td></tr> <tr>
<td colspan=3 align=center class='bg2'>
<font size=5>주 의 대 상 자 (순간과도갱신)</font>
</td>
</tr>
<?php <?php
$max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general'); $max_refresh = $db->queryFirstRow('SELECT sum(refresh) as refresh, sum(`connect`) as `connect` from general');
$max_refresh['name'] = '접속자 총합'; $max_refresh['name'] = '접속자 총합';
@@ -191,10 +216,15 @@ foreach ($refresh_result as $i=>$user) {
</table> </table>
<br> <br>
<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>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
<?php <?php
@@ -217,9 +247,37 @@ function getHex($dec)
function getHexCode($hex) function getHexCode($hex)
{ {
switch ($hex) { switch ($hex) {
case 0: return "0"; case 1: return "1"; case 2: return "2"; case 3: return "3"; case 0:
case 4: return "4"; case 5: return "5"; case 6: return "6"; case 7: return "7"; return "0";
case 8: return "8"; case 9: return "9"; case 10: return "A"; case 11: return "B"; case 1:
case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F"; return "1";
case 2:
return "2";
case 3:
return "3";
case 4:
return "4";
case 5:
return "5";
case 6:
return "6";
case 7:
return "7";
case 8:
return "8";
case 9:
return "9";
case 10:
return "A";
case 11:
return "B";
case 12:
return "C";
case 13:
return "D";
case 14:
return "E";
case 15:
return "F";
} }
} }
+59 -24
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -23,6 +24,7 @@ $vote = $admin['vote']?:['-'];
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 설문조사</title> <title><?= UniqueConst::$serverName ?>: 설문조사</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -30,6 +32,7 @@ $vote = $admin['vote']?:['-'];
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -54,13 +57,20 @@ function captureKey(e) {
</script> </script>
</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>
<td>설 문 조 사<br><?= closeButton() ?></td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<form name=form1 action=c_vote.php method=post> <form name=form1 action=c_vote.php method=post>
<tr><td colspan=3 align=center class='bg2'><font size=5>설 문 조 사 (<?=$admin['develcost']*5?>금과 추첨으로 유니크템 증정!)</font></td></tr> <tr>
<td colspan=3 align=center class='bg2'>
<font size=5>설 문 조 사 (<?= $admin['develcost'] * 5 ?>금과 추첨으로 유니크템 증정!)</font>
</td>
</tr>
<?php <?php
if ($isVoteAdmin) { if ($isVoteAdmin) {
@@ -180,7 +190,9 @@ if ($me['no'] > 0) {
</table> </table>
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=3 align=center class='bg2'><font size=5> <tr>
<td colspan=3 align=center class='bg2'>
<font size=5>
전 체 통 계 전 체 통 계
<?php <?php
if ($isVoteAdmin) { if ($isVoteAdmin) {
@@ -234,8 +246,7 @@ if ($admin['voteopen'] >= 1 || $isVoteAdmin) {
$per = round(($totalVote[$i] ?? 0) * 100 / $memCount, 1); $per = round(($totalVote[$i] ?? 0) * 100 / $memCount, 1);
if ($i == $voteTypeCount - 1) { if ($i == $voteTypeCount - 1) {
$per = 100 - $totalPer; $per = 100 - $totalPer;
} } else {
else{
$totalPer += $per; $totalPer += $per;
} }
@@ -280,8 +291,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
$per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1); $per = round(Util::array_get($nationVote[0][$i], 0) / $memCount * 100, 1);
if ($i == $voteTypeCount - 1) { if ($i == $voteTypeCount - 1) {
$per = 100 - $totalPer; $per = 100 - $totalPer;
} } else {
else{
$totalPer += $per; $totalPer += $per;
} }
// if($per < 5) { $vote['cnt'] = "&nbsp;"; } // if($per < 5) { $vote['cnt'] = "&nbsp;"; }
@@ -308,8 +318,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
$voteCount = $nationVoteCount[$nation['nation']] ?? 0; $voteCount = $nationVoteCount[$nation['nation']] ?? 0;
if ($memCount == 0) { if ($memCount == 0) {
$percentage = 100; $percentage = 100;
} } else {
else{
$percentage = round($voteCount / $memCount * 100, 1); $percentage = round($voteCount / $memCount * 100, 1);
} }
@@ -332,8 +341,7 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
if ($i == $voteTypeCount - 1) { if ($i == $voteTypeCount - 1) {
$per = 100 - $totalPer; $per = 100 - $totalPer;
} } else {
else{
$totalPer += $per; $totalPer += $per;
} }
@@ -358,10 +366,15 @@ if ($admin['voteopen'] >= 2 || $isVoteAdmin) {
</form> </form>
</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>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
<?php <?php
@@ -373,14 +386,30 @@ function getVoteColor($type)
switch ($type) { switch ($type) {
default: default:
case 0: $color = "black"; break; case 0:
case 1: $color = "red"; break; $color = "black";
case 2: $color = "orange"; break; break;
case 3: $color = "yellow"; break; case 1:
case 4: $color = "green"; break; $color = "red";
case 5: $color = "blue"; break; break;
case 6: $color = "navy"; break; case 2:
case 7: $color = "purple"; break; $color = "orange";
break;
case 3:
$color = "yellow";
break;
case 4:
$color = "green";
break;
case 5:
$color = "blue";
break;
case 6:
$color = "navy";
break;
case 7:
$color = "purple";
break;
} }
return $color; return $color;
@@ -393,9 +422,15 @@ function getNewColor($type)
} }
switch ($type) { switch ($type) {
case 2: $color = "black"; break; case 2:
case 3: $color = "black"; break; $color = "black";
default:$color = "white"; break; break;
case 3:
$color = "black";
break;
default:
$color = "white";
break;
} }
return $color; return $color;
+47 -12
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -44,6 +45,7 @@ if ($msg2 == "") {
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 거래장</title> <title><?= UniqueConst::$serverName ?>: 거래장</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -51,19 +53,31 @@ if ($msg2 == "") {
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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') ?> <?= 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" />
</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 align=center class='bg2'><font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')"></td></tr> <td>거 래 장<br><?= closeButton() ?></td>
</tr>
<tr>
<td align=center class='bg2'>
<font color=orange size=6><b>거 래 장</b></font><input type=button value='갱신' onclick="location.replace('b_auction.php')">
</td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php> <form method=post action=c_auction.php>
<tr><td colspan=11 align=center bgcolor=orange><font size=5>팝 니 다</font></td></tr> <tr>
<td colspan=11 align=center bgcolor=orange>
<font size=5>팝 니 다</font>
</td>
</tr>
<tr align=center class='bg1'> <tr align=center class='bg1'>
<td width=68>거래번호</td> <td width=68>거래번호</td>
<td width=48>선택</td> <td width=48>선택</td>
@@ -151,7 +165,11 @@ foreach($db->query('SELECT * from auction where type=0 order by expire') as $auc
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<form method=post action=c_auction.php> <form method=post action=c_auction.php>
<tr><td colspan=11 align=center bgcolor=skyblue><font size=5>삽 니 다</font></td></tr> <tr>
<td colspan=11 align=center bgcolor=skyblue>
<font size=5>삽 니 다</font>
</td>
</tr>
<tr align=center class='bg1'> <tr align=center class='bg1'>
<td width=68>거래번호</td> <td width=68>거래번호</td>
<td width=48>선택</td> <td width=48>선택</td>
@@ -237,12 +255,23 @@ foreach($db->query('SELECT * from auction where type=1 order by expire') as $auc
</table> </table>
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td align=center class='bg2'><font size=5>최 근 기 록</font></td></tr> <tr>
<tr><td> <td align=center class='bg2'>
<font size=5>최 근 기 록</font>
</td>
</tr>
<tr>
<td>
<?= getAuctionLogRecent(20) ?> <?= getAuctionLogRecent(20) ?>
</td></tr> </td>
<tr><td align=center class='bg2'><font size=5>도 움 말</font></td></tr> </tr>
<tr><td> <tr>
<td align=center class='bg2'>
<font size=5>도 움 말</font>
</td>
</tr>
<tr>
<td>
<font color=white size=2> <font color=white size=2>
ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br> ㆍ판매거래는 거래자가 판매할 물품을 거래하면, 구입을 희망하는 사람이 현재가보다 높게 입찰하여 구입하는 방식입니다.<br>
ㆍ<font color=cyan>Hint</font>) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)<br> ㆍ<font color=cyan>Hint</font>) 쌀이 귀한 경우는 입찰자가 많아서 자연스레 단가가 오르게 됩니다. (해당 물품을 사려는 가격이 오름)<br>
@@ -266,9 +295,15 @@ foreach($db->query('SELECT * from auction where type=1 order by expire') as $auc
ㆍ<font color=cyan>Hint</font>) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.<br> ㆍ<font color=cyan>Hint</font>) 단가가 낮으면(<1.00) 금이 비싸므로 구매가 이득입니다.<br>
ㆍ즐거운 거래! ㆍ즐거운 거래!
</font> </font>
</td></tr> </td>
<tr><td><?=closeButton()?></td></tr> </tr>
<tr><td><?=banner()?> </td></tr> <tr>
<td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+46 -24
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -63,8 +64,7 @@ $permission = checkSecretPermission($me);
if ($permission < 0) { if ($permission < 0) {
echo '국가에 소속되어있지 않습니다.'; echo '국가에 소속되어있지 않습니다.';
die(); die();
} } else if ($permission < 1) {
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다."; echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die(); die();
} }
@@ -82,25 +82,24 @@ if ($btn == '정렬하기') {
[$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType]; [$queryTypeText, $reqArgType, $comp] = $queryMap[$reqQueryType];
if ($reqArgType === 0) { if ($reqArgType === 0) {
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level FROM general WHERE nation = %i', $nationID); $generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level FROM general WHERE nation = %i', $nationID);
} } else if ($reqArgType === 1) {
else if($reqArgType===1){
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, %b FROM general WHERE nation = %i', $reqQueryType, $nationID); $generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, %b FROM general WHERE nation = %i', $reqQueryType, $nationID);
} } else if ($reqArgType === 2) {
else if($reqArgType===2){ $generalBasicList = $db->query(
$generalBasicList = $db->query('SELECT no, name, npc, turntime, officer_level, value as %b 'SELECT no, name, npc, turntime, officer_level, value as %b
FROM general LEFT JOIN rank_data FROM general LEFT JOIN rank_data
ON general.no = rank_data.general_id ON general.no = rank_data.general_id
WHERE rank_data.type = %s AND general.nation = %i', WHERE rank_data.type = %s AND general.nation = %i',
$reqQueryType, $reqQueryType, $nationID $reqQueryType,
$reqQueryType,
$nationID
); );
} } else if ($reqArgType === 3) {
else if($reqArgType===3){
$generalBasicList = array_map(function ($arr) { $generalBasicList = array_map(function ($arr) {
$arr['aux'] = Json::decode($arr['aux']); $arr['aux'] = Json::decode($arr['aux']);
return $arr; return $arr;
}, $db->query('SELECT no, name, npc, turntime, officer_level, aux FROM general WHERE nation = %i', $nationID)); }, $db->query('SELECT no, name, npc, turntime, officer_level, aux FROM general WHERE nation = %i', $nationID));
} } else {
else{
throw new \sammo\MustNotBeReachedException(); throw new \sammo\MustNotBeReachedException();
} }
@@ -122,6 +121,7 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -131,8 +131,11 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<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>
</tr>
<tr>
<td>
<form name=form1 method=post> <form name=form1 method=post>
정렬순서 : 정렬순서 :
<select name='query_type' size=1> <select name='query_type' size=1>
@@ -149,24 +152,34 @@ $showGeneral = General::createGeneralObjFromDB($gen);
</select> </select>
<input type=submit name=btn value='조회하기'> <input type=submit name=btn value='조회하기'>
</form> </form>
</td></tr> </td>
</tr>
</table> </table>
<table width=1000 align=center class='tb_layout bg0'> <table width=1000 align=center class='tb_layout bg0'>
<tr> <tr>
<td width=50% align=center class='bg1'><font color=skyblue size=3>장 수 정 보</font></td> <td width=50% align=center class='bg1'>
<td width=50% align=center class='bg1'><font color=orange size=3>장 수 열 전</font></td> <font color=skyblue size=3>장 수 정 보</font>
</td>
<td width=50% align=center class='bg1'>
<font color=orange size=3>장 수 열 전</font>
</td>
</tr> </tr>
<tr> <tr>
<td valign=top> <td valign=top>
<?php generalInfo($showGeneral); generalInfo2($showGeneral); ?> <?php generalInfo($showGeneral);
generalInfo2($showGeneral); ?>
</td> </td>
<td valign=top> <td valign=top>
<?= formatHistoryToHTML(getGeneralHistoryLogAll($gen)) ?> <?= formatHistoryToHTML(getGeneralHistoryLogAll($gen)) ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td align=center class='bg1'><font color=orange size=3>전투 기록</font></td> <td align=center class='bg1'>
<td align=center class='bg1'><font color=orange size=3>전투 결과</font></td> <font color=orange size=3>전투 기록</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>전투 결과</font>
</td>
</tr> </tr>
<tr> <tr>
<td valign=top> <td valign=top>
@@ -178,8 +191,12 @@ $showGeneral = General::createGeneralObjFromDB($gen);
</tr> </tr>
<?php if ($showGeneral->getNPCType() > 1 || $permission >= 2) : ?> <?php if ($showGeneral->getNPCType() > 1 || $permission >= 2) : ?>
<tr> <tr>
<td align=center class='bg1'><font color=orange size=3>개인 기록</font></td> <td align=center class='bg1'>
<td align=center class='bg1'><font color=orange size=3>&nbsp;</font></td> <font color=orange size=3>개인 기록</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>&nbsp;</font>
</td>
</tr> </tr>
<tr> <tr>
<td valign=top> <td valign=top>
@@ -191,8 +208,13 @@ $showGeneral = General::createGeneralObjFromDB($gen);
<?php endif; ?> <?php endif; ?>
</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>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+136 -32
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -35,11 +36,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;
} }
$str1 = getTournament($admin['tournament']); $str1 = getTournament($admin['tournament']);
@@ -58,6 +80,7 @@ if($str3){
<?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">
@@ -65,6 +88,7 @@ if($str3){
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/betting.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -73,15 +97,30 @@ if($str3){
<body> <body>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr><td>베 팅 장<br><?=closeButton()?></td></tr> <tr>
<td>베 팅 장<br><?= closeButton() ?></td>
</tr>
</table> </table>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr><td colspan=16><input type=button value='갱신' onclick='location.reload()'></td></tr> <tr>
<tr><td colspan=16 align=center><font color=white size=6><?=$tnmt_type?> (<?=$str1.$str2.$str3?>)</font></td></tr> <td colspan=16><input type=button value='갱신' onclick='location.reload()'></td>
<tr><td height=50 colspan=16 align=center class='bg2'><font color=limegreen size=6>16강 상황</font><br><font color=orange size=3>(전체 금액 : <?=$globalBetTotal?> / 내 투자 금액 : <?=$myBetTotal?>)</font></td></tr> </tr>
<tr>
<td colspan=16 align=center>
<font color=white size=6><?= $tnmt_type ?> (<?= $str1 . $str2 . $str3 ?>)</font>
</td>
</tr>
<tr>
<td height=50 colspan=16 align=center class='bg2'>
<font color=limegreen size=6>16강 상황</font><br>
<font color=orange size=3>(전체 금액 : <?= $globalBetTotal ?> / 내 투자 금액 : <?= $myBetTotal ?>)</font>
</td>
</tr>
</table> </table>
<table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'> <table align=center width=1120 class='mimic_flex bg0' style='border:solid 1px gray;font-size:10px;'>
<tr align=center><td height=10 colspan=16></td></tr> <tr align=center>
<td height=10 colspan=16></td>
</tr>
<tr align=center> <tr align=center>
<?php <?php
$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');
@@ -297,8 +336,7 @@ $gold = [];
for ($i = 0; $i < 16; $i++) { for ($i = 0; $i < 16; $i++) {
if ($globalBet[$i] == 0) { if ($globalBet[$i] == 0) {
$bet[$i] = "∞"; $bet[$i] = "∞";
} } else {
else{
$bet[$i] = round($globalBetTotal / $globalBet[$i], 2); $bet[$i] = round($globalBetTotal / $globalBet[$i], 2);
} }
} }
@@ -306,17 +344,17 @@ for ($i=0; $i < 16; $i++) {
for ($i = 0; $i < 16; $i++) { for ($i = 0; $i < 16; $i++) {
if (!is_numeric($bet[$i])) { if (!is_numeric($bet[$i])) {
$gold[$i] = 0; $gold[$i] = 0;
} } else {
else{
$gold[$i] = Util::round($myBet[$i] * $bet[$i]); $gold[$i] = Util::round($myBet[$i] * $bet[$i]);
} }
} }
?> ?>
</tr> </tr>
</table> </table>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr align=center><td height=10 colspan=16></td></tr> <tr align=center>
<td height=10 colspan=16></td>
</tr>
<?php <?php
echo " echo "
<tr align=center>"; <tr align=center>";
@@ -327,8 +365,22 @@ for ($i=0; $i < 16; $i++) {
?> ?>
</tr> </tr>
<tr align=center> <tr align=center>
<td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td> <td>×</td>
<td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td><td>×</td> <td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
<td>×</td>
</tr> </tr>
<tr align=center> <tr align=center>
<?php <?php
@@ -338,8 +390,22 @@ for ($i=0; $i < 16; $i++) {
?> ?>
</tr> </tr>
<tr align=center> <tr align=center>
<td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td> <td>∥</td>
<td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td><td>∥</td> <td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
<td>∥</td>
</tr> </tr>
<tr align=center> <tr align=center>
<?php <?php
@@ -389,33 +455,51 @@ if ($admin['tournament'] == 6) {
<font color=skyblue size=4>( 베팅후 500원 이하일땐 베팅이 불가능합니다. )</font> <font color=skyblue size=4>( 베팅후 500원 이하일땐 베팅이 불가능합니다. )</font>
</td> </td>
</tr> </tr>
<tr align=center><td height=10 colspan=16></td></tr> <tr align=center>
<td height=10 colspan=16></td>
</tr>
</table> </table>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr align=center><td height=50 colspan=4 class='bg2'><font color=yellow size=6>토너먼트 랭킹</font></td></tr> <tr align=center>
<tr align=center><td colspan=4 class='bg2'><font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font></td></tr> <td height=50 colspan=4 class='bg2'>
<font color=yellow size=6>토너먼트 랭킹</font>
</td>
</tr>
<tr align=center>
<td colspan=4 class='bg2'>
<font color=skyblue size=3>순위 / 장수명 / 능력치 / 경기수 / 승리 / 무승부 / 패배 / 집계점수 / 우승횟수</font>
</td>
</tr>
<tr align=center> <tr align=center>
<?php <?php
$tournamentType = [ $tournamentType = [
'전 력 전' => [ '전 력 전' => [
'종합', '종합',
function(General $general){return $general->getVar('leadership')+$general->getVar('strength')+$general->getVar('intel');}, function (General $general) {
return $general->getVar('leadership') + $general->getVar('strength') + $general->getVar('intel');
},
'tt', 'tt',
], ],
'통 솔 전' => [ '통 솔 전' => [
'통솔', '통솔',
function(General $general){return $general->getVar('leadership');}, function (General $general) {
return $general->getVar('leadership');
},
'tl', 'tl',
], ],
'일 기 토' => [ '일 기 토' => [
'무력', '무력',
function(General $general){return $general->getVar('strength');}, function (General $general) {
return $general->getVar('strength');
},
'ts', 'ts',
], ],
'설 전' => [ '설 전' => [
'지력', '지력',
function(General $general){return $general->getVar('intel');}, function (General $general) {
return $general->getVar('intel');
},
'ti', 'ti',
], ],
]; ];
@@ -428,8 +512,22 @@ $type4 = array("total", "leadership", "strength", "intel");
foreach ($tournamentType as $tournamentTypeText => [$statTypeText, $statFunc, $rankColumn]) : ?> foreach ($tournamentType as $tournamentTypeText => [$statTypeText, $statFunc, $rankColumn]) : ?>
<td> <td>
<table align=center width=280 class='tb_layout bg0'> <table align=center width=280 class='tb_layout bg0'>
<tr><td colspan=9 align=center style=color:white;background-color:black;><font size=4><?=$tournamentTypeText?></font></td></tr> <tr>
<tr class='bg1'><td align=center>순</td><td align=center>장수</td><td align=center><?=$statTypeText?></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> <td colspan=9 align=center style=color:white;background-color:black;>
<font size=4><?= $tournamentTypeText ?></font>
</td>
</tr>
<tr class='bg1'>
<td align=center>순</td>
<td align=center>장수</td>
<td align=center><?= $statTypeText ?></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>
<?php <?php
$prizeColumn = "{$rankColumn}p"; $prizeColumn = "{$rankColumn}p";
$gameColumn = "{$rankColumn}g"; $gameColumn = "{$rankColumn}g";
@@ -473,7 +571,8 @@ foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankCo
); );
} }
?> ?>
</table></td> </table>
</td>
<?php endforeach; ?> <?php endforeach; ?>
</tr> </tr>
<tr> <tr>
@@ -487,8 +586,13 @@ foreach($tournamentType as $tournamentTypeText=>[$statTypeText,$statFunc,$rankCo
</tr> </tr>
</table> </table>
<table align=center width=1120 class='tb_layout bg0'> <table align=center width=1120 class='tb_layout bg0'>
<tr><td><?=closeButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= closeButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+48 -67
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -10,6 +11,7 @@ $generalObj = General::createGeneralObjFromDB($session->generalID);
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<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">
@@ -17,6 +19,7 @@ $generalObj = General::createGeneralObjFromDB($session->generalID);
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/chiefCenter.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -33,75 +36,53 @@ var maxChiefTurn = <?=GameConst::$maxChiefTurn?>;
<div class='tb_layout bg0'>사 령 부<button type='button' id='reloadTable'>갱신</button><br> <div class='tb_layout bg0'>사 령 부<button type='button' id='reloadTable'>갱신</button><br>
<?= backButton() ?></div> <?= backButton() ?></div>
<div style='background-color:skyblue;text-align:center;'>수뇌부 일정</div> <div style='background-color:skyblue;text-align:center;'>수뇌부 일정</div>
<div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;' <div class="chiefSubTable" style='height:<?= 22 * (GameConst::$maxChiefTurn + 1) ?>px;'>
><div class='chiefTurnIdxPanel' <div class='chiefTurnIdxPanel'>
><div class='bg1 chiefTurnIdx'>.</div <div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?> <div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div </div <?php foreach ([12, 10, 8, 6] as $chiefIdx) : ?>>
<?php endforeach; ?> <div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?= $chiefIdx ?>'>
></div <div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $turnIdx) : ?>>
<?php foreach([12, 10, 8, 6] as $chiefIdx): ?> <div class='chiefTurnBox turn<?= $turnIdx ?>'>
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>' <div class='chiefTurnTime'>&nbsp;</div>
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div <div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $turnIdx): ?> </div <?php endforeach; ?>>
><div class='chiefTurnBox turn<?=$turnIdx?>' </div <?php endforeach; ?>>
><div class='chiefTurnTime'>&nbsp;</div <div class='chiefTurnIdxPanel tail'>
><div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div <div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
></div <div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
<?php endforeach; ?> </div>
></div </div>
<?php endforeach; ?> <div id='controlPlate' style='display:flex;flex-flow:row wrap;justify-content:center;'>
><div class='chiefTurnIdxPanel tail' <div style='width:400px;text-align:right;'><?= chiefTurnTable()
><div class='bg1 chiefTurnIdx'>.</div ?></div>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?> <div style='width:400px;display: flex;justify-content: center;flex-direction: column;'>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div <div><input type='button' id='turnPush' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='미루기▼'><input type='button' id='turnPull' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='▲당기기'></div>
<?php endforeach; ?> <div><?= chiefCommandTable($generalObj)
></div ?><br><input type='button' id='setCommand' style='visibility:hidden;background-color:<?= GameConst::$basecolor2 ?>;color:white;font-size:14px;' value='실 행'></div>
></div </div>
><div id='controlPlate' style='display:flex;flex-flow:row wrap;justify-content:center;' </div>
><div style='width:400px;text-align:right;' <div class="chiefSubTable" style='height:<?= 22 * (GameConst::$maxChiefTurn + 1) ?>px;'>
><?=chiefTurnTable() <div class='chiefTurnIdxPanel'>
?></div <div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
><div style='width:400px;display: flex;justify-content: center;flex-direction: column;' <div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
><div </div <?php foreach ([11, 9, 7, 5] as $chiefIdx) : ?>>
><input type='button' id='turnPush' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:14px;' value='미루기▼' <div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?= $chiefIdx ?>'>
><input type='button' id='turnPull' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:14px;' value='▲당기기' <div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $turnIdx) : ?>>
></div <div class='chiefTurnBox turn<?= $turnIdx ?>'>
><div <div class='chiefTurnTime'>&nbsp;</div>
><?=chiefCommandTable($generalObj) <div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div>
?><br><input type='button' id='setCommand' style='visibility:hidden;background-color:<?=GameConst::$basecolor2?>;color:white;font-size:14px;' value='실 행' </div <?php endforeach; ?>>
></div </div <?php endforeach; ?>>
></div <div class='chiefTurnIdxPanel tail'>
></div <div class='bg1 chiefTurnIdx'>.</div <?php foreach (Util::range(GameConst::$maxChiefTurn) as $idx) : ?>>
><div class="chiefSubTable" style='height:<?=22*(GameConst::$maxChiefTurn+1)?>px;' <div class='bg0 chiefTurnIdx'><?= $idx + 1 ?></div <?php endforeach; ?>>
><div class='chiefTurnIdxPanel' </div>
><div class='bg1 chiefTurnIdx'>.</div </div>
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?> <div><?= backButton()
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
<?php endforeach; ?>
></div
<?php foreach([11, 9, 7, 5] as $chiefIdx): ?>
><div class='bg2 chiefPlate' style='flex-grow:1;' id='chief_<?=$chiefIdx?>'
><div class='bg1 chiefNamePlate'><span class='chiefLevelText'>-</span> : <span class='chiefName'>&nbsp;</span></div
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $turnIdx): ?>
><div class='chiefTurnBox turn<?=$turnIdx?>'
><div class='chiefTurnTime'>&nbsp;</div
><div class='chiefTurnPad'><span class='chiefTurnText'>&nbsp;</span></div
></div
<?php endforeach; ?>
></div
<?php endforeach; ?>
><div class='chiefTurnIdxPanel tail'
><div class='bg1 chiefTurnIdx'>.</div
<?php foreach(Util::range(GameConst::$maxChiefTurn) as $idx):?>
><div class='bg0 chiefTurnIdx'><?=$idx+1?></div
<?php endforeach; ?>
></div
></div
><div
><?=backButton()
?><?= banner() ?><?= banner()
?></div> ?></div>
</div> </div>
</body> </body>
</html> </html>
+43 -28
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -35,6 +36,7 @@ $templates = new \League\Plates\Engine('templates');
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/currentCity.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') ?>
@@ -59,7 +61,9 @@ $templates = new \League\Plates\Engine('templates');
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>도 시 정 보<br><?=backButton()?></td></tr> <tr>
<td>도 시 정 보<br><?= backButton() ?></td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
@@ -79,7 +83,10 @@ if($me['officer_level'] == 0) {
$city = $db->queryFirstRow('SELECT city,name,nation from city where city=%i', $me['city']); $city = $db->queryFirstRow('SELECT city,name,nation from city where city=%i', $me['city']);
echo " echo "
<option value={$city['city']}"; <option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; } if ($city['city'] == $citylist) {
echo " selected";
$valid = 1;
}
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】"; echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
if ($city['nation'] == 0) echo "공백지"; if ($city['nation'] == 0) echo "공백지";
elseif ($me['nation'] == $city['nation']) echo "본국"; elseif ($me['nation'] == $city['nation']) echo "본국";
@@ -90,7 +97,10 @@ if($me['officer_level'] == 0) {
foreach ($db->query('SELECT city,name,nation from city where nation=%i', $me['nation']) as $city) { foreach ($db->query('SELECT city,name,nation from city where nation=%i', $me['nation']) as $city) {
echo " echo "
<option value={$city['city']}"; <option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; } if ($city['city'] == $citylist) {
echo " selected";
$valid = 1;
}
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】"; echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
if ($city['nation'] == 0) echo "공백지"; if ($city['nation'] == 0) echo "공백지";
elseif ($me['nation'] == $city['nation']) echo "본국"; elseif ($me['nation'] == $city['nation']) echo "본국";
@@ -102,7 +112,10 @@ if($me['officer_level'] == 0) {
foreach ($db->query('SELECT distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation=%i and B.nation!=%i', $me['nation'], $me['nation']) as $city) { foreach ($db->query('SELECT distinct A.city,B.name,B.nation from general A,city B where A.city=B.city and A.nation=%i and B.nation!=%i', $me['nation'], $me['nation']) as $city) {
echo " echo "
<option value={$city['city']}"; <option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; } if ($city['city'] == $citylist) {
echo " selected";
$valid = 1;
}
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】"; echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
if ($city['nation'] == 0) echo "공백지"; if ($city['nation'] == 0) echo "공백지";
elseif ($me['nation'] == $city['nation']) echo "본국"; elseif ($me['nation'] == $city['nation']) echo "본국";
@@ -118,8 +131,7 @@ if($myNation['level'] > 0) {
if ($rawSpy == '') { if ($rawSpy == '') {
$spyCities = []; $spyCities = [];
} } else {
else{
$spyCities = array_keys(Json::decode($rawSpy)); $spyCities = array_keys(Json::decode($rawSpy));
} }
@@ -127,7 +139,10 @@ if($myNation['level'] > 0) {
if ($spyCities) { if ($spyCities) {
foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) { foreach ($db->query('SELECT city,name,nation FROM city WHERE city in %li', $spyCities) as $city) {
echo "<option value={$city['city']}"; echo "<option value={$city['city']}";
if($city['city'] == $citylist) { echo " selected"; $valid = 1; } if ($city['city'] == $citylist) {
echo " selected";
$valid = 1;
}
echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】"; echo ">【" . StringUtil::padString($city['name'], 4, '_') . "】";
if ($city['nation'] == 0) echo "공백지"; if ($city['nation'] == 0) echo "공백지";
elseif ($me['nation'] == $city['nation']) echo "본국"; elseif ($me['nation'] == $city['nation']) echo "본국";
@@ -135,7 +150,6 @@ if($myNation['level'] > 0) {
echo "</option>"; echo "</option>";
} }
} }
} }
echo " echo "
@@ -203,16 +217,14 @@ if($showDetailedInfo){
Util::formatListOfBackticks($dbColumns), Util::formatListOfBackticks($dbColumns),
$city['city'] $city['city']
); );
} } else {
else{
$generals = []; $generals = [];
} }
if ($valid) { if ($valid) {
$city['trustText'] = round($city['trust'], 1); $city['trustText'] = round($city['trust'], 1);
$city['popRateText'] = round($city['pop'] / $city['pop_max'] * 100, 2); $city['popRateText'] = round($city['pop'] / $city['pop_max'] * 100, 2);
} } else {
else{
$city['agri'] = '?'; $city['agri'] = '?';
$city['comm'] = '?'; $city['comm'] = '?';
$city['pop'] = '?'; $city['pop'] = '?';
@@ -233,8 +245,7 @@ if($generals){
foreach ($db->queryAllLists( foreach ($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC', 'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no') array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief] ) as [$generalID, $turnIdx, $brief]) {
){
if (!key_exists($generalID, $generalTurnList)) { if (!key_exists($generalID, $generalTurnList)) {
$generalTurnList[$generalID] = []; $generalTurnList[$generalID] = [];
} }
@@ -259,8 +270,7 @@ foreach($generals as $general){
if ($general['nation'] != 0 && $general['nation'] == $myNation['nation']) { if ($general['nation'] != 0 && $general['nation'] == $myNation['nation']) {
$ourGeneral = true; $ourGeneral = true;
} } else {
else{
$ourGeneral = false; $ourGeneral = false;
} }
@@ -297,8 +307,7 @@ foreach($generals as $general){
$crew = $general['crew']; $crew = $general['crew'];
$train = $general['train']; $train = $general['train'];
$atmos = $general['atmos']; $atmos = $general['atmos'];
} } else {
else{
$defenceTrain = 0; $defenceTrain = 0;
$defenceTrainText = ''; $defenceTrainText = '';
$crewType = 0; $crewType = 0;
@@ -323,8 +332,7 @@ foreach($generals as $general){
$turnText[] = "{$turnIdx} : $turn"; $turnText[] = "{$turnIdx} : $turn";
} }
$turnText = join('<br>', $turnText); $turnText = join('<br>', $turnText);
} } else {
else{
$turnText = ''; $turnText = '';
} }
@@ -358,7 +366,9 @@ foreach($generals as $general){
]; ];
} }
$generalsName = array_map(function($gen){return getColoredName($gen['name'], $gen['npc']);}, $generals); $generalsName = array_map(function ($gen) {
return getColoredName($gen['name'], $gen['npc']);
}, $generals);
$enemyCrew = 0; $enemyCrew = 0;
$enemyCnt = 0; $enemyCnt = 0;
@@ -425,15 +435,14 @@ foreach($generalsFormat as $general){
$genDef += 1; $genDef += 1;
$chkDef = true; $chkDef = true;
} }
} }
?> ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<td><?= backButton() ?></td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg2'> <table align=center width=1000 class='tb_layout bg2'>
@@ -506,7 +515,8 @@ foreach($generalsFormat as $general){
<td width=48 align=center class=bg1>훈련</td> <td width=48 align=center class=bg1>훈련</td>
<td width=48 align=center class=bg1>사기</td> <td width=48 align=center class=bg1>사기</td>
<td width=280 align=center class=bg1>명 령</td> <td width=280 align=center class=bg1>명 령</td>
</tr></thead> </tr>
</thead>
<tbody class='bg0' id='general_list'> <tbody class='bg0' id='general_list'>
<?php <?php
foreach ($generalsFormat as $general) { foreach ($generalsFormat as $general) {
@@ -517,8 +527,13 @@ foreach($generalsFormat as $general){
</table> </table>
<?php endif; ?> <?php endif; ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+44 -15
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -29,8 +30,7 @@ $permission = checkSecretPermission($me);
if ($permission < 0) { if ($permission < 0) {
echo '국가에 소속되어있지 않습니다.'; echo '국가에 소속되어있지 않습니다.';
die(); die();
} } else if ($permission < 1) {
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다."; echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die(); die();
} }
@@ -48,6 +48,7 @@ $nationStor->cacheValues(['notice', 'scout_msg', 'available_war_setting_cnt']);
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<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">
@@ -62,6 +63,7 @@ var storedData = <?=Json::encode([
</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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/dipcenter.js') ?> <?= WebUtil::printJS('dist_js/dipcenter.js') ?>
<?= WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css') ?> <?= WebUtil::printCSS('../e_lib/summernote/summernote-bs4.css') ?>
<?= WebUtil::printCSS('dist_css/vendors.css') ?> <?= WebUtil::printCSS('dist_css/vendors.css') ?>
@@ -73,10 +75,14 @@ var storedData = <?=Json::encode([
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>내 무 부<br><?=backButton()?></td></tr> <tr>
<td>내 무 부<br><?= backButton() ?></td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=9 align=center bgcolor=blue>외 교 관 계</td></tr> <tr>
<td colspan=9 align=center bgcolor=blue>외 교 관 계</td>
</tr>
<tr> <tr>
<td width=130 align=center class=bg1>국 가 명</td> <td width=130 align=center class=bg1>국 가 명</td>
<td width=50 align=center class=bg1>국력</td> <td width=50 align=center class=bg1>국력</td>
@@ -172,9 +178,15 @@ if ($budgetricediff > 0) {
?> ?>
<table width=1000 class='tb_layout bg0' style='margin:auto;'> <table width=1000 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>
<tr><td colspan=2 align=center bgcolor=orange>국 가 방 침 &amp; 임관 권유 메시지</td></tr> <td colspan=2 height=10></td>
<tr><td colspan='2'><div id='noticeForm'> </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 class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'> <div style='flex: 1 1 auto;'>
국가 방침 국가 방침
@@ -185,8 +197,12 @@ if ($budgetricediff > 0) {
</div> </div>
<input type='hidden' class='input_form' name='msg' data-global='nationMsg'> <input type='hidden' class='input_form' name='msg' data-global='nationMsg'>
<div class='edit_form viewer'></div> <div class='edit_form viewer'></div>
</div></td></tr> </div>
<tr><td colspan='2'><div id='scoutMsgForm'> </td>
</tr>
<tr>
<td colspan='2'>
<div id='scoutMsgForm'>
<div class='bg1' style="display: flex; justify-content: space-around"> <div class='bg1' style="display: flex; justify-content: space-around">
<div style='flex: 1 1 auto;'> <div style='flex: 1 1 auto;'>
임관 권유 임관 권유
@@ -202,8 +218,12 @@ if ($budgetricediff > 0) {
</div> </div>
</div> </div>
</div></td></tr> </div>
<tr><td colspan=2 align=center bgcolor=green>예 산 &amp; 정 책</td></tr> </td>
</tr>
<tr>
<td colspan=2 align=center bgcolor=green>예 산 &amp; 정 책</td>
</tr>
<tr> <tr>
<td colspan=2> <td colspan=2>
<table width=998 class='tb_layout bg0'> <table width=998 class='tb_layout bg0'>
@@ -275,13 +295,22 @@ if ($nation['war'] == 0) {
</td> </td>
</tr> </tr>
</table> </table>
<tr><td colspan=2>기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.</td></tr> <tr>
<tr><td colspan=2 height=10></td></tr> <td colspan=2>기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.</td>
</tr>
<tr>
<td colspan=2 height=10></td>
</tr>
</form> </form>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+36 -22
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -34,8 +35,7 @@ foreach ($db->queryAllLists('SELECT city, `name`, conflict FROM city WHERE confl
$cityID, $cityID,
$cityName, $cityName,
$rawConflict $rawConflict
]) ]) {
{
$rawConflict = Json::decode($rawConflict); $rawConflict = Json::decode($rawConflict);
if (count($rawConflict) < 2) { if (count($rawConflict) < 2) {
continue; continue;
@@ -85,6 +85,7 @@ $neutralStateCharMap = [
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<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">
@@ -92,6 +93,7 @@ $neutralStateCharMap = [
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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::printJS('dist_js/map.js') ?>
@@ -118,11 +120,15 @@ $(function(){
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>중 원 정 보<br><?=backButton()?></td></tr> <tr>
<td>중 원 정 보<br><?= backButton() ?></td>
</tr>
</table> </table>
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=<?=$nationCnt+1?> align=center bgcolor=blue>외 교 현 황</td></tr> <tr>
<td colspan=<?= $nationCnt + 1 ?> align=center bgcolor=blue>외 교 현 황</td>
</tr>
<tr> <tr>
<td align=center width=130 style=background-color:<?= GameConst::$basecolor2 ?>;>&nbsp;</td> <td align=center width=130 style=background-color:<?= GameConst::$basecolor2 ?>;>&nbsp;</td>
<?php foreach ($nations as $nation) : ?> <?php foreach ($nations as $nation) : ?>
@@ -136,25 +142,28 @@ $(function(){
<td <?= ($me == $myNationID || $you == $myNationID) ? 'style="background-color:' . GameConst::$basecolor3 . '"' : '' ?>><?php <td <?= ($me == $myNationID || $you == $myNationID) ? 'style="background-color:' . GameConst::$basecolor3 . '"' : '' ?>><?php
if ($me == $you) { if ($me == $you) {
echo $sameNationStateChar; echo $sameNationStateChar;
} } else if ($me == $myNationID || $you == $myNationID || $session->userGrade >= 5) {
else if($me==$myNationID || $you==$myNationID || $session->userGrade >= 5){
echo $infomativeStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar; echo $infomativeStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar;
} } else {
else{
echo $neutralStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar; echo $neutralStateCharMap[$diplomacyList[$me][$you]] ?? $defaultStateChar;
} }
?></td> ?></td>
<?php endforeach; ?> <?php endforeach; ?>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<tr><td colspan=<?=$nationCnt+1?> align=center>불가침 : <font color=limegreen>@</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font></td></tr> <tr>
<td colspan=<?= $nationCnt + 1 ?> align=center>불가침 : <font color=limegreen>@</font>, 통상 : ㆍ, 선포 : <font color=magenta>▲</font>, 교전 : <font color=red>★</font>
</td>
</tr>
</table> </table>
<?php if ($realConflict) : ?> <?php if ($realConflict) : ?>
<br> <br>
<table align='center' width=1000 class='tb_layout bg0'> <table align='center' width=1000 class='tb_layout bg0'>
<tr><td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td></tr> <tr>
<td colspan=2 align=center bgcolor=magenta>분 쟁 현 황</td>
</tr>
<?php foreach ($realConflict as list($cityID, $cityName, $conflict)) : ?> <?php foreach ($realConflict as list($cityID, $cityName, $conflict)) : ?>
<tr> <tr>
<td align=center width=48><?= $cityName ?></td> <td align=center width=48><?= $cityName ?></td>
@@ -162,15 +171,11 @@ else{
<table class='tb_layout bg0' style='width:100%;'> <table class='tb_layout bg0' style='width:100%;'>
<?php foreach ($conflict as $item) : ?> <?php foreach ($conflict as $item) : ?>
<tr> <tr>
<td <td width=130 align=right style='color:<?= newColor($item['color']) ?>;background-color:<?= $item['color'] ?>;'><?= $item['name'] ?>&nbsp;</td>
width=130
align=right
style='color:<?=newColor($item['color'])?>;background-color:<?=$item['color']?>;'
><?=$item['name']?>&nbsp;</td>
<td width=48 align=right><?= (float)$item['percent'] ?> %&nbsp;</td> <td width=48 align=right><?= (float)$item['percent'] ?> %&nbsp;</td>
<td width=*><div <td width=*>
style='display:inline-block;width:<?=$item['percent']?>%;background-color:<?=$item['color']?>;' <div style='display:inline-block;width:<?= $item['percent'] ?>%;background-color:<?= $item['color'] ?>;'>&nbsp;</div>
>&nbsp;</div></td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</table> </table>
@@ -178,7 +183,9 @@ else{
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<tr><td colspan=2 height=5 class='bg1'></td></tr> <tr>
<td colspan=2 height=5 class='bg1'></td>
</tr>
</table> </table>
<?php endif; ?> <?php endif; ?>
@@ -186,7 +193,9 @@ else{
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr> <tr>
<td colspan=5 align=center bgcolor=green><font size=3>중 원 지 도</font></td> <td colspan=5 align=center bgcolor=green>
<font size=3>중 원 지 도</font>
</td>
</tr> </tr>
<tr> <tr>
<td width=698 height=420> <td width=698 height=420>
@@ -220,8 +229,13 @@ else{
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+70 -30
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -32,8 +33,7 @@ $permission = checkSecretPermission($me);
if ($permission < 0) { if ($permission < 0) {
echo '국가에 소속되어있지 않습니다.'; echo '국가에 소속되어있지 않습니다.';
die(); die();
} } else if ($permission < 1) {
else if ($permission < 1) {
echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다."; echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다.";
die(); die();
} }
@@ -48,6 +48,7 @@ $templates = new \League\Plates\Engine('templates');
<?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">
@@ -58,13 +59,18 @@ $templates = new \League\Plates\Engine('templates');
<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::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?> <?= WebUtil::printJS('dist_js/common.js') ?>
</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><form name=form1 method=get>정렬순서 : <td>암 행 부<br><?= closeButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=get>정렬순서 :
<select name=type size=1> <select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>자금</option> <option <?= $sel[1] ?? '' ?> value=1>자금</option>
<option <?= $sel[2] ?? '' ?> value=2>군량</option> <option <?= $sel[2] ?? '' ?> value=2>군량</option>
@@ -75,8 +81,10 @@ $templates = new \League\Plates\Engine('templates');
<option <?= $sel[7] ?? '' ?> value=7>턴</option> <option <?= $sel[7] ?? '' ?> value=7>턴</option>
<option <?= $sel[8] ?? '' ?> value=8>부대</option> <option <?= $sel[8] ?? '' ?> value=8>부대</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
$troopName = []; $troopName = [];
@@ -86,14 +94,30 @@ foreach($db->queryAllLists('SELECT troop_leader, name FROM troop WHERE nation=%i
$orderSQL = ''; $orderSQL = '';
switch ($type) { switch ($type) {
case 1: $orderSQL = "order by gold desc"; break; case 1:
case 2: $orderSQL = "order by rice desc"; break; $orderSQL = "order by gold desc";
case 3: $orderSQL = "order by city"; break; break;
case 4: $orderSQL = "order by crewtype desc"; break; case 2:
case 5: $orderSQL = "order by crew desc"; break; $orderSQL = "order by rice desc";
case 6: $orderSQL = "order by killturn"; break; break;
case 7: $orderSQL = "order by turntime"; break; case 3:
case 8: $orderSQL = "order by troop desc"; break; $orderSQL = "order by city";
break;
case 4:
$orderSQL = "order by crewtype desc";
break;
case 5:
$orderSQL = "order by crew desc";
break;
case 6:
$orderSQL = "order by killturn";
break;
case 7:
$orderSQL = "order by turntime";
break;
case 8:
$orderSQL = "order by troop desc";
break;
} }
$generals = $db->query( $generals = $db->query(
@@ -107,8 +131,7 @@ $generalTurnList = [];
foreach ($db->queryAllLists( foreach ($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC', 'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($generals, 'no') array_column($generals, 'no')
) as [$generalID, $turnIdx, $brief] ) as [$generalID, $turnIdx, $brief]) {
){
if (!key_exists($generalID, $generalTurnList)) { if (!key_exists($generalID, $generalTurnList)) {
$generalTurnList[$generalID] = []; $generalTurnList[$generalID] = [];
} }
@@ -213,24 +236,36 @@ foreach($generals as $general){
<table style='width:1000px;margin:5px auto' class='tb_layout bg0'> <table style='width:1000px;margin:5px auto' class='tb_layout bg0'>
<thead> <thead>
<colgroup> <colgroup>
<col style="width:120px;"><col> <col style="width:120px;">
<col style="width:120px;"><col> <col>
<col style="width:120px;"><col> <col style="width:120px;">
<col style="width:120px;"><col> <col>
<col style="width:120px;">
<col>
<col style="width:120px;">
<col>
</colgroup> </colgroup>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td class='bg1'>전체 금</td><td><?=number_format($totalGold)?></td> <td class='bg1'>전체 금</td>
<td class='bg1'>전체 쌀</td><td><?=number_format($totalRice)?></td> <td><?= number_format($totalGold) ?></td>
<td class='bg1'>평균 금</td><td><?=number_format($totalGold/$genCntEff, 2)?></td> <td class='bg1'>전체 쌀</td>
<td class='bg1'>평균 쌀</td><td><?=number_format($totalRice/$genCntEff, 2)?></td> <td><?= number_format($totalRice) ?></td>
<td class='bg1'>평균 금</td>
<td><?= number_format($totalGold / $genCntEff, 2) ?></td>
<td class='bg1'>평균 쌀</td>
<td><?= number_format($totalRice / $genCntEff, 2) ?></td>
</tr> </tr>
<tr> <tr>
<td class='bg1'>전체 병력/장수</td><td><?=number_format($crewTotal)?>/<?=number_format($genCntEff)?></td> <td class='bg1'>전체 병력/장수</td>
<td class='bg1'>훈사 90 병력/장수</td><td><?=number_format($crew90)?>/<?=number_format($gen90)?></td> <td><?= number_format($crewTotal) ?>/<?= number_format($genCntEff) ?></td>
<td class='bg1'>훈사 80 병력/장수</td><td><?=number_format($crew80)?>/<?=number_format($gen80)?></td> <td class='bg1'>훈사 90 병력/장수</td>
<td class='bg1'>훈사 60 병력/장수</td><td><?=number_format($crew60)?>/<?=number_format($gen60)?></td> <td><?= number_format($crew90) ?>/<?= number_format($gen90) ?></td>
<td class='bg1'>훈사 80 병력/장수</td>
<td><?= number_format($crew80) ?>/<?= number_format($gen80) ?></td>
<td class='bg1'>훈사 60 병력/장수</td>
<td><?= number_format($crew60) ?>/<?= number_format($gen60) ?></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -238,8 +273,13 @@ foreach($generals as $general){
<?= $templates->render('generalList', ['generals' => $generals]) ?> <?= $templates->render('generalList', ['generals' => $generals]) ?>
<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>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+72 -27
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -35,6 +36,7 @@ $nation = $db->queryFirstRow('SELECT nation,name,level,color,chief_set from nati
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?> <?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('dist_js/bossInfo.js') ?> <?= WebUtil::printJS('dist_js/bossInfo.js') ?>
<?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?> <?= WebUtil::printCSS('../e_lib/select2/select2.min.css') ?>
@@ -92,26 +94,33 @@ var candidateAuditors = <?=Json::encode(array_map(function($value){
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>인 사 부<br><?=backButton()?></td></tr> <tr>
<td>인 사 부<br><?= backButton() ?></td>
</tr>
</table> </table>
<br> <br>
<?php <?php
$lv = getNationChiefLevel($nation['level']); $lv = getNationChiefLevel($nation['level']);
if($meLevel >= 5) { $btn = "button"; } if ($meLevel >= 5) {
else { $btn = "hidden"; } $btn = "button";
} else {
$btn = "hidden";
}
$level = Util::convertArrayToDict( $level = Util::convertArrayToDict(
$db->query( $db->query(
'SELECT name,officer_level,city,picture,imgsvr,belong from general where nation=%i and officer_level>=%i order by officer_level desc', 'SELECT name,officer_level,city,picture,imgsvr,belong from general where nation=%i and officer_level>=%i order by officer_level desc',
$nationID, $lv $nationID,
$lv
), ),
'officer_level' 'officer_level'
); );
$tigers = $db->query('SELECT value, name $tigers = $db->query(
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "killnum" AND value > 0 ORDER BY value DESC LIMIT 5', WHERE rank_data.nation_id = %i AND rank_data.type = "killnum" AND value > 0 ORDER BY value DESC LIMIT 5',
$nationID $nationID
@@ -121,7 +130,8 @@ $tigerstr = join(', ', array_map(function($arr){
return "{$arr['name']}【{$number}】"; return "{$arr['name']}【{$number}】";
}, $tigers)); }, $tigers));
$eagles = $db->query('SELECT value, name $eagles = $db->query(
'SELECT value, name
FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no FROM rank_data LEFT JOIN general ON rank_data.general_id = general.no
WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7', WHERE rank_data.nation_id = %i AND rank_data.type = "firenum" AND value > 0 ORDER BY value DESC LIMIT 7',
$nationID $nationID
@@ -140,17 +150,26 @@ $eaglestr = join(', ', array_map(function($arr){
</tr> </tr>
<?php <?php
for ($i = 12; $i >= $lv; $i -= 2) { for ($i = 12; $i >= $lv; $i -= 2) {
$i1 = $i; $i2 = $i - 1; $i1 = $i;
$i2 = $i - 1;
$imageTemp1 = GetImageURL($level[$i1]['imgsvr'] ?? 0); $imageTemp1 = GetImageURL($level[$i1]['imgsvr'] ?? 0);
$imageTemp2 = GetImageURL($level[$i2]['imgsvr'] ?? 0); $imageTemp2 = GetImageURL($level[$i2]['imgsvr'] ?? 0);
?> ?>
<tr> <tr>
<td width=98 align=center class='bg1'><font size=4><?=getOfficerLevelText($i1, $nation['level'])?></font></td> <td width=98 align=center class='bg1'>
<font size=4><?= getOfficerLevelText($i1, $nation['level']) ?></font>
</td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp1 ?>/<?= $level[$i1]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td> <td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp1 ?>/<?= $level[$i1]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i1]['name']??'-'?>(<?=$level[$i1]['belong']??'-'?>년)</font></td> <td width=332>
<td width=98 align=center class='bg1'><font size=4><?=getOfficerLevelText($i2, $nation['level'])?></font></td> <font size=4><?= $level[$i1]['name'] ?? '-' ?>(<?= $level[$i1]['belong'] ?? '-' ?>년)</font>
</td>
<td width=98 align=center class='bg1'>
<font size=4><?= getOfficerLevelText($i2, $nation['level']) ?></font>
</td>
<td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp2 ?>/<?= $level[$i2]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td> <td width=64 class='generalIcon' height=64 style='background:no-repeat center url("<?= $imageTemp2 ?>/<?= $level[$i2]['picture'] ?? 'default.jpg' ?>");background-size:64px;'></td>
<td width=332><font size=4><?=$level[$i2]['name']??'-'?>(<?=$level[$i2]['belong']??'-'?>년)</font></td> <td width=332>
<font size=4><?= $level[$i2]['name'] ?? '-' ?>(<?= $level[$i2]['belong'] ?? '-' ?>년)</font>
</td>
</tr> </tr>
<?php <?php
} }
@@ -166,8 +185,12 @@ for($i=12; $i >= $lv; $i-=2) {
</tr> </tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td colspan=6 height=5></td></tr> <tr>
<tr><td colspan=2 align=center bgcolor=red>추 방</td></tr> <td colspan=6 height=5></td>
</tr>
<tr>
<td colspan=2 align=center bgcolor=red>추 방</td>
</tr>
<tr> <tr>
<td width=498 align=right class='bg1'>대상 장수</td> <td width=498 align=right class='bg1'>대상 장수</td>
<td width=498> <td width=498>
@@ -177,8 +200,7 @@ if($meLevel >= 5){
$candidateStrength = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and strength>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin); $candidateStrength = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and strength>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
$candidateIntel = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and intel>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin); $candidateIntel = $db->query('SELECT no,name,officer_level,city,npc from general where nation=%i and officer_level!=12 and intel>=%i order by npc,binary(name)', $nationID, GameConst::$chiefStatMin);
$candidateAny = $db->query('SELECT no,name,officer_level,city,npc,leadership,strength,intel,killturn from general where nation=%i and officer_level!=12 order by npc,binary(name)', $nationID); //추방 때문에 조금 더 김 $candidateAny = $db->query('SELECT no,name,officer_level,city,npc,leadership,strength,intel,killturn from general where nation=%i and officer_level!=12 order by npc,binary(name)', $nationID); //추방 때문에 조금 더 김
} } else {
else{
$candidateStrength = []; $candidateStrength = [];
$candidateIntel = []; $candidateIntel = [];
$candidateAny = []; $candidateAny = [];
@@ -239,7 +261,6 @@ if($meLevel >= 5 && !isOfficerSet($nation['chief_set'], 11)) {
if (key_exists(11, $level)) { if (key_exists(11, $level)) {
echo "{$level[11]['name']} 【" . CityConst::byID($level[11]['city'])->name . "】"; echo "{$level[11]['name']} 【" . CityConst::byID($level[11]['city'])->name . "】";
} }
} }
echo " echo "
</td> </td>
@@ -247,7 +268,9 @@ echo "
"; ";
for ($i = 10; $i >= $lv; $i--) { for ($i = 10; $i >= $lv; $i--) {
if($i % 2 == 0) { echo "<tr>"; } if ($i % 2 == 0) {
echo "<tr>";
}
$officerLevelText = getOfficerLevelText($i, $nation['level']); $officerLevelText = getOfficerLevelText($i, $nation['level']);
echo " echo "
<td width=98 align=right class='bg1'>{$officerLevelText}</td> <td width=98 align=right class='bg1'>{$officerLevelText}</td>
@@ -280,7 +303,9 @@ for($i=10; $i >= $lv; $i--) {
} }
} }
echo "</td>"; echo "</td>";
if($i % 2 == 1) { echo "</tr>"; } if ($i % 2 == 1) {
echo "</tr>";
}
} }
echo " echo "
<tr><td colspan=4>※ <font color=red>빨간색</font>은 현재 임명중인 장수, <font color=orange>노란색</font>은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr> <tr><td colspan=4>※ <font color=red>빨간색</font>은 현재 임명중인 장수, <font color=orange>노란색</font>은 다른 관직에 임명된 장수, 하얀색은 일반 장수를 뜻합니다.</td></tr>
@@ -291,8 +316,12 @@ echo "
if ($meLevel == 12) : if ($meLevel == 12) :
?> ?>
<table align='center' width='1000' class='tb_layout bg0'> <table align='center' width='1000' class='tb_layout bg0'>
<tr><td colspan='4' height='5'></td></tr> <tr>
<tr><td colspan='4' align='center' bgcolor='purple'>외 교 권 자 임 명</td></tr> <td colspan='4' height='5'></td>
</tr>
<tr>
<td colspan='4' align='center' bgcolor='purple'>외 교 권 자 임 명</td>
</tr>
<tr> <tr>
<td width=98 align=right class='bg1'>외교권자</td> <td width=98 align=right class='bg1'>외교권자</td>
<td width=398> <td width=398>
@@ -312,7 +341,9 @@ if($meLevel == 12):
endif; endif;
?> ?>
<table align=center width=1000 id='officer_list' class='tb_layout bg0'> <table align=center width=1000 id='officer_list' class='tb_layout bg0'>
<tr><td colspan=5 height=5></td></tr> <tr>
<td colspan=5 height=5></td>
</tr>
<?php <?php
if ($meLevel >= 5) { if ($meLevel >= 5) {
$officerLevelText = getOfficerLevelText(4, $nation['level']); $officerLevelText = getOfficerLevelText(4, $nation['level']);
@@ -494,9 +525,16 @@ foreach($db->query('SELECT city,name,level,region,officer_set from city where na
$cityOfficerList = $officerList[$cityID] ?? []; $cityOfficerList = $officerList[$cityID] ?? [];
?> ?>
<?php if ($region != $city['region']) : ?> <?php if ($region != $city['region']) : ?>
<tr><td colspan=5 height=3 class='bg1'></td></tr> <tr>
<tr><td colspan=5 class='bg1'><font size=4 color=skyblue> 【 <?=CityConst::$regionMap[$city['region']]?> 】 </font></td></tr> <td colspan=5 height=3 class='bg1'></td>
<?php endif; $region = $city['region']; ?> </tr>
<tr>
<td colspan=5 class='bg1'>
<font size=4 color=skyblue> 【 <?= CityConst::$regionMap[$city['region']] ?> 】 </font>
</td>
</tr>
<?php endif;
$region = $city['region']; ?>
<tr> <tr>
<td width=78 align=center style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'>【<?= $citylevel[$city['level']] ?>】</td> <td width=78 align=center style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'>【<?= $citylevel[$city['level']] ?>】</td>
<td width=78 align=right style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'><?= $city['name'] ?>&nbsp;&nbsp;</td> <td width=78 align=right style='color:<?= $textColor ?>;background-color:<?= $nationColor ?>;font-size:1.2em;'><?= $city['name'] ?>&nbsp;&nbsp;</td>
@@ -515,12 +553,19 @@ $officer = $cityOfficerList[$officerLevel];
} }
?> ?>
<tr><td colspan=5>※ <font color=orange>노란색</font>은 변경 불가능, 하얀색은 변경 가능 관직입니다.</td></tr> <tr>
<td colspan=5>※ <font color=orange>노란색</font>은 변경 불가능, 하얀색은 변경 가능 관직입니다.</td>
</tr>
</table> </table>
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+74 -20
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -40,14 +41,19 @@ $sel = [$type => "selected"];
<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::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/extExpandCity.js') ?> <?= WebUtil::printJS('dist_js/extExpandCity.js') ?>
</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><?=backButton()?></td></tr> <tr>
<tr><td><form name=form1 method=post>정렬순서 : <td>세 력 도 시<br><?= backButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1> <select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>기본</option> <option <?= $sel[1] ?? '' ?> value=1>기본</option>
<option <?= $sel[2] ?? '' ?> value=2>인구</option> <option <?= $sel[2] ?? '' ?> value=2>인구</option>
@@ -62,8 +68,10 @@ $sel = [$type => "selected"];
<option <?= $sel[11] ?? '' ?> value=11>지역</option> <option <?= $sel[11] ?? '' ?> value=11>지역</option>
<option <?= $sel[12] ?? '' ?> value=12>규모</option> <option <?= $sel[12] ?? '' ?> value=12>규모</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
@@ -83,30 +91,71 @@ $cityList = $db->query('SELECT *,pop/pop_max as poprate from city where nation=%
switch ($type) { switch ($type) {
case 1: break; case 1:
case 2: usort($cityList, function($lhs, $rhs){return $rhs['pop'] <=> $lhs['pop'];}); break; break;
case 3: usort($cityList, function($lhs, $rhs){return $rhs['poprate'] <=> $lhs['poprate'];}); break; case 2:
case 4: usort($cityList, function($lhs, $rhs){return $rhs['trust'] <=> $lhs['trust'];}); break; usort($cityList, function ($lhs, $rhs) {
case 5: usort($cityList, function($lhs, $rhs){return $rhs['agri'] <=> $lhs['agri'];}); break; return $rhs['pop'] <=> $lhs['pop'];
case 6: usort($cityList, function($lhs, $rhs){return $rhs['comm'] <=> $lhs['comm'];}); break; });
case 7: usort($cityList, function($lhs, $rhs){return $rhs['secu'] <=> $lhs['secu'];}); break; break;
case 8: usort($cityList, function($lhs, $rhs){return $rhs['def'] <=> $lhs['def'];}); break; case 3:
case 9: usort($cityList, function($lhs, $rhs){return $rhs['wall'] <=> $lhs['wall'];}); break; usort($cityList, function ($lhs, $rhs) {
case 10: usort($cityList, function($lhs, $rhs){return $rhs['trade'] <=> $lhs['trade'];}); break; return $rhs['poprate'] <=> $lhs['poprate'];
case 11: usort($cityList, function($lhs, $rhs){ });
break;
case 4:
usort($cityList, function ($lhs, $rhs) {
return $rhs['trust'] <=> $lhs['trust'];
});
break;
case 5:
usort($cityList, function ($lhs, $rhs) {
return $rhs['agri'] <=> $lhs['agri'];
});
break;
case 6:
usort($cityList, function ($lhs, $rhs) {
return $rhs['comm'] <=> $lhs['comm'];
});
break;
case 7:
usort($cityList, function ($lhs, $rhs) {
return $rhs['secu'] <=> $lhs['secu'];
});
break;
case 8:
usort($cityList, function ($lhs, $rhs) {
return $rhs['def'] <=> $lhs['def'];
});
break;
case 9:
usort($cityList, function ($lhs, $rhs) {
return $rhs['wall'] <=> $lhs['wall'];
});
break;
case 10:
usort($cityList, function ($lhs, $rhs) {
return $rhs['trade'] <=> $lhs['trade'];
});
break;
case 11:
usort($cityList, function ($lhs, $rhs) {
$cmpTrust = $lhs['region'] <=> $rhs['region']; $cmpTrust = $lhs['region'] <=> $rhs['region'];
if ($cmpTrust != 0) { if ($cmpTrust != 0) {
return $cmpTrust; return $cmpTrust;
} }
return $rhs['level'] <=> $lhs['level']; return $rhs['level'] <=> $lhs['level'];
}); break; });
case 12: usort($cityList, function($lhs, $rhs){ break;
case 12:
usort($cityList, function ($lhs, $rhs) {
$cmpTrust = $rhs['level'] <=> $lhs['level']; $cmpTrust = $rhs['level'] <=> $lhs['level'];
if ($cmpTrust != 0) { if ($cmpTrust != 0) {
return $cmpTrust; return $cmpTrust;
} }
return $lhs['region'] <=> $rhs['region']; return $lhs['region'] <=> $rhs['region'];
}); break; });
break;
} }
$region = 0; $region = 0;
@@ -200,9 +249,14 @@ foreach($cityList as $city){
?> ?>
<table align=center width=1000 class='tb_layout bg0 anchor'> <table align=center width=1000 class='tb_layout bg0 anchor'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
<div id="helper_genlist" style="display:none;"></div> <div id="helper_genlist" style="display:none;"></div>
</html> </html>
+30 -11
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -49,14 +50,19 @@ if($gameStor->isunited){
<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::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?> <?= WebUtil::printJS('dist_js/common.js') ?>
</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><?=backButton()?></td></tr> <tr>
<tr><td><form name=form1 method=post>정렬순서 : <td>세 력 장 수<br><?= backButton() ?></td>
</tr>
<tr>
<td>
<form name=form1 method=post>정렬순서 :
<select name=type size=1> <select name=type size=1>
<option <?= $sel[1] ?? '' ?> value=1>관직</option> <option <?= $sel[1] ?? '' ?> value=1>관직</option>
<option <?= $sel[2] ?? '' ?> value=2>계급</option> <option <?= $sel[2] ?? '' ?> value=2>계급</option>
@@ -74,8 +80,10 @@ if($gameStor->isunited){
<option <?= $sel[14] ?? '' ?> value=14>사관</option> <option <?= $sel[14] ?? '' ?> value=14>사관</option>
<option <?= $sel[15] ?? '' ?> value=15>NPC</option> <option <?= $sel[15] ?? '' ?> value=15>NPC</option>
</select> </select>
<input type=submit value='정렬하기'></form> <input type=submit value='정렬하기'>
</td></tr> </form>
</td>
</tr>
</table> </table>
<?php <?php
@@ -142,9 +150,13 @@ foreach($generalList as $general){
$intel = "{$general['intel']}"; $intel = "{$general['intel']}";
} }
if($general['npc'] >= 2) { $name = "<font color=cyan>{$general['name']}</font>"; } if ($general['npc'] >= 2) {
elseif($general['npc'] == 1) { $name = "<font color=skyblue>{$general['name']}</font>"; } $name = "<font color=cyan>{$general['name']}</font>";
else { $name = "{$general['name']}"; } } elseif ($general['npc'] == 1) {
$name = "<font color=skyblue>{$general['name']}</font>";
} else {
$name = "{$general['name']}";
}
if (key_exists($general['owner'], $ownerNameList)) { if (key_exists($general['owner'], $ownerNameList)) {
$name = $name . '<br><small>(' . $ownerNameList[$general['owner']] . ')</small>'; $name = $name . '<br><small>(' . $ownerNameList[$general['owner']] . ')</small>';
@@ -155,7 +167,9 @@ foreach($generalList as $general){
<tr> <tr>
<td align=center class='generalIcon' style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td> <td align=center class='generalIcon' style='background:no-repeat center url(\"{$imageTemp}/{$general['picture']}\");background-size:64px;' height=64></td>
<td align=center>$name</td> <td align=center>$name</td>
<td align=center>"; echo getOfficerLevelText($general['officer_level'], $nationLevel); echo "</td> <td align=center>";
echo getOfficerLevelText($general['officer_level'], $nationLevel);
echo "</td>
<td align=center>" . getDed($general['dedication']) . "</td> <td align=center>" . getDed($general['dedication']) . "</td>
<td align=center>" . getHonor($general['experience']) . "</td> <td align=center>" . getHonor($general['experience']) . "</td>
<td align=center>" . getBill($general['dedication']) . "</td> <td align=center>" . getBill($general['dedication']) . "</td>
@@ -167,7 +181,8 @@ foreach($generalList as $general){
<td align=center>" . displayCharInfo($general['personal']) . "</td> <td align=center>" . displayCharInfo($general['personal']) . "</td>
<td align=center>" . displaySpecialDomesticInfo($general['special']) . " / " . displaySpecialWarInfo($general['special2']) . "</td> <td align=center>" . displaySpecialDomesticInfo($general['special']) . " / " . displaySpecialWarInfo($general['special2']) . "</td>
<td align=center>{$general['belong']}</td> <td align=center>{$general['belong']}</td>
<td align=center>{$general['connect']}"; echo "<br>(".getConnect($general['connect']).")</td> <td align=center>{$general['connect']}";
echo "<br>(" . getConnect($general['connect']) . ")</td>
</tr>"; </tr>";
} }
echo " echo "
@@ -177,8 +192,12 @@ foreach($generalList as $general){
?> ?>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
+12 -5
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -29,6 +30,7 @@ if($nationID == 0) {
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -38,7 +40,9 @@ if($nationID == 0) {
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>세 력 정 보<br><?=backButton()?></td></tr> <tr>
<td>세 력 정 보<br><?= backButton() ?></td>
</tr>
</table> </table>
<br> <br>
<?php <?php
@@ -55,8 +59,7 @@ foreach($cityList as $city){
$maxPop += $city['pop_max']; $maxPop += $city['pop_max'];
if ($city['city'] == $nation['capital']) { if ($city['city'] == $nation['capital']) {
$cityNames[] = "<span style='color:cyan;'>{$city['name']}</span>"; $cityNames[] = "<span style='color:cyan;'>{$city['name']}</span>";
} } else {
else{
$cityNames[] = $city['name']; $cityNames[] = $city['name'];
} }
} }
@@ -152,8 +155,12 @@ if ($budgetricediff > 0) {
<br> <br>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
+25 -7
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -43,6 +44,7 @@ $use_auto_nation_turn = $me->getAuxVar('use_auto_nation_turn')??1;
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<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">
@@ -53,6 +55,7 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
</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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?> <?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('dist_js/myPage.js') ?> <?= WebUtil::printJS('dist_js/myPage.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
@@ -62,7 +65,9 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
<body> <body>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td>내 정 보<br><?=backButton()?></td></tr> <tr>
<td>내 정 보<br><?= backButton() ?></td>
</tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr> <tr>
@@ -123,8 +128,12 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
</td> </td>
</tr> </tr>
<tr> <tr>
<td align=center class='bg1'><font color=skyblue size=3>개인 기록</font></td> <td align=center class='bg1'>
<td align=center class='bg1'><font color=orange size=3>전투 기록</font></td> <font color=skyblue size=3>개인 기록</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>전투 기록</font>
</td>
</tr> </tr>
<tr> <tr>
<td valign=top> <td valign=top>
@@ -141,8 +150,12 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
</td> </td>
</tr> </tr>
<tr> <tr>
<td align=center class='bg1'><font color=skyblue size=3>장수 열전</font></td> <td align=center class='bg1'>
<td align=center class='bg1'><font color=orange size=3>전투 결과</font></td> <font color=skyblue size=3>장수 열전</font>
</td>
<td align=center class='bg1'>
<font color=orange size=3>전투 결과</font>
</td>
</tr> </tr>
<tr> <tr>
<td valign=top> <td valign=top>
@@ -157,8 +170,13 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
</tr> </tr>
</table> </table>
<table align=center width=1000 class='tb_layout bg0'> <table align=center width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?></td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?></td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+20 -9
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -14,8 +15,7 @@ function die_redirect()
global $isChiefTurn; global $isChiefTurn;
if (!$isChiefTurn) { if (!$isChiefTurn) {
header('location:index.php', true, 303); header('location:index.php', true, 303);
} } else {
else{
header('location:b_chiefcenter.php', true, 303); header('location:b_chiefcenter.php', true, 303);
} }
die(); die();
@@ -46,8 +46,7 @@ $general = General::createGeneralObjFromDB($session->generalID);
if (!$isChiefTurn) { if (!$isChiefTurn) {
$commandObj = buildGeneralCommandClass($commandType, $general, $env); $commandObj = buildGeneralCommandClass($commandType, $general, $env);
} } else {
else{
if ($general->getVar('officer_level') < 5) { if ($general->getVar('officer_level') < 5) {
die_redirect(); die_redirect();
} }
@@ -70,6 +69,7 @@ $cssList = $commandObj->getCSSFiles();
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= $commandObj->getName() ?></title> <title><?= $commandObj->getName() ?></title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -77,6 +77,7 @@ $cssList = $commandObj->getCSSFiles();
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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') ?> <?= WebUtil::printJS('dist_js/processing.js') ?>
@@ -103,23 +104,33 @@ foreach($cssList as $css){
} }
?> ?>
</head> </head>
<body class="img_back"> <body class="img_back">
<table class="tb_layout bg0" style="width:1000px;margin:auto;"> <table class="tb_layout bg0" style="width:1000px;margin:auto;">
<tr><td class="bg1" style='text-align:center;'><?=$commandObj->getName()?></td></tr> <tr>
<tr><td> <td class="bg1" style='text-align:center;'><?= $commandObj->getName() ?></td>
</tr>
<tr>
<td>
<input type=button value='돌아가기' onclick="history.back();"><br> <input type=button value='돌아가기' onclick="history.back();"><br>
</td></tr></table> </td>
</tr>
</table>
<div class="tb_layout bg0" style="width:1000px;margin:auto;padding-bottom:2em;border:solid 1px gray;"> <div class="tb_layout bg0" style="width:1000px;margin:auto;padding-bottom:2em;border:solid 1px gray;">
<?= $commandObj->getForm() ?> <?= $commandObj->getForm() ?>
</div> </div>
<table class="tb_layout bg0" style="width:1000px;margin:auto;"> <table class="tb_layout bg0" style="width:1000px;margin:auto;">
<tr><td> <tr>
<td>
<input type=button value='돌아가기' onclick="history.back();"><br> <input type=button value='돌아가기' onclick="history.back();"><br>
<?= banner() ?> <?= banner() ?>
</td></tr></table> </td>
</tr>
</table>
</body> </body>
</html> </html>
+41 -16
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -24,8 +25,7 @@ foreach($db->query('SELECT troop_leader,name FROM troop WHERE nation = %i', $me[
foreach ($db->query( foreach ($db->query(
'SELECT no,name,turntime,troop,city FROM general WHERE troop!=0 AND nation = %i ORDER BY turntime ASC', 'SELECT no,name,turntime,troop,city FROM general WHERE troop!=0 AND nation = %i ORDER BY turntime ASC',
$me['nation'] $me['nation']
) as $general ) as $general) {
){
if (!key_exists($general['troop'], $troops)) { if (!key_exists($general['troop'], $troops)) {
trigger_error("올바르지 않은 부대 소속 {$general['no']}, {$general['name']} : {$general['troop']}"); trigger_error("올바르지 않은 부대 소속 {$general['no']}, {$general['name']} : {$general['troop']}");
continue; continue;
@@ -46,8 +46,7 @@ if($troops){
foreach ($db->queryAllLists( foreach ($db->queryAllLists(
'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC', 'SELECT general_id, turn_idx, brief FROM general_turn WHERE general_id IN %li AND turn_idx < 5 ORDER BY general_id ASC, turn_idx ASC',
array_column($troopLeaders, 'no') array_column($troopLeaders, 'no')
) as [$generalID, $turnIdx, $brief] ) as [$generalID, $turnIdx, $brief]) {
){
if (!key_exists($generalID, $generalTurnList)) { if (!key_exists($generalID, $generalTurnList)) {
$generalTurnList[$generalID] = []; $generalTurnList[$generalID] = [];
} }
@@ -80,6 +79,7 @@ uasort($troops, function($lhs, $rhs){
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<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">
@@ -88,6 +88,7 @@ uasort($troops, function($lhs, $rhs){
<?= WebUtil::preloadJS('dist_js/troop.js') ?> <?= 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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.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') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
@@ -101,7 +102,9 @@ uasort($troops, function($lhs, $rhs){
<body> <body>
<div style="width:1000px;margin:auto;"> <div style="width:1000px;margin:auto;">
<table width=1000 class='tb_layout bg0'> <table width=1000 class='tb_layout bg0'>
<tr><td>부 대 편 성<br><?=backButton()?></td></tr> <tr>
<td>부 대 편 성<br><?= backButton() ?></td>
</tr>
</table> </table>
<table id="troop_list" class='tb_layout bg0'> <table id="troop_list" class='tb_layout bg0'>
<thead> <thead>
@@ -113,14 +116,18 @@ uasort($troops, function($lhs, $rhs){
<td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td> <td width=130 class='bg1 center' style=table-layout:fixed;word-break:break-all;>부대장행동</td>
</tr> </tr>
</thead> </thead>
<tfoot><tr><td colspan='5'> <tfoot>
<tr>
<td colspan='5'>
<?php if (!$troops) : ?> <?php if (!$troops) : ?>
<?php elseif ($me['troop'] == 0) : ?> <?php elseif ($me['troop'] == 0) : ?>
<input type=button id='btnJoinTroop' value='부 대 가 입'> <input type=button id='btnJoinTroop' value='부 대 가 입'>
<?php else : ?> <?php else : ?>
<input type=button id="btnLeaveTroop" value='부 대 탈 퇴'> <input type=button id="btnLeaveTroop" value='부 대 탈 퇴'>
<?php endif; ?> <?php endif; ?>
</td></tr></tfoot> </td>
</tr>
</tfoot>
<tbody> <tbody>
<?php <?php
foreach ($troops as $troopNo => $troop) { foreach ($troops as $troopNo => $troop) {
@@ -154,9 +161,15 @@ foreach ($troops as $troopNo=>$troop) {
<td rowspan=2><?= $troopLeader['turnText'] ?></td> <td rowspan=2><?= $troopLeader['turnText'] ?></td>
</tr> </tr>
<tr> <tr>
<td align=center><font size=2>【턴】 <?=substr($troopLeader['turntime'], 14, 5)?></font></td> <td align=center>
<td align=center><font size=1><?=$troopLeader['name']?></font></td></tr> <font size=2>【턴】 <?= substr($troopLeader['turntime'], 14, 5) ?></font>
<tr><td colspan=5> </td>
<td align=center>
<font size=1><?= $troopLeader['name'] ?></font>
</td>
</tr>
<tr>
<td colspan=5>
<?php else : ?> <?php else : ?>
<tr> <tr>
@@ -180,11 +193,18 @@ foreach ($troops as $troopNo=>$troop) {
<?php endif; ?> <?php endif; ?>
</td> </td>
</tr> </tr>
<tr><td align=center><font size=2>【턴】 <?=substr($troopLeader['turntime'], 14, 5)?></font></td> <tr>
<td align=center><font size=1><?=$troopLeader['name']?></font></td></tr> <td align=center>
<tr><td colspan=5></td></tr> <font size=2>【턴】 <?= substr($troopLeader['turntime'], 14, 5) ?></font>
</td>
<td align=center>
<font size=1><?= $troopLeader['name'] ?></font>
</td>
</tr>
<tr>
<td colspan=5></td>
</tr>
<?php endif; <?php endif;
} //foreach ($troops as $troopNo=>$troop) { } //foreach ($troops as $troopNo=>$troop) {
?> ?>
@@ -205,10 +225,15 @@ foreach ($troops as $troopNo=>$troop) {
</table> </table>
<table width=1000 class='tb_layout bg0'> <table width=1000 class='tb_layout bg0'>
<tr><td><?=backButton()?></td></tr> <tr>
<tr><td><?=banner()?> </td></tr> <td><?= backButton() ?></td>
</tr>
<tr>
<td><?= banner() ?> </td>
</tr>
</table> </table>
</div> </div>
<?= WebUtil::printJS('dist_js/troop.js') ?> <?= WebUtil::printJS('dist_js/troop.js') ?>
</body> </body>
</html> </html>
+46 -14
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -18,8 +19,7 @@ if($me){
$generalID = $me['no']; $generalID = $me['no'];
$nationID = $me['nation']; $nationID = $me['nation'];
$city = $db->queryFirstRow('SELECT city, level, def, wall FROM city WHERE city = %i', $me['city']); $city = $db->queryFirstRow('SELECT city, level, def, wall FROM city WHERE city = %i', $me['city']);
} } else {
else{
$generalID = 0; $generalID = 0;
$nationID = 0; $nationID = 0;
$city = [ $city = [
@@ -32,14 +32,14 @@ else{
if ($nationID) { if ($nationID) {
$nation = $db->queryFirstRow('SELECT level, type, tech, capital FROM nation WHERE nation = %i', $nationID); $nation = $db->queryFirstRow('SELECT level, type, tech, capital FROM nation WHERE nation = %i', $nationID);
} } else {
else{
$nation = null; $nation = null;
} }
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 전투 시뮬레이터</title> <title><?= UniqueConst::$serverName ?>: 전투 시뮬레이터</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -51,6 +51,7 @@ else{
<?= 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/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) ?>;
@@ -58,6 +59,7 @@ var nation = <?=Json::encode($nation)?>;
</script> </script>
<?= WebUtil::printJS('dist_js/battle_simulator.js') ?> <?= WebUtil::printJS('dist_js/battle_simulator.js') ?>
</head> </head>
<body> <body>
<div id="container"> <div id="container">
<div class="card mb-3"> <div class="card mb-3">
@@ -374,7 +376,9 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<select class="custom-select form_crewtype"> <select class="custom-select form_crewtype">
<?php foreach (GameUnitConst::all() as $crewTypeID => $crewType) : ?> <?php foreach (GameUnitConst::all() as $crewTypeID => $crewType) : ?>
<?php if($crewType->armType === GameUnitConst::T_CASTLE){ continue; } ?> <?php if ($crewType->armType === GameUnitConst::T_CASTLE) {
continue;
} ?>
<option value="<?= $crewTypeID ?>"><?= $crewType->name ?></option> <option value="<?= $crewTypeID ?>"><?= $crewType->name ?></option>
<?php endforeach; ?> <?php endforeach; ?>
</select> </select>
@@ -489,15 +493,42 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
<table class="table"> <table class="table">
<tbody id="battle_result_summary"> <tbody id="battle_result_summary">
<tr><th style='width:18ch;'>전투 일시</th><td id='result_datetime'></td></tr> <tr>
<tr><th>전투 횟수</th><td id='result_warcnt'></td></tr> <th style='width:18ch;'>전투 일시</th>
<tr><th>전투 페이즈</th><td id='result_phase'></td></tr> <td id='result_datetime'></td>
<tr><th>준 피해</th><td><span id='result_killed'>0</span><span id='result_varKilled'> (<span id='result_minKilled'>0</span> ~ <span id='result_maxKilled'>0</span>)</span></td></tr> </tr>
<tr><th>받은 피해</th><td><span id='result_dead'>0</span><span id='result_varDead'> (<span id='result_minDead'>0</span> ~ <span id='result_maxDead'>0</span>)</span></td></tr> <tr>
<tr><th>출병자 군량 소모</th><td id='result_attackerRice'></td></tr> <th>전투 횟수</th>
<tr><th>수비자 군량 소모</th><td id='result_defenderRice'></td></tr> <td id='result_warcnt'></td>
<tr><th>공격자 스킬</th><td id='result_attackerSkills'></td></tr> </tr>
<tr class='result_defenderSkills'><th>수비자1 스킬</th><td></td></tr> <tr>
<th>전투 페이즈</th>
<td id='result_phase'></td>
</tr>
<tr>
<th>준 피해</th>
<td><span id='result_killed'>0</span><span id='result_varKilled'> (<span id='result_minKilled'>0</span> ~ <span id='result_maxKilled'>0</span>)</span></td>
</tr>
<tr>
<th>받은 피해</th>
<td><span id='result_dead'>0</span><span id='result_varDead'> (<span id='result_minDead'>0</span> ~ <span id='result_maxDead'>0</span>)</span></td>
</tr>
<tr>
<th>출병자 군량 소모</th>
<td id='result_attackerRice'></td>
</tr>
<tr>
<th>수비자 군량 소모</th>
<td id='result_defenderRice'></td>
</tr>
<tr>
<th>공격자 스킬</th>
<td id='result_attackerSkills'></td>
</tr>
<tr class='result_defenderSkills'>
<th>수비자1 스킬</th>
<td></td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
@@ -545,4 +576,5 @@ var nation = <?=Json::encode($nation)?>;
</div> </div>
</div> </div>
</body> </body>
</html> </html>
+1
View File
@@ -118,6 +118,7 @@ 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('dist_js/vendors.js') ?> <?= 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::printJS('dist_js/vendors_vue.js', true) ?> <?= WebUtil::printJS('dist_js/vendors_vue.js', true) ?>
<?= WebUtil::printJS('dist_js/v_main.js', true) ?> <?= WebUtil::printJS('dist_js/v_main.js', true) ?>
+30 -8
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -23,6 +24,7 @@ if($session->userGrade < 5 && !$allowReset){
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>설치</title> <title>설치</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -30,10 +32,12 @@ if($session->userGrade < 5 && !$allowReset){
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/install.js') ?> <?= WebUtil::printJS('dist_js/install.js') ?>
<?= WebUtil::printCSS('dist_css/common.css') ?> <?= WebUtil::printCSS('dist_css/common.css') ?>
<?= WebUtil::printCSS('css/install.css') ?> <?= WebUtil::printCSS('css/install.css') ?>
</head> </head>
<body> <body>
<div class="container" style="min-width:720px;"> <div class="container" style="min-width:720px;">
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1> <h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1>
@@ -354,25 +358,43 @@ if($session->userGrade < 5 && !$allowReset){
</div> </div>
<h4 class="card-header">시나리오 정보</h4> <h4 class="card-header">시나리오 정보</h4>
<table class="table table-striped"> <table class="table table-striped">
<colgroup><col style="width:100px;"><col></colgroup> <colgroup>
<col style="width:100px;">
<col>
</colgroup>
<thead> <thead>
<tr><th>설정</th><th>값</th> <tr>
<th>설정</th>
<th>값</th>
</thead> </thead>
<tbody> <tbody>
<tr><th>시작 연도</th><td ><span id="scenario_begin">180년</span><small id="scenario_begin_with_sync"></small></td></tr> <tr>
<tr><th>NPC 수</th><td><span id="scenario_npc"></span><span id="scenario_npc_extend"></span></td></tr> <th>시작 연도</th>
<tr><th>국가</th><td><span id="scenario_nation"></span></td></tr> <td><span id="scenario_begin">180년</span><small id="scenario_begin_with_sync"></small></td>
</tr>
<tr>
<th>NPC 수</th>
<td><span id="scenario_npc"></span><span id="scenario_npc_extend"></span></td>
</tr>
<tr>
<th>국가</th>
<td><span id="scenario_nation"></span></td>
</tr>
</tbody> </tbody>
<tfoot> <tfoot>
<tr><td colspan="2"> <tr>
<td colspan="2">
</td></tr> </td>
</tr>
</tfoot> </tfoot>
</table> </table>
</div><!--GAME 폼 끝--> </div>
<!--GAME 폼 끝-->
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
+7 -1
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -16,6 +17,7 @@ if($session->userGrade == 5){
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>설치</title> <title>설치</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -23,11 +25,13 @@ if($session->userGrade == 5){
<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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/install_db.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('dist_css/common.css') ?>
<?= WebUtil::printCSS('css/install.css') ?> <?= WebUtil::printCSS('css/install.css') ?>
</head> </head>
<body> <body>
<div class="container" style="min-width:720px;"> <div class="container" style="min-width:720px;">
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1> <h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe 리셋</h1>
@@ -104,10 +108,12 @@ if($session->userGrade == 5){
</div> </div>
</form> </form>
</div> </div>
</div><!--DB 폼 끝--> </div>
<!--DB 폼 끝-->
</div> </div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
+2 -3
View File
@@ -20,11 +20,10 @@ include "func.php";
'serverID' => UniqueConst::$serverID 'serverID' => UniqueConst::$serverID
]) ?> ]) ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= 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::printJS('dist_js/recent_map.js') ?>
<?= WebUtil::printCSS('../d_shared/common.css') ?> <?= WebUtil::printCSS('../d_shared/common.css') ?>
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
<?= WebUtil::printCSS('dist_css/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') ?>
@@ -53,7 +52,7 @@ 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>
+4 -1
View File
@@ -52,7 +52,10 @@ input::-webkit-input-placeholder {
} }
.login_btn_group { .login_btn_group {
margin-top: 5px; margin-top: 4px;
>.btn{
padding: 0.3rem 1rem;
}
} }
.login-register { .login-register {
+11 -2
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -39,6 +40,7 @@ foreach(getCharacterList(false) as $id=>[$name, $info]){
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 장수 선택</title> <title><?= UniqueConst::$serverName ?>: 장수 선택</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -65,6 +67,7 @@ var validCustomOption = <?=Json::encode(GameConst::$generalPoolAllowOption)?>;
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('dist_js/vendors.js') ?> <?= WebUtil::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?> <?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('dist_js/join.js') ?> <?= WebUtil::printJS('dist_js/join.js') ?>
<?= WebUtil::printJS('dist_js/select_general_from_pool.js') ?> <?= WebUtil::printJS('dist_js/select_general_from_pool.js') ?>
@@ -82,16 +85,20 @@ alert('더 이상 등록할 수 없습니다.');
history.go(-1); history.go(-1);
</script> </script>
</body> </body>
</html> </html>
<?php <?php
die(); die();
} }
?> ?>
<body> <body>
<div class="container"> <div class="container">
<div class="bg0 with_border legacy_layout">장 수 선 택<br><?= backButton() ?></div> <div class="bg0 with_border legacy_layout">장 수 선 택<br><?= backButton() ?></div>
<table style="width:100%;" class="bg0 with_border"> <table style="width:100%;" class="bg0 with_border">
<tr><td><?=info(0)?></td></tr> <tr>
<td><?= info(0) ?></td>
</tr>
</table> </table>
<?= getInvitationList($nationList) ?> <?= getInvitationList($nationList) ?>
@@ -110,7 +117,8 @@ history.go(-1);
<div class="with_border legacy_layout" style="display:flex"> <div class="with_border legacy_layout" style="display:flex">
<div style='flex:1;' id='left_pad'> <div style='flex:1;' id='left_pad'>
장수를<br>선택해주세요! 장수를<br>선택해주세요!
</div><div style='flex:4;'> </div>
<div style='flex:4;'>
<form id='custom_form'> <form id='custom_form'>
<table class='tb_layout' style='width:100%;text-align:left;'> <table class='tb_layout' style='width:100%;text-align:left;'>
<?php <?php
@@ -190,4 +198,5 @@ if ($admin['show_img_level'] >= 1 && $member['grade'] >= 1 && $member['picture']
</div> </div>
</div> </div>
</body> </body>
</html> </html>
+11 -5
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -29,6 +30,7 @@ foreach($scoutMsgs as $nationID=>$scoutMsg){
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: NPC빙의</title> <title><?= UniqueConst::$serverName ?>: NPC빙의</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -56,8 +58,7 @@ foreach(SpecialityHelper::getSpecialWarList() as $specialID=>$specialObj){
} }
$specialAll['-'] = '없음'; $specialAll['-'] = '없음';
echo Json::encode($specialAll); echo Json::encode($specialAll);
?> ?>;
;
var characterInfo = var characterInfo =
<?php <?php
$characterAll = []; $characterAll = [];
@@ -65,12 +66,12 @@ foreach(getCharacterList(false) as $id=>[$name, $info]){
$characterAll[$name] = $info; $characterAll[$name] = $info;
} }
echo Json::encode($characterAll); echo Json::encode($characterAll);
?> ?>;
;
</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/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/common.js') ?> <?= WebUtil::printJS('dist_js/common.js') ?>
<?= WebUtil::printJS('dist_js/select_npc.js') ?> <?= WebUtil::printJS('dist_js/select_npc.js') ?>
@@ -87,16 +88,20 @@ alert('더 이상 등록할 수 없습니다.');
history.go(-1); history.go(-1);
</script> </script>
</body> </body>
</html> </html>
<?php <?php
die(); die();
} }
?> ?>
<body> <body>
<div class="container"> <div class="container">
<div class="bg0 with_border legacy_layout">장 수 선 택<br><?= backButton() ?></div> <div class="bg0 with_border legacy_layout">장 수 선 택<br><?= backButton() ?></div>
<table style="width:100%;" class="bg0 with_border"> <table style="width:100%;" class="bg0 with_border">
<tr><td><?=info(0)?></td></tr> <tr>
<td><?= info(0) ?></td>
</tr>
</table> </table>
<?= getInvitationList($nationList) ?> <?= getInvitationList($nationList) ?>
@@ -145,4 +150,5 @@ history.go(-1);
</div> </div>
</div> </div>
</body> </body>
</html> </html>
+73 -21
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
include "lib.php"; include "lib.php";
@@ -30,6 +31,7 @@ if ($permission < 1) {
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title><?= UniqueConst::$serverName ?>: 외교부</title> <title><?= UniqueConst::$serverName ?>: 외교부</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
@@ -49,28 +51,48 @@ 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::printJS('dist_js/vendors.js') ?>
<?= WebUtil::printJS('dist_js/common_ts.js') ?>
<?= WebUtil::printJS('dist_js/diplomacy.js') ?> <?= WebUtil::printJS('dist_js/diplomacy.js') ?>
</head> </head>
<body> <body>
<table style='width:1000px;margin:auto;' class='tb_layout bg0'> <table style='width:1000px;margin:auto;' class='tb_layout bg0'>
<tr><td style='text-align:left;'>외 교 부<br><?=backButton()?></td></tr> <tr>
<td style='text-align:left;'>외 교 부<br><?= backButton() ?></td>
</tr>
</table> </table>
<table id='newLetter' class='bg0' style='display:none;'> <table id='newLetter' class='bg0' style='display:none;'>
<thead> <thead>
<tr><td colspan='2' class='newLetterHeader'>새 외교문서 작성</td> <tr>
<td colspan='2' class='newLetterHeader'>새 외교문서 작성</td>
</thead> </thead>
<tbody> <tbody>
<tr><th class='bg1'>이전 문서</th><td><select id='inputPrevNo'></select></td></tr> <tr>
<tr><th class='bg1'>대상 국가</th><td><select id='inputDestNation'></select></td></tr> <th class='bg1'>이전 문서</th>
<tr><th class='bg1'>내용(국가 내 공개)</th><td><textarea id='inputBrief' class='autosize'></textarea></td></tr> <td><select id='inputPrevNo'></select></td>
<tr><th class='bg1'>내용(외교권자 전용)</th><td><textarea id='inputDetail' class='autosize'></textarea></td></tr> </tr>
<tr>
<th class='bg1'>대상 국가</th>
<td><select id='inputDestNation'></select></td>
</tr>
<tr>
<th class='bg1'>내용(국가 내 공개)</th>
<td><textarea id='inputBrief' class='autosize'></textarea></td>
</tr>
<tr>
<th class='bg1'>내용(외교권자 전용)</th>
<td><textarea id='inputDetail' class='autosize'></textarea></td>
</tr>
</tbody> </tbody>
<tfoot> <tfoot>
<tr class='letterActionPlate'><th class='bg1'>동작</th><td> <tr class='letterActionPlate'>
<th class='bg1'>동작</th>
<td>
<button type='button' id='btnSend'>전송</button> <button type='button' id='btnSend'>전송</button>
</td></tr> </td>
</tr>
</tfoot> </tfoot>
</table> </table>
@@ -80,43 +102,73 @@ var permissionLevel = <?=$permission?>; //
<div id='letterTemplate' style='display:none;'> <div id='letterTemplate' style='display:none;'>
<table class='letterFrame bg0'> <table class='letterFrame bg0'>
<thead> <thead>
<tr><td colspan='2' class='letterHeader'><span class='letterNationName'></span>국과의 외교 문서<span class='letterDate'>2099-12-31 23:59:59</span></td> <tr>
<td colspan='2' class='letterHeader'><span class='letterNationName'></span>국과의 외교 문서<span class='letterDate'>2099-12-31 23:59:59</span></td>
</thead> </thead>
<tbody> <tbody>
<tr><th class='bg1'>문서 번호</th><td><span class='letterNo'></span></td></tr> <tr>
<tr><th class='bg1'>이전 문서</th><td><span class='letterPrevNo'></span></td></tr> <th class='bg1'>문서 번호</th>
<tr><th class='bg1'>상태</th><td><span class='letterStatus'></span><span class='letterStatusOpt'></span></td></tr> <td><span class='letterNo'></span></td>
<tr><th class='bg1'>내용(국가 내 공개)</th><td><div class='letterBrief'></div></td></tr> </tr>
<tr><th class='bg1'>내용(외교권자 전용)</th><td><div class='letterDetail'></div></td></tr> <tr>
<th class='bg1'>이전 문서</th>
<td><span class='letterPrevNo'></span></td>
</tr>
<tr>
<th class='bg1'>상태</th>
<td><span class='letterStatus'></span><span class='letterStatusOpt'></span></td>
</tr>
<tr>
<th class='bg1'>내용(국가 내 공개)</th>
<td>
<div class='letterBrief'></div>
</td>
</tr>
<tr>
<th class='bg1'>내용(외교권자 전용)</th>
<td>
<div class='letterDetail'></div>
</td>
</tr>
</tbody> </tbody>
<tfoot> <tfoot>
<tr><th class='bg1'>서명인</th><td class='letterSignerPlate'> <tr>
<th class='bg1'>서명인</th>
<td class='letterSignerPlate'>
<div class='letterSrc'> <div class='letterSrc'>
<div class="signerImg"><img class='generalIcon' width='64px' height='64px'></div> <div class="signerImg"><img class='generalIcon' width='64px' height='64px'></div>
<div class="signerNation">&nbsp;</div> <div class="signerNation">&nbsp;</div>
<div class="signerName">&nbsp;</div> <div class="signerName">&nbsp;</div>
</div><div class='letterDest'> </div>
<div class='letterDest'>
<div class="signerImg"><img class='generalIcon' width='64px' height='64px'></div> <div class="signerImg"><img class='generalIcon' width='64px' height='64px'></div>
<div class="signerNation">&nbsp;</div> <div class="signerNation">&nbsp;</div>
<div class="signerName">&nbsp;</div> <div class="signerName">&nbsp;</div>
</div> </div>
</td></tr> </td>
<tr class='letterActionPlate' style='display:none;'><th class='bg1'>동작</th><td> </tr>
<tr class='letterActionPlate' style='display:none;'>
<th class='bg1'>동작</th>
<td>
<button type='button' class='btnAgree' style='display:none;'>승인</button> <button type='button' class='btnAgree' style='display:none;'>승인</button>
<button type='button' class='btnDisagree' style='display:none;'>거부</button> <button type='button' class='btnDisagree' style='display:none;'>거부</button>
<button type='button' class='btnRollback' style='display:none;'>회수</button> <button type='button' class='btnRollback' style='display:none;'>회수</button>
<button type='button' class='btnDestroy' style='display:none;'>파기</button> <button type='button' class='btnDestroy' style='display:none;'>파기</button>
<button type='button' class='btnRenew'>추가 문서 작성</button> <button type='button' class='btnRenew'>추가 문서 작성</button>
</td></tr> </td>
</tr>
</tfoot> </tfoot>
</table> </table>
</div> </div>
<table style='width:1000px;margin:auto;' class='tb_layout bg0'> <table style='width:1000px;margin:auto;' class='tb_layout bg0'>
<tr><td style='text-align:left;'> <tr>
<td style='text-align:left;'>
<?= backButton() ?><br> <?= backButton() ?><br>
<?= banner() ?> <?= banner() ?>
</td></tr> </td>
</tr>
</table> </table>
</body> </body>
</html> </html>
+1
View File
@@ -8,6 +8,7 @@ import { sha512 } from 'js-sha512';
import { unwrap } from '@util/unwrap'; import { unwrap } from '@util/unwrap';
import { InvalidResponse } from '@/defs'; import { InvalidResponse } from '@/defs';
import { delay } from '@util/delay'; import { delay } from '@util/delay';
import 'bootstrap';
import '@/gateway/common'; import '@/gateway/common';
import '@scss/gateway/login.scss'; import '@scss/gateway/login.scss';
+6 -6
View File
@@ -1,14 +1,14 @@
import $ from 'jquery';
import 'bootstrap';
import { reloadWorldMap } from '@/map'; import { reloadWorldMap } from '@/map';
import { htmlReady } from './util/htmlReady';
import { unwrap } from './util/unwrap';
declare global { declare global {
interface Window { interface Window {
fitIframe: () => void; fitIframe: () => void;
} }
} }
htmlReady(function () {
$(function($){ console.log('haha');
void reloadWorldMap({ void reloadWorldMap({
targetJson: "j_map_recent.php", targetJson: "j_map_recent.php",
reqType: 'get', reqType: 'get',
@@ -17,7 +17,7 @@ $(function($){
const historyRaw = rawObject as unknown as { const historyRaw = rawObject as unknown as {
history: string history: string
}; };
$('.card-body').html(historyRaw.history); unwrap(document.querySelector('.card-body')).innerHTML = historyRaw.history;
if (window.parent !== window) { if (window.parent !== window) {
setTimeout(() => { setTimeout(() => {
@@ -27,4 +27,4 @@ $(function($){
} }
} }
}); });
}); })
+5
View File
@@ -1,5 +1,7 @@
<?php <?php
namespace sammo; namespace sammo;
require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/autoload.php');
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
@@ -18,8 +20,10 @@ require(__DIR__.'/../vendor/autoload.php');
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('../dist_js/vendors.js') ?> <?= WebUtil::printJS('../dist_js/vendors.js') ?>
<?= WebUtil::printJS('../dist_js/common_ts.js') ?>
<?= WebUtil::printJS('../dist_js/admin_member.js') ?> <?= WebUtil::printJS('../dist_js/admin_member.js') ?>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<div class="card"> <div class="card">
@@ -94,4 +98,5 @@ require(__DIR__.'/../vendor/autoload.php');
</div> </div>
</div> </div>
</body> </body>
</html> </html>
+3
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/autoload.php');
@@ -36,9 +37,11 @@ $acl = $session->acl;
</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::printJS('../dist_js/vendors.js', true) ?>
<?= WebUtil::printJS('../dist_js/common_ts.js') ?>
<?= WebUtil::printJS('../dist_js/entrance.js', true) ?> <?= WebUtil::printJS('../dist_js/entrance.js', true) ?>
</head> </head>
<body> <body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
+9 -2
View File
@@ -1,5 +1,7 @@
<?php <?php
namespace sammo; namespace sammo;
require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/autoload.php');
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
@@ -20,8 +22,10 @@ require(__DIR__.'/../vendor/autoload.php');
<!-- 액션 --> <!-- 액션 -->
<?= WebUtil::printJS('../d_shared/common_path.js') ?> <?= WebUtil::printJS('../d_shared/common_path.js') ?>
<?= WebUtil::printJS('../dist_js/vendors.js') ?> <?= WebUtil::printJS('../dist_js/vendors.js') ?>
<?= WebUtil::printJS('../dist_js/common_ts.js') ?>
<?= WebUtil::printJS('../dist_js/user_info.js') ?> <?= WebUtil::printJS('../dist_js/user_info.js') ?>
</head> </head>
<body> <body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="../">삼국지 모의전투 HiDCHe</a> <a class="navbar-brand" href="../">삼국지 모의전투 HiDCHe</a>
@@ -88,7 +92,8 @@ require(__DIR__.'/../vendor/autoload.php');
<span id="slot_oauth_type"></span> <span id="slot_oauth_type"></span>
</td> </td>
<td colspan="3"> <td colspan="3">
<span id="slot_token_valid_until"></span>까지 유효<button type="button" id="expand_login_token">연장</button></td> <span id="slot_token_valid_until"></span>까지 유효<button type="button" id="expand_login_token">연장</button>
</td>
</tr> </tr>
<tr> <tr>
<th class="bg1"></th> <th class="bg1"></th>
@@ -108,7 +113,8 @@ require(__DIR__.'/../vendor/autoload.php');
<td colspan="3" style="text-align:right;"> <td colspan="3" style="text-align:right;">
<form name="change_pw_form" id="change_pw_form" method="post"> <form name="change_pw_form" id="change_pw_form" method="post">
<input type="hidden" id="global_salt" name="global_salt"> <input type="hidden" id="global_salt" name="global_salt">
<input type="text" autocomplete="username" style="display:none;"><!--자동 완성툴을 위해--> <input type="text" autocomplete="username" style="display:none;">
<!--자동 완성툴을 위해-->
<label for="current_pw">현재 비밀번호</label> <label for="current_pw">현재 비밀번호</label>
<input class="with_skin" type="password" autocomplete="current-password" name="current_pw" id="current_pw" style="width:120px;"><br> <input class="with_skin" type="password" autocomplete="current-password" name="current_pw" id="current_pw" style="width:120px;"><br>
<label for="new_pw">새 비밀번호</label> <label for="new_pw">새 비밀번호</label>
@@ -184,4 +190,5 @@ require(__DIR__.'/../vendor/autoload.php');
</div> </div>
</body> </body>
</html> </html>
+6 -6
View File
@@ -113,12 +113,12 @@ foreach (ServConfig::getServerList() as $setting) {
<div class="col-7 col-md-8"> <div class="col-7 col-md-8">
<div class="btn-group btn-group-lg d-flex login_btn_group" role="group"> <div class="btn-group btn-group-lg d-flex login_btn_group" role="group">
<button type="submit" class="btn btn-primary login-button w-100">로그인</button> <button type="submit" class="btn btn-primary login-button w-100">로그인</button>
<div class="btn-group" role="group"> <button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="sr-only">추가 기능</span></button> <span class="visually-hidden">추가 기능</span>
<div class="dropdown-menu dropdown-menu-right"> </button>
<a class="dropdown-item" id='oauth_change_pw' href="#">비밀번호 초기화</a> <ul class="dropdown-menu dropdown-menu-right">
</div> <li><a class="dropdown-item" id='oauth_change_pw' href="#">비밀번호 초기화</a></li>
</div> </ul>
</div> </div>
</div> </div>
</div> </div>
+5
View File
@@ -1,4 +1,5 @@
<?php <?php
namespace sammo; namespace sammo;
require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/autoload.php');
@@ -23,16 +24,19 @@ if($canJoin != 'Y'){
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="ko"> <html lang="ko">
<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=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/vendors.js') ?>
<?= WebUtil::printJS('../dist_js/common_ts.js') ?>
<?= WebUtil::printJS('../dist_js/join.js') ?> <?= WebUtil::printJS('../dist_js/join.js') ?>
<?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?> <?= WebUtil::printCSS('../e_lib/bootstrap.min.css') ?>
<?= WebUtil::printCSS('../css/login.css') ?> <?= WebUtil::printCSS('../css/login.css') ?>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe</h1> <h1 class="row justify-content-md-center">삼국지 모의전투 HiDCHe</h1>
@@ -137,4 +141,5 @@ if($canJoin != 'Y'){
</div> </div>
</div> </div>
</body> </body>
</html> </html>