설 문 조 사
= 5) { echo " "; } $vote[0] = Tag2Code($vote[0]); echo " "; $query = "select no from general where vote>0 and npc<2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $voteCount = MYDB_num_rows($result); $query = "select no from general where npc<2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $allCount = MYDB_num_rows($result); $percentage = round($voteCount / $allCount * 100, 1); $voteTypeCount = count($vote); for($i=1; $i < $voteTypeCount; $i++) { echo " "; } echo " "; if($me['vote'] == 0 && $me['no'] > 0) { echo " "; } else { echo " "; } echo " "; if($me['userlevel'] >= 5) { echo " "; } if($admin['votecomment'] != "") { $comment = explode("|", $admin['votecomment']); $commentCount = count($comment); } else { $commentCount = 0; } echo "
설 문 조 사 (금과 추첨으로 유니크템 증정!)
제 목  {$vote[0]}
{$i}. "; if($me['vote'] == 0 && $me['no'] > 0) { echo " "; } elseif($admin['voteopen'] >= 1 || $me['userlevel'] >= 5) { $query = "select no from general where vote='{$i}'"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $vCount = MYDB_num_rows($result); $per = @round($vCount / $voteCount * 100, 1); echo "{$vCount} 표 ({$per}%)"; } else { echo "추후공개"; } $vote[$i] = Tag2Code($vote[$i]); echo "  {$vote[$i]}
투표 결산 투표율 : {$voteCount} / {$allCount} ({$percentage} %)
"; for($i=0; $i < $commentCount; $i++) { $cmt = explode(":", $comment[$i]); $cmt[2] = Tag2Code($cmt[2]); $j = $i+1; echo " "; } if($me['no'] > 0) { echo " "; } ?>
댓 글
{$j}. {$cmt[0]} {$cmt[1]}  {$cmt[2]}
-

"; if($admin['voteopen'] >= 1 || $me['userlevel'] >= 5) { echo " "; } if($admin['voteopen'] >= 2 || $me['userlevel'] >= 5) { $query = "select no from general where nation=0 and npc<2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $memCount = MYDB_num_rows($result); if(!$nationVoteCount[0]) { $nationVoteCount[0] = 0; } $percentage = @round($nationVoteCount[0] / $memCount * 100, 1); echo " "; $query = "select nation,color,name,gennum from nation order by gennum desc"; $nationResult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $nationcount = MYDB_num_rows($nationResult); for($i=0; $i < $nationcount; $i++) { $nation = MYDB_fetch_array($nationResult); $query = "select no from general where nation='{$nation['nation']}' and npc<2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $memCount = MYDB_num_rows($result); if(!$nationVoteCount[$nation['nation']]) { $nationVoteCount[$nation['nation']] = 0; } $percentage = @round($nationVoteCount[$nation['nation']] / $memCount * 100, 1); echo " "; } } ?>
전 체 통 계 = 5) { echo " "; } echo "
전 체 {$voteCount} / {$allCount} ({$percentage} %) "; $query = "select no from general where npc<2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $memCount = MYDB_num_rows($result); $query = "select nation,vote from general where npc<2"; $result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); $count = MYDB_num_rows($result); for($i=0; $i < $count; $i++) { $vote = MYDB_fetch_array($result); $totalVote[$vote['vote']]++; if($vote['vote'] > 0) { $nationVoteCount[$vote['nation']]++; } $nationVote[$vote['nation']][$vote['vote']]++; } for($i=0; $i < $voteTypeCount; $i++) { $per = @round($totalVote[$i] / $memCount * 100, 1); // if($per < 5) { $vote['cnt'] = " "; } echo " "; } echo "
{$totalVote[$i]}
재 야 {$nationVoteCount[0]} / {$memCount} ({$percentage} %) "; for($i=0; $i < $voteTypeCount; $i++) { $per = @round($nationVote[0][$i] / $memCount * 100, 1); // if($per < 5) { $vote['cnt'] = " "; } echo " "; } echo "
{$nationVote[0][$i]}
{$nation['name']} {$nationVoteCount[$nation['nation']]} / {$memCount} ({$percentage} %) "; for($k=0; $k < $voteTypeCount; $k++) { $per = @round($nationVote[$nation['nation']][$k] / $memCount * 100, 1); // if($per < 5) { $vote['cnt'] = " "; } echo " "; } echo "
{$nationVote[$nation['nation']][$k]}
0) { $type = (($type - 1) % 7) + 1; } switch($type) { case 0: $color = "black"; break; case 1: $color = "red"; break; case 2: $color = "orange"; break; case 3: $color = "yellow"; break; case 4: $color = "green"; break; case 5: $color = "blue"; break; case 6: $color = "navy"; break; case 7: $color = "purple"; break; } return $color; } function getNewColor($type) { if($type > 0) { $type = (($type - 1) % 7) + 1; } switch($type) { case 2: $color = "black"; break; case 3: $color = "black"; break; default:$color = "white"; break; } return $color; }