setReadOnly(); $userID = Session::getUserID(); $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); increaseRefresh("세력정보", 1); $nationID = $db->queryFirstField('SELECT nation FROM general WHERE owner=%i', $userID); if ($nationID == 0) { echo "재야입니다."; exit(); } ?> <?= UniqueConst::$serverName ?>: 세력정보
세 력 정 보

queryFirstRow('SELECT nation,gennum,power,rate,bill,type,gold,rice,color,name,level,tech,capital FROM nation WHERE nation=%i', $nationID); //국가정보 $cityList = $db->query('SELECT * FROM city WHERE nation=%i', $nationID); $currPop = 0; $maxPop = 0; $cityNames = []; foreach ($cityList as $city) { $currPop += $city['pop']; $maxPop += $city['pop_max']; if ($city['city'] == $nation['capital']) { $cityNames[] = "{$city['name']}"; } else { $cityNames[] = $city['name']; } } [$currCrew, $maxCrew] = $db->queryFirstList('SELECT sum(crew), sum(leadership)*100 FROM general WHERE nation=%i AND npc != 5', $nation['nation']); $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); } ?>
;background-color:'>【
총주민 / 총병사 / 국 력
국 고 병 량 세 율 %
세금/단기 + / + 세곡/둔전 + / + 지급률 %
수입/지출 + / - 수입/지출 + / - 속 령 장 수
국고 예산 () 병량 예산 () 기술력 작 위
속령일람 :
국가열전