From 596fa9ccc89dc6248a54a50b323b87f54011d612 Mon Sep 17 00:00:00 2001 From: sars Date: Wed, 16 Mar 2022 12:09:29 -0700 Subject: [PATCH] =?UTF-8?q?=ED=86=A0=EB=84=88=EB=A8=BC=ED=8A=B8=EC=99=80?= =?UTF-8?q?=20=EB=B2=A0=ED=8C=85=EC=9E=A5=20=ED=95=98=EC=9D=B4=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=ED=95=98=EA=B8=B0.=20(=EB=AA=A8=EB=B0=94?= =?UTF-8?q?=EC=9D=BC=EC=97=90=EC=84=9C=20dropdown-item=EC=97=90=EC=84=9C?= =?UTF-8?q?=EB=8A=94=20=EC=95=84=EC=A7=81=20=EC=A0=81=EC=9A=A9=20=EB=AA=BB?= =?UTF-8?q?=ED=95=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_template.php | 16 ++++++++++++++++ hwe/index.php | 24 ++++++++++++------------ hwe/scss/main.scss | 3 +-- hwe/templates/commandButton.php | 4 ++-- 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/hwe/func_template.php b/hwe/func_template.php index 5ef56848..09e6eece 100644 --- a/hwe/func_template.php +++ b/hwe/func_template.php @@ -167,6 +167,20 @@ function commandButton(array $opts = []) $templates = new \League\Plates\Engine(__DIR__ . '/templates'); $showSecret = false; $permission = checkSecretPermission($me); + $btnClassForTournament = $opts['btnClass']; + if ($opts['isTournamentActive']) { + if ($btnClassForTournament != 'dropdown-item') { + $btnClassForTournament = 'toolbarButton2'; + } + } + + $btnClassForBetting = $opts['btnClass']; + if ($opts['isBettingActive']) { + if ($btnClassForTournament != 'dropdown-item') { + $btnClassForBetting = 'toolbarButton2'; + } + } + if ($permission >= 1) { $showSecret = true; } else if ($me['officer_level'] == 0) { @@ -180,6 +194,8 @@ function commandButton(array $opts = []) 'nationLevel' => $nation['level'], 'showSecret' => $showSecret, 'permission' => $permission, + 'btnClassForTournament' => $btnClassForTournament, + 'btnClassForBetting' => $btnClassForBetting, ], $opts)); } diff --git a/hwe/index.php b/hwe/index.php index 186eee71..ad0f8374 100644 --- a/hwe/index.php +++ b/hwe/index.php @@ -88,6 +88,8 @@ $serverName = UniqueConst::$serverName; $serverCnt = $gameStor->server_cnt; $auctionCount = $db->queryFirstField('SELECT count(`no`) FROM auction'); +$isTournamentActive = $gameStor->tournament > 0; +$isBettingActive = $gameStor->tournament == 6; $myNationStatic = getNationStaticInfo($generalObj->getNationID()); $nationColorType = substr($myNationStatic['color'] ?? '#000000', 1); @@ -134,6 +136,8 @@ if (!$otherTextInfo) { 'baseColor2' => GameConst::$basecolor2, 'lastExecuted' => $gameStor->turntime, 'isLocked' => $plock, + 'isTournamentActive' => $isTournamentActive, + 'isBettingActive' => $isBettingActive ]) ?> @@ -169,16 +173,12 @@ if (!$otherTextInfo) {
전체 접속자 수 : online_user_cnt ?> 명
턴당 갱신횟수 : conlimit ?>회
-
tournament == 0) : ?> - 현재 토너먼트 경기 없음 - - ↑tnmt_type] ?? '' ?> tournament) ?> ↑ - - - +
+ + ↑tnmt_type] ?? '' ?> tournament) ?> ↑ + + 현재 토너먼트 경기 없음 +
동작 시각: " . substr($gameStor->turntime, 5, 14) . "") : ("동작 시각: " . substr($gameStor->turntime, 5, 14) . "") ?>
@@ -257,7 +257,7 @@ if (!$otherTextInfo) {
-
'btn btn-sammo-nation']) ?>
+
'btn btn-sammo-nation', 'isTournamentActive' => $isTournamentActive, 'isBettingActive' => $isBettingActive]) ?>
@@ -357,7 +357,7 @@ if (!$otherTextInfo) { 국가 메뉴