setReadOnly(); $userID = Session::getUserID(); $db = DB::db(); $connect=$db->get(); increaseRefresh("내무부", 1); $query = "select conlimit from game limit 1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $admin = MYDB_fetch_array($result); $query = "select no,nation,level,con,turntime,belong from general where owner='{$userID}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $me = MYDB_fetch_array($result); $query = "select secretlimit from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $nation = MYDB_fetch_array($result); $con = checkLimit($me['con'], $admin['conlimit']); if ($con >= 2) { printLimitMsg($me['turntime']); exit(); } if ($me['level'] == 0 || ($me['level'] == 1 && $me['belong'] < $nation['secretlimit'])) { echo "수뇌부가 아니거나 사관년도가 부족합니다."; exit(); } if ($me['level'] >= 5) { $btn = "submit"; $read = ""; } else { $btn = "hidden"; $read = "readonly"; } ?> 내무부
내 무 부
"; continue; } $query = "select state,term,fixed,reserved,showing from diplomacy where me='{$me['nation']}' and you='{$nation['nation']}'"; $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $dip = MYDB_fetch_array($result2); $query = "select reserved,showing from diplomacy where you='{$me['nation']}' and me='{$nation['nation']}'"; $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $dip2 = MYDB_fetch_array($result2); //속령수 $query = "select city from city where nation='{$nation['nation']}'"; $result2 = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $citycount = MYDB_num_rows($result2); switch ($dip['state']) { case 0: $state = "교 전"; break; case 1: $state = "선포중"; break; case 2: $state = "통 상"; break; case 3: $state = "통합수락중"; break; case 4: $state = "통합제의중"; break; case 5: $state = "합병수락중"; break; case 6: $state = "합병제의중"; break; case 7: $state = "불가침"; break; } $term = $admin['year'] * 12 + $admin['month'] + $dip['term']; $year = intdiv($term, 12); $month = $term % 12; if ($month == 0) { $month = 12; $year--; } $date = date('Y-m-d H:i:s'); $note = ""; if ($dip['fixed'] != "") { if ($dip['state'] == 7) { $note .= $dip['fixed']; } else { $note .= "{$dip['fixed']}"; } if ($dip['reserved'] != "" || $dip2['reserved'] != "") { $note .= "
"; } } if ($dip['showing'] >= $date) { if ($dip['reserved'] != "") { $note .= "아국측 제의: ".$dip['reserved']; if ($dip2['reserved'] != "") { $note .= "
"; } } } if ($dip2['showing'] >= $date) { if ($dip2['reserved'] != "") { $note .= "상대측 제의: ".$dip2['reserved']; } } if ($note == "") { $note = " "; } echo " "; if ($dip['term'] != 0) { echo" "; } else { echo" "; } echo " "; } echo "
외 교 관 계
국 가 명 국력 장수 속령 상태 기간 종 료 시 점 비 고
{$nation['name']} {$nation['power']} {$nation['gennum']} $citycount - - - -
{$nation['name']} {$nation['power']} {$nation['gennum']} $citycount $state{$dip['term']} 개월 {$year}年 {$month}月- -{$note}
"; $query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,scoutmsg,secretlimit from nation where nation='{$me['nation']}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $nation = MYDB_fetch_array($result); $query = "select gold_rate,rice_rate from game limit 1"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $admin = MYDB_fetch_array($result); // 금 수지 $deadIncome = getDeadIncome($nation['nation'], $nation['type'], $admin['gold_rate']); $goldincomeList = getGoldIncome($nation['nation'], $nation['rate'], $admin['gold_rate'], $nation['type']); $goldincome = $goldincomeList[0] + $goldincomeList[1] + $deadIncome; $goldoutcome = getGoldOutcome($nation['nation'], $nation['bill']); $riceincomeList = getRiceIncome($nation['nation'], $nation['rate'], $admin['rice_rate'], $nation['type']); $riceincome = $riceincomeList[0] + $riceincomeList[1]; $riceoutcome = getRiceOutcome($nation['nation'], $nation['bill']); $budgetgold = $nation['gold'] + $goldincome - $goldoutcome + $deadIncome; $budgetrice = $nation['rice'] + $riceincome - $riceoutcome; $budgetgolddiff = $goldincome - $goldoutcome + $deadIncome; $budgetricediff = $riceincome - $riceoutcome; if ($budgetgolddiff > 0) { $budgetgolddiff = "+{$budgetgolddiff}"; } else { $budgetgolddiff = "$budgetgolddiff"; } if ($budgetricediff > 0) { $budgetricediff = "+{$budgetricediff}"; } else { $budgetricediff = "$budgetricediff"; } ?>
국 가 방 침 & 임관 권유 메세지
국가 방침 maxlength=500 style=color:white;background-color:black;width:830px; name=msg value=''> name=btn value=국가방침>
임관 권유 maxlength=500 style=color:white;background-color:black;width:830px; name=scoutmsg value=''> name=btn value=임관권유>
900 x 200px 넘는 크기를 점유할 시 통보없이 제한될 수 있습니다.
예 산 & 정 책
"; ?>
자금 예산 병량 예산
현 재    {$nation['gold']} 현 재    {$nation['rice']}
단기수입    +$deadIncome 둔전수입    +$riceincomeList[1]
세 금    +$goldincomeList[0] 세 곡    +$riceincomeList[0]
수입 / 지출    +$goldincome / -$goldoutcome 수입 / 지출    +$riceincome / -$riceoutcome
국고 예산    {$budgetgold} ({$budgetgolddiff}) 병량 예산    {$budgetrice} ({$budgetricediff})
세율 (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 " "; } ?>
기밀 권한이란, 암행부를 열람할 수 있는 일반 장수의 최소 사관 년수를 의미합니다.