유산 보기 페이지

This commit is contained in:
2021-08-11 02:32:41 +09:00
parent e5b5c5e1cf
commit ea58e1e5c5
5 changed files with 83 additions and 22 deletions
+19 -10
View File
@@ -16,6 +16,8 @@ $me = General::createGeneralObjFromDB($generalID);
$pointHelpText = [
'sum' => '다음 플레이에서 사용할 수 있는 총 포인트입니다.',
'new' => '이번 플레이에서 얻은 총 포인트입니다.',
'previous' => '이전에 물려받은 포인트입니다.',
'lived_month' => '살아남은 기간입니다. (1개월 단위)',
'max_belong' => '가장 오래 임관했던 국가의 연도입니다.',
@@ -28,7 +30,10 @@ $pointHelpText = [
'tournament' => '토너먼트 입상 포인트입니다.',
'betting' => '성공적인 베팅을 했습니다. <br>수익율과 베팅 성공 횟수를 따릅니다.',
];
$items = [];
foreach(array_keys(General::INHERITANCE_KEY) as $key){
$items[$key] = $me->getInheritancePoint($key)??0;
}
?>
<!DOCTYPE html>
<html>
@@ -48,6 +53,10 @@ $pointHelpText = [
<?= WebUtil::printJS('../e_lib/bootstrap.bundle.min.js') ?>
<?= WebUtil::printJS('js/common.js') ?>
<?= WebUtil::printJS('js/inheritPoint.js') ?>
<script>
var items = <?=Json::encode($items)?>;
var helpText = <?=Json::encode($pointHelpText)?>;
</script>
</head>
<body onload="formStart()">
@@ -59,16 +68,16 @@ $pointHelpText = [
</table>
<div id="container" class="tb_layout bg0" style="width:1000px;margin:auto;border:solid 1px #888888;">
<div id='inheritance_list'>
<div id="inherit_total" class='inherit_item'>
<div id="inherit_sum" class='inherit_item'>
<div class="row">
<label id="inherit_sum_head" class='inherit_head col-sm-6 col-form-label'>총 포인트</label>
<div class="col-sm-6">
<input type="text" class="form-control inherit_value" readonly id="inherit_<?= $key ?>_value" value="">
<input type="text" class="form-control inherit_value" readonly id="inherit_sum_value" value="">
</div>
</div>
<div style="text-align:right">
<small class="form-text text-muted"><?= $pointHelpText[$key] ?? "" ?></small>
<small class="form-text text-muted"></small>
</div>
</div>
@@ -76,16 +85,16 @@ $pointHelpText = [
<div class="row">
<label id="inherit_sum_head" class='inherit_head col-sm-6 col-form-label'>기존 포인트</label>
<div class="col-sm-6">
<input type="text" class="form-control inherit_value" readonly id="inherit_previous_value" value="<?= number_format(Util::toInt($me->getInheritancePoint('previous') ?? 0)) ?>">
<input type="text" class="form-control inherit_value" readonly id="inherit_previous_value" value="">
</div>
</div>
<div style="text-align:right">
<small class="form-text text-muted"><?= $pointHelpText[$key] ?? "" ?></small>
<small class="form-text text-muted"></small>
</div>
</div>
<div id="inherit_<?= $key ?>" class='inherit_item'>
<div id="inherit_new" class='inherit_item'>
<div class="row">
<label id="inherit_sum_head" class='inherit_head col-sm-6 col-form-label'>신규 포인트</label>
<div class="col-sm-6">
@@ -94,7 +103,7 @@ $pointHelpText = [
</div>
<div style="text-align:right">
<small class="form-text text-muted"><?= $pointHelpText[$key] ?? "" ?></small>
<small class="form-text text-muted"></small>
</div>
</div>
<div style="width:100%; padding:0 10px"><hr style="border-top:1px solid #888888;"></div>
@@ -106,12 +115,12 @@ $pointHelpText = [
<div class="row">
<label id="inherit_<?= $key ?>_head" class='inherit_head col-sm-6 col-form-label'><?= $name ?></label>
<div class="col-sm-6">
<input type="text" class="form-control inherit_value" readonly id="inherit_<?= $key ?>_value" value="<?= number_format(Util::toInt($me->getInheritancePoint($key) ?? 0)) ?>">
<input type="text" class="form-control inherit_value" readonly id="inherit_<?= $key ?>_value" value="">
</div>
</div>
<div style="text-align:right">
<small class="form-text text-muted"><?= $pointHelpText[$key] ?? "" ?></small>
<small class="form-text text-muted"></small>
</div>
</div>
<?php endforeach; ?>