setReadOnly(); $userID = Session::getUserID(); $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); increaseRefresh("내무부", 1); $me = $db->queryFirstRow('SELECT no, nation, officer_level, con, turntime, belong, permission, penalty FROM general WHERE owner=%i', $userID); $nationID = $me['nation']; $nation = $db->queryFirstRow('SELECT nation,level,name,color,type,gold,rice,bill,rate,scout,war,secretlimit,capital FROM nation WHERE nation = %i', $nationID); $nationStor = KVStorage::getStorage($db, $nationID, 'nation_env'); $con = checkLimit($me['con']); if ($con >= 2) { printLimitMsg($me['turntime']); exit(); } $permission = checkSecretPermission($me); if($permission < 0){ echo '국가에 소속되어있지 않습니다.'; die(); } else if ($permission < 1) { echo "권한이 부족합니다. 수뇌부가 아니거나 사관년도가 부족합니다."; die(); } if ($me['officer_level'] >= 5) { $btn = "submit"; $read = ""; } else { $btn = "hidden"; $read = "readonly"; } $nationStor->cacheValues(['notice', 'scout_msg']); ?> <?=UniqueConst::$serverName?>: 내무부
내 무 부
getValues(['year','month']); $cityCntList = Util::convertPairArrayToDict($db->queryAllLists('SELECT nation, count(city) FROM city GROUP BY nation')); $dipStateList = Util::convertArrayToDict($db->query('SELECT you,state,term FROM diplomacy WHERE me = %i', $nationID), 'you'); $nationsList = getAllNationStaticInfo(); uasort($nationsList, function(array $lhs, array $rhs){ return -($lhs['power']<=>$rhs['power']); }); foreach($nationsList as $staticNation): //속령수 $staticNationID = $staticNation['nation']; $cityCnt = $cityCntList[$staticNation['nation']]??0; $dipStateText = '-'; $dipTermText = '-'; $dipEndDateText = '-'; if($staticNationID !== $nationID){ $diplomacyState = $dipStateList[$staticNationID]; $dipStateText = [ 0 => "교 전", 1 => "선포중", 2 => "통 상", 7 => "불가침", ][$diplomacyState['state']]; if($diplomacyState['term']){ $dipEndMonth = $admin['month'] + $diplomacyState['term'] - 1; $dipEndYear = $admin['year'] + intdiv($dipEndMonth, 12); $dipEndMonth = $dipEndMonth % 12 + 1; $dipTermText = $diplomacyState['term'].'개월'; $dipEndDateText = "{$dipEndYear}年 {$dipEndMonth}月"; } } ?>
외 교 관 계
국 가 명 국력 장수 속령 상태 기간 종 료 시 점
;background-color:'>
query('SELECT * FROM city WHERE nation=%i', $nationID); $dedicationList = $db->query('SELECT dedication FROM general WHERE nation=%i AND npc!=5', $nationID); $goldIncome = getGoldIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList); $warIncome = getWarGoldIncome($nation['type'], $cityList); $totalGoldIncome = $goldIncome + $warIncome; $riceIncome = getRiceIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList); $wallIncome = getWallIncome($nation['nation'], $nation['level'], $nation['rate'], $nation['capital'], $nation['type'], $cityList); $totalRiceIncome = $riceIncome + $wallIncome; $outcome = getOutcome($nation['bill'], $dedicationList); $budgetgold = $nation['gold'] + $totalGoldIncome - $outcome; $budgetrice = $nation['rice'] + $totalRiceIncome - $outcome; $budgetgolddiff = $totalGoldIncome - $outcome; $budgetricediff = $totalRiceIncome - $outcome; if ($budgetgolddiff > 0) { $budgetgolddiff = '+'.number_format($budgetgolddiff); } else { $budgetgolddiff = number_format($budgetgolddiff); } if ($budgetricediff > 0) { $budgetricediff = '+'.number_format($budgetricediff); } else { $budgetricediff = number_format($budgetricediff); } ?>
국 가 방 침 & 임관 권유 메시지
국가 방침
임관 권유
870px x 200px를 넘어서는 내용은 표시되지 않습니다.
예 산 & 정 책
자금 예산 병량 예산
현 재    현 재   
단기수입    + 둔전수입    +
세 금    + 세 곡    +
수입 / 지출    + / - 수입 / 지출    + / -
국고 예산    () 병량 예산    ()
세율 (5 ~ 30%)    name=rate style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=세율> 봉급 지급률 (20 ~ 200%)    name=bill style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>% name=btn value=지급률>
기밀 권한 (1 ~ 99년)    name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=>년 name=btn value=기밀권한> 임관&전쟁 변경 가능 무제한
"; } else { echo " "; } if ($nation['war'] == 0) { echo " "; } else { echo " "; } ?>
기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.