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),"");