From c4f5962c7e3aaa5db0671ac77c8e5fec9adc598e Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 24 Jun 2018 04:18:54 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AD=EB=B0=A9=20=ED=91=9C=EA=B8=B0=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 13 +++++-------- hwe/index.php | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index d06cd876..53bda63e 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -1116,15 +1116,12 @@ function nationMsg() { $connect=$db->get(); $userID = Session::getUserID(); - $query = "select no,nation from general where owner='{$userID}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $me = MYDB_fetch_array($result); + $msg = $db->queryFirstField( + 'SELECT msg FROM nation WHERE nation = (SELECT nation FROM general WHERE `owner` = %i)', + $userID + ); - $query = "select msg from nation where nation='{$me['nation']}'"; - $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $nation = MYDB_fetch_array($result); - - echo "".$nation['msg'].""; + return $msg?:''; } function msgprint($msg, $name, $picture, $imgsvr, $when, $num, $type) { diff --git a/hwe/index.php b/hwe/index.php index f681b515..12d15123 100644 --- a/hwe/index.php +++ b/hwe/index.php @@ -195,7 +195,7 @@ echo " ?> 접속중인 국가: - 【 국가방침 】 +
【 국가방침 】
【 접속자 】 userGrade >= 5) {