From 23c2a16286a57d1ba2a0fd648336fe25a1ee0ea4 Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 25 Jan 2019 01:02:13 +0900 Subject: [PATCH] =?UTF-8?q?1=EC=B0=A8=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/css/msg.css | 4 ++-- hwe/func.php | 2 +- hwe/func_template.php | 4 ++-- hwe/j_basic_info.php | 1 + hwe/j_msg_get_recent.php | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hwe/css/msg.css b/hwe/css/msg.css index d65f109b..dc21a268 100644 --- a/hwe/css/msg.css +++ b/hwe/css/msg.css @@ -60,11 +60,11 @@ } .diplomacy_message{ - height:667px; + flex: 1; } .national_message{ - flex: 1; + height:667px; } .private_message{ diff --git a/hwe/func.php b/hwe/func.php index ae822fa1..710b45ec 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -396,7 +396,7 @@ function myNationInfo() { } function checkSecretPermission($me){ - if(!key_exists($me['penalty']) || !key_exists($me['permission'])){ + if(!key_exists('penalty', $me) || !key_exists('permission', $me)){ trigger_error ('canAccessSecret() 함수에 필요한 인자가 부족'); } $penalty = Json::decode($me['penalty'])??[]; diff --git a/hwe/func_template.php b/hwe/func_template.php index c57041aa..074f98ad 100644 --- a/hwe/func_template.php +++ b/hwe/func_template.php @@ -136,9 +136,9 @@ function commandButton() { } $db = DB::db(); - $me = $db->queryFirstRow("select no,nation,level,belong from general where owner=%i", $userID); + $me = $db->queryFirstRow("select no,nation,level,belong,permission,penalty from general where owner=%i", $userID); - $nation = $db->queryFirstRow("select permission,penalty,nation,level,color,secretlimit from nation where nation=%i",$me['nation'])??[ + $nation = $db->queryFirstRow("select nation,level,color,secretlimit from nation where nation=%i",$me['nation'])??[ 'nation'=>0, 'level'=>0, 'secretlimit'=>99, diff --git a/hwe/j_basic_info.php b/hwe/j_basic_info.php index 643a4526..b7fccd3a 100644 --- a/hwe/j_basic_info.php +++ b/hwe/j_basic_info.php @@ -2,6 +2,7 @@ namespace sammo; include('lib.php'); +include 'func.php'; $result = [ "generalID"=>null, diff --git a/hwe/j_msg_get_recent.php b/hwe/j_msg_get_recent.php index ee76a7a8..9b127b4e 100644 --- a/hwe/j_msg_get_recent.php +++ b/hwe/j_msg_get_recent.php @@ -90,7 +90,7 @@ $result['national'] = array_map(function(Message $msg)use (&$nextSequence, &$min $lastType = 'national'; } return $msg->toArray(); -}, Message::getMessagesFromMailBox(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_NATIONAL, 40, $reqSequence)); +}, Message::getMessagesFromMailBox(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_NATIONAL, 20, $reqSequence)); $result['diplomacy']= array_map(function(Message $msg)use (&$nextSequence, &$minSequence, &$lastType, $permission){ if($msg->id > $nextSequence){ @@ -105,7 +105,7 @@ $result['diplomacy']= array_map(function(Message $msg)use (&$nextSequence, &$min $values['text'] = '(외교 문서입니다)';//TODO: 외교서신이라 읽을 수 없음을 보여줘야함 } return $values; -}, Message::getMessagesFromMailBox(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_DIPLOMACY, 40, $reqSequence)); +}, Message::getMessagesFromMailBox(Message::MAILBOX_NATIONAL + $nationID, Message::MSGTYPE_DIPLOMACY, 20, $reqSequence)); if($lastType !== null){ array_pop($result[$lastType]);