From 41f7ad8d75dd0ac6a05aab5ebffb435c31f4db43 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 5 Jul 2018 00:10:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=99=95=EC=A1=B0=20=EC=9D=BC=EB=9E=8C?= =?UTF-8?q?=EC=97=90=20=EC=95=84=EB=AC=B4=EA=B2=83=EB=8F=84=20=EC=97=86?= =?UTF-8?q?=EC=9D=84=20=EB=95=8C=20'=ED=98=84=EC=9E=AC'=EA=B0=80=20?= =?UTF-8?q?=EC=95=88=EB=B3=B4=EC=9D=B4=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_emperior.php | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hwe/a_emperior.php b/hwe/a_emperior.php index 9a71e9ed..c4d26172 100644 --- a/hwe/a_emperior.php +++ b/hwe/a_emperior.php @@ -32,14 +32,18 @@ increaseRefresh("์™•์กฐ์ผ๋žŒ", 1); $showCurrentNation = true; -foreach($db->query('SELECT * FROM emperior ORDER BY `no` DESC') as $emperior){ - $serverID = $emperior['server_id']??($emperior['serverID']??null); - if($showCurrentNation && $serverID == UniqueConst::$serverID){ +$emperiors = $db->query('SELECT * FROM emperior ORDER BY `no` DESC'); + +if($emperiors){ + $serverID = $emperior[0]['server_id']??($emperior[0]['serverID']??null); + if($serverID == UniqueConst::$serverID){ $showCurrentNation = false; } - if ($showCurrentNation) { - $gameStor = KVStorage::getStorage($db, 'game_env'); - [$year, $month] = $gameStor->getValuesAsArray(['year', 'month']); +} + +if ($showCurrentNation) { + $gameStor = KVStorage::getStorage($db, 'game_env'); + [$year, $month] = $gameStor->getValuesAsArray(['year', 'month']); ?> @@ -55,9 +59,10 @@ foreach($db->query('SELECT * FROM emperior ORDER BY `no` DESC') as $emperior){
@@ -102,7 +107,7 @@ foreach($db->query('SELECT * FROM emperior ORDER BY `no` DESC') as $emperior){