string 내의 $ 호출들 일괄 변환.
This commit is contained in:
+18
-18
@@ -30,7 +30,7 @@ if($command == 46) {
|
||||
if($name == "") { $name = "무명"; }
|
||||
$name = _String::SubStrForWidth($name, 0, 12);
|
||||
|
||||
$query = "update general set makenation='{$name}' where user_id='$_SESSION[p_id]'";
|
||||
$query = "update general set makenation='{$name}' where user_id='$_SESSION['p_id']'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$count = sizeof($turn);
|
||||
@@ -38,16 +38,16 @@ if($command == 46) {
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$str .= ",turn{$turn[$i]}='{$comStr}'";
|
||||
}
|
||||
$query = "update general set {$str} where user_id='$_SESSION[p_id]'";
|
||||
$query = "update general set {$str} where user_id='$_SESSION['p_id']'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
echo "<script>location.replace('main.php');</script>";
|
||||
//통합제의
|
||||
} elseif($command == 53) {
|
||||
$query = "select nation,level from general where user_id='$_SESSION[p_id]'";
|
||||
$query = "select nation,level from general where user_id='$_SESSION['p_id']'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if($me[level] >= 5) {
|
||||
if($me['level'] >= 5) {
|
||||
$nationname = addslashes(SQ2DQ($nationname));
|
||||
$nationname = str_replace("|", "", $nationname);
|
||||
$nationname = str_replace(" ", "", $nationname);
|
||||
@@ -55,40 +55,40 @@ if($command == 46) {
|
||||
if($nationname == "") { $nationname = "무명"; }
|
||||
$nationname = _String::SubStrForWidth($nationname, 0, 12);
|
||||
|
||||
$query = "update general set makenation='{$nationname}' where level>=5 and nation='$me[nation]'";
|
||||
$query = "update general set makenation='{$nationname}' where level>=5 and nation='$me['nation']'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$count = sizeof($turn);
|
||||
$str = "type=type";
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'";
|
||||
$str .= ",l{$me['level']}turn{$turn[$i]}='{$comStr}'";
|
||||
}
|
||||
$query = "update nation set {$str} where nation='$me[nation]'";
|
||||
$query = "update nation set {$str} where nation='$me['nation']'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
echo "<script>location.replace('b_chiefcenter.php');</script>";
|
||||
//불가침
|
||||
} elseif($command == 61) {
|
||||
$query = "select nation,level from general where user_id='$_SESSION[p_id]'";
|
||||
$query = "select nation,level from general where user_id='$_SESSION['p_id']'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if($me[level] >= 5) {
|
||||
if($me['level'] >= 5) {
|
||||
$note = addslashes(SQ2DQ($note));
|
||||
$note = str_replace("|", "", $note);
|
||||
$note = str_replace(" ", "", $note);
|
||||
$note = str_replace(" ", "뷁", $note);
|
||||
$note = _String::SubStrForWidth($note, 0, 90);
|
||||
|
||||
$query = "update diplomacy set reserved='{$note}' where me='$me[nation]' and you='$double'";
|
||||
$query = "update diplomacy set reserved='{$note}' where me='$me['nation']' and you='$double'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
|
||||
$count = sizeof($turn);
|
||||
$str = "type=type";
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'";
|
||||
$str .= ",l{$me['level']}turn{$turn[$i]}='{$comStr}'";
|
||||
}
|
||||
$query = "update nation set {$str} where nation='$me[nation]'";
|
||||
$query = "update nation set {$str} where nation='$me['nation']'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
echo "<script>location.replace('b_chiefcenter.php');</script>";
|
||||
@@ -97,19 +97,19 @@ if($command == 46) {
|
||||
//백성동원, 수몰, 허보, 피장파장, 의병모집, 이호경식, 급습
|
||||
//국기변경
|
||||
} elseif($command == 23 || $command == 24 || $command == 27 || $command == 51 || $command == 52 || $command > 60) {
|
||||
$query = "select no,nation,level from general where user_id='$_SESSION[p_id]'";
|
||||
$query = "select no,nation,level from general where user_id='$_SESSION['p_id']'";
|
||||
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
$me = MYDB_fetch_array($result);
|
||||
|
||||
if(($command == 23 || $command == 24 || $command == 27) && $me[no] == $third) {
|
||||
if(($command == 23 || $command == 24 || $command == 27) && $me['no'] == $third) {
|
||||
// 자기자신에게 악용 금지
|
||||
} elseif($me[level] >= 5) {
|
||||
} elseif($me['level'] >= 5) {
|
||||
$count = sizeof($turn);
|
||||
$str = "type=type";
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$str .= ",l{$me[level]}turn{$turn[$i]}='{$comStr}'";
|
||||
$str .= ",l{$me['level']}turn{$turn[$i]}='{$comStr}'";
|
||||
}
|
||||
$query = "update nation set {$str} where nation='$me[nation]'";
|
||||
$query = "update nation set {$str} where nation='$me['nation']'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
}
|
||||
echo "<script>location.replace('b_chiefcenter.php');</script>";
|
||||
@@ -119,7 +119,7 @@ if($command == 46) {
|
||||
for($i=0; $i < $count; $i++) {
|
||||
$str .= ",turn{$turn[$i]}='{$comStr}'";
|
||||
}
|
||||
$query = "update general set {$str} where user_id='$_SESSION[p_id]'";
|
||||
$query = "update general set {$str} where user_id='$_SESSION['p_id']'";
|
||||
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
|
||||
echo "<script>location.replace('main.php');</script>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user