string 내의 $ 호출들 일괄 변환.

This commit is contained in:
2018-01-16 03:56:50 +09:00
parent c73a3bcf95
commit 28eaf7b0d7
119 changed files with 6485 additions and 6479 deletions
+21 -21
View File
@@ -9,46 +9,46 @@ $query = "select develcost,vote,votecomment from game where no='1'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$admin = MYDB_fetch_array($result);
$query = "select no,userlevel,vote,name,nation,horse,weap,book,item,npc,history from general where user_id='$_SESSION[p_id]'";
$query = "select no,userlevel,vote,name,nation,horse,weap,book,item,npc,history 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($btn == "수정" && $me[userlevel] >= 5) {
if($btn == "수정" && $me['userlevel'] >= 5) {
if($title != "") {
$vote = explode("|", $admin[vote]);
$vote = explode("|", $admin['vote']);
$vote[0] = addslashes(SQ2DQ($title));
$admin[vote] = implode("|", $vote);
$query = "update game set vote='{$admin[vote]}' where no='1'";
$admin['vote'] = implode("|", $vote);
$query = "update game set vote='{$admin['vote']}' where no='1'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
} elseif($btn == "추가" && $me[userlevel] >= 5) {
} elseif($btn == "추가" && $me['userlevel'] >= 5) {
if($str != "") {
$str = addslashes(SQ2DQ($str));
$admin[vote] .= "|{$str}";
$query = "update game set vote='{$admin[vote]}' where no='1'";
$admin['vote'] .= "|{$str}";
$query = "update game set vote='{$admin['vote']}' where no='1'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
} elseif($btn == "리셋" && $me[userlevel] >= 5) {
} elseif($btn == "리셋" && $me['userlevel'] >= 5) {
$query = "update game set voteopen=1,vote='',votecomment='' where no='1'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$query = "update general set vote='0'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} elseif($btn == "알림" && $me[userlevel] >= 5) {
} elseif($btn == "알림" && $me['userlevel'] >= 5) {
$query = "update general set newvote='1' where vote=0";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} elseif($btn == "숨김" && $me[userlevel] >= 5) {
} elseif($btn == "숨김" && $me['userlevel'] >= 5) {
$query = "update game set voteopen=0 where no=1";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} elseif($btn == "전체통계만" && $me[userlevel] >= 5) {
} elseif($btn == "전체통계만" && $me['userlevel'] >= 5) {
$query = "update game set voteopen=1 where no=1";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} elseif($btn == "전부" && $me[userlevel] >= 5) {
} elseif($btn == "전부" && $me['userlevel'] >= 5) {
$query = "update game set voteopen=2 where no=1";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} elseif($btn == "투표" && $me[vote] == 0 && $sel > 0) {
$develcost = $admin[develcost] * 5;
$query = "update general set gold=gold+{$develcost},vote='{$sel}' where user_id='$_SESSION[p_id]'";
} elseif($btn == "투표" && $me['vote'] == 0 && $sel > 0) {
$develcost = $admin['develcost'] * 5;
$query = "update general set gold=gold+{$develcost},vote='{$sel}' where user_id='$_SESSION['p_id']'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$log = array();
@@ -60,15 +60,15 @@ if($btn == "수정" && $me[userlevel] >= 5) {
$comment = trim($comment);
$comment = addslashes(SQ2DQ($comment));
$query = "select name from nation where nation='$me[nation]'";
$query = "select name from nation where nation='$me['nation']'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$nation = MYDB_fetch_array($result);
if($nation[name] == "") { $nation[name] = "재야"; }
if($nation['name'] == "") { $nation['name'] = "재야"; }
if($admin[votecomment] != "") { $admin[votecomment] .= "|"; }
$admin[votecomment] .= "{$nation[name]}:{$me[name]}:{$comment}";
if($admin['votecomment'] != "") { $admin['votecomment'] .= "|"; }
$admin['votecomment'] .= "{$nation['name']}:{$me['name']}:{$comment}";
$query = "update game set votecomment='{$admin[votecomment]}' where no=1";
$query = "update game set votecomment='{$admin['votecomment']}' where no=1";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
?>