forked from devsam/core
임관, 전쟁 켬/끔 제한 삭제
This commit is contained in:
+16
-18
@@ -172,7 +172,7 @@ echo "
|
||||
</table>
|
||||
";
|
||||
|
||||
$query = "select nation,name,color,type,msg,gold,rice,bill,rate,scout,war,myset,scoutmsg,secretlimit from nation where nation='{$me['nation']}'";
|
||||
$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);
|
||||
|
||||
@@ -259,27 +259,25 @@ echo "
|
||||
<td align=right id=bg1>기밀 권한 (1 ~ 99년) </td>
|
||||
<td align=center><input type=text <?=$read;?> name=secretlimit style=text-align:right;color:white;background-color:black; size=3 maxlength=3 value=<?=$nation['secretlimit']?>>년 <input type=<?=$btn;?> name=btn value=기밀권한></td>
|
||||
<td align=right id=bg1>임관&전쟁 변경 가능</td>
|
||||
<td align=center><?=$nation['myset'];?> 회</td>
|
||||
<td align=center>무제한</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=4 align=center>
|
||||
<?php
|
||||
if($nation['myset'] > 0) {
|
||||
if($nation['scout'] == 0) {
|
||||
echo "
|
||||
<input type=$btn name=btn value='임관 금지'>";
|
||||
} else {
|
||||
echo "
|
||||
<input type=$btn name=btn value='임관 허가'>";
|
||||
}
|
||||
|
||||
if($nation['war'] == 0) {
|
||||
echo "
|
||||
<input type=$btn name=btn value='전쟁 금지'>";
|
||||
} else {
|
||||
echo "
|
||||
<input type=$btn name=btn value='전쟁 허가'>";
|
||||
}
|
||||
if($nation['scout'] == 0) {
|
||||
echo "
|
||||
<input type=$btn name=btn value='임관 금지'>";
|
||||
} else {
|
||||
echo "
|
||||
<input type=$btn name=btn value='임관 허가'>";
|
||||
}
|
||||
|
||||
if($nation['war'] == 0) {
|
||||
echo "
|
||||
<input type=$btn name=btn value='전쟁 금지'>";
|
||||
} else {
|
||||
echo "
|
||||
<input type=$btn name=btn value='전쟁 허가'>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
+4
-4
@@ -44,16 +44,16 @@ if($btn == "국가방침") {
|
||||
$query = "update nation set secretlimit='$secretlimit' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
} elseif($btn == "임관 금지") {
|
||||
$query = "update nation set myset=myset-1,scout='1' where nation='{$me['nation']}' and myset>0";
|
||||
$query = "update nation set scout='1' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
} elseif($btn == "임관 허가") {
|
||||
$query = "update nation set myset=myset-1,scout='0' where nation='{$me['nation']}' and myset>0";
|
||||
$query = "update nation set scout='0' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
} elseif($btn == "전쟁 금지") {
|
||||
$query = "update nation set myset=myset-1,war='1' where nation='{$me['nation']}' and myset>0";
|
||||
$query = "update nation set war='1' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
} elseif($btn == "전쟁 허가") {
|
||||
$query = "update nation set myset=myset-1,war='0' where nation='{$me['nation']}' and myset>0";
|
||||
$query = "update nation set war='0' where nation='{$me['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
|
||||
|
||||
@@ -994,8 +994,7 @@ function updateNationState($connect) {
|
||||
$gennum = $gencount;
|
||||
if($gencount < 10) $gencount = 10;
|
||||
//기술 및 변경횟수 업데이트
|
||||
$myset = $nation['level'] + 1;
|
||||
$query = "update nation set tech=totaltech/'$gencount',gennum='$gennum',myset='$myset' where nation='{$nation['nation']}'";
|
||||
$query = "update nation set tech=totaltech/'$gencount',gennum='$gennum' where nation='{$nation['nation']}'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
pushHistory($connect, $history);
|
||||
|
||||
Reference in New Issue
Block a user