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) {