From da73997385824f4a2d0f147e8dba4bcc9ff6149a Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Jan 2018 05:35:47 +0900 Subject: [PATCH] =?UTF-8?q?meekroDB=20=EC=97=90=EC=84=9C=EB=8A=94=20?= =?UTF-8?q?=EC=88=AB=EC=9E=90=EB=8A=94=20%i=EC=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/j_msgsubmit.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/twe/j_msgsubmit.php b/twe/j_msgsubmit.php index 86933be3..8369642f 100644 --- a/twe/j_msgsubmit.php +++ b/twe/j_msgsubmit.php @@ -99,7 +99,7 @@ if($src_nation_id == 0) { $src_color = '#FFFFFF'; } else{ - $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array( + $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i_nation",array( 'nation' => $src_nation_id )); $src_nation = $nation['name']; @@ -128,9 +128,7 @@ if($dest == 9999) { } elseif($dest >= 9000) { $real_nation = $dest - 9000; $query = "select nation,name,color from nation where nation='$genlist'"; - $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array( - 'nation' => $real_nation - )); + $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i",$real_nation); if($nation === NULL || empty($nation)){ $dest = 9998; @@ -207,8 +205,7 @@ if($dest == 9999) { $_SESSION['last_msg'] = $date; - $dest_user = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s_p_id',array( - 'p_id'=>$dest)); + $dest_user = $db->queryFirstRow('select `no`,`name`,`nation` from `general` where `user_id` = %s',$dest); if($dest_user == NULL || empty($dest_user)){ header('Content-Type: application/json'); @@ -226,9 +223,7 @@ if($dest == 9999) { $dest_color = str_replace('##', '#', $dest_color); } else{ - $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%d_nation",array( - 'nation' => $dest_user['nation'] - )); + $nation = $db->queryFirstRow("select nation,name,color from nation where nation=%i",$dest_user['nation']); $dest_nation = $nation['name']; $dest_color = '#'.$nation['color']; $dest_color = str_replace('##', '#', $dest_color); //FIXME: nation table에서 color가 #포함된 걸로 바뀔 경우를 대비