국방,임관권유문을 KVStorage로 분리

This commit is contained in:
2020-05-05 19:55:59 +09:00
parent 9a6b5d8e66
commit 562c69307e
10 changed files with 75 additions and 36 deletions
+6 -7
View File
@@ -193,7 +193,7 @@ function myNationInfo()
$result = MYDB_query($query, $connect) or Error(__LINE__ . MYDB_error($connect), "");
$me = MYDB_fetch_array($result);
$query = "select nation,name,color,power,msg,gold,rice,bill,rate,scout,war,strategic_cmd_limit,surlimit,tech,level,type from nation where nation='{$me['nation']}'";
$query = "select nation,name,color,power,gold,rice,bill,rate,scout,war,strategic_cmd_limit,surlimit,tech,level,type from nation where nation='{$me['nation']}'";
$result = MYDB_query($query, $connect) or Error(__LINE__ . MYDB_error($connect), "");
$nation = MYDB_fetch_array($result);
@@ -898,12 +898,11 @@ function onlinegen()
function nationMsg(General $general)
{
$db = DB::db();
$msg = $db->queryFirstField(
'SELECT msg FROM nation WHERE nation = %i',
$general->getNationID()
);
return $msg ?: '';
$nationStor = KVStorage::getStorage($db, 'nation_env');
$nationID = $general->getNationID();
$noticeKey = "nation_notice_{$nationID}";
return $nationStor->{$noticeKey}??'';
}
function banner()