From d7b9e8b2e097550419894d89adfd554c3e333868 Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 19 Jun 2018 01:49:16 +0900 Subject: [PATCH] =?UTF-8?q?=ED=88=AC=ED=91=9C=20=EB=8F=99=EC=9E=91=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/a_vote.php | 8 ++++---- hwe/c_vote.php | 14 ++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/hwe/a_vote.php b/hwe/a_vote.php index bb1b9794..97ffe2d6 100644 --- a/hwe/a_vote.php +++ b/hwe/a_vote.php @@ -19,8 +19,8 @@ $query = "select no,vote from general where owner='{$userID}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect), ""); $me = MYDB_fetch_array($result); -$admin = $gameStor->getValues(['develcost','voteopen','vote','votecomment']); - +$admin = $gameStor->getValues(['develcost','voteopen','vote_title','vote','votecomment']); +$vote_title = $admin['vote_title']??'-'; $vote = $admin['vote']?:['-']; ?> @@ -70,11 +70,11 @@ if ($isVoteAdmin) { "; } -$vote[0] = Tag2Code($vote[0]); +$vote_title = Tag2Code($vote_title); echo " 제 목 -  {$vote[0]} +  {$vote_title} "; diff --git a/hwe/c_vote.php b/hwe/c_vote.php index b1c7e940..7653edb5 100644 --- a/hwe/c_vote.php +++ b/hwe/c_vote.php @@ -23,7 +23,7 @@ $db = DB::db(); $gameStor = KVStorage::getStorage($db, 'game_env'); $connect=$db->get(); -$admin = $gameStor->getValues(['develcost', 'cost', 'vote', 'votecomment']); +$admin = $gameStor->getValues(['develcost', 'cost', 'vote_title', 'vote', 'votecomment']); $query = "select no,vote,name,nation,horse,weap,book,item,npc from general where owner='{$userID}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); @@ -58,19 +58,21 @@ if(!$isVoteAdmin){ if($btn == "수정") { if($title != "") { - $vote = $admin['vote']?:[]; - $vote[0] = $title; - $gameStor->vote = $vote; + $gameStor->vote_title = $title; } } elseif($btn == "추가") { if($str != "") { + if(!$admin['vote']){ + $admin['vote'] = []; + } $admin['vote'][] = $str; $gameStor->vote=$admin['vote']; } } elseif($btn == "리셋") { $gameStor->voteopen=1; - $gameStor->vote=''; - $gameStor->votecomment=''; + $gameStor->vote=['-']; + $gameStor->vote_title = '-'; + $gameStor->votecomment=[]; $query = "update general set vote='0'"; MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");