include_once("./_common.php"); $po = sql_fetch(" select * from $g4[poll_table] where po_id = '$po_id' "); if (!$po[po_id]) alert_close('¼³¹®Á¶»ç Á¤º¸°¡ ¾ø½À´Ï´Ù.'); $g4[title] = "¼³¹®Á¶»ç °á°ú"; include_once("$g4[path]/head.sub.php"); //ÅõÇ¥ÇÑ È¸¿ø¸¸ °á°ú º¼ ¼ö ÀÖ°Ô.. $poll_check = "g4_poll_check"; // ÀÌ¹Ì ÅõÇ¥ÇÑ °ÍÀÎÁö È®ÀÎÇϱâ? $sql_1 = " select count(*) as cnt from $poll_check where vo_id = '$po_id' and mb_id = '$member[mb_id]' "; $row = sql_fetch($sql_1); if ($row[cnt]) { // ÅõÇ¥ ÇßÀ¸¸é °á°úº¸¿©ÁÖ±â $po_subject = $po[po_subject]; $max = 1; $total_po_cnt = 0; for ($i=1; $i<=9; $i++) { $poll = $po["po_poll{$i}"]; if ($poll == "") { break; } $total_po_cnt += $po["po_cnt{$i}"]; if ($po["po_cnt{$i}"] > $max) $max = $po["po_cnt{$i}"]; } $nf_total_po_cnt = number_format($total_po_cnt); $list = array(); for ($i=1; $i<=9; $i++) { $poll = $po["po_poll" . $i]; if ($poll == "") { break; } $list[$i][content] = $poll; $list[$i][cnt] = $po["po_cnt" . $i]; if ($total_po_cnt > 0) $list[$i][rate] = ($list[$i][cnt] / $total_po_cnt) * 100; $bar = (int)($list[$i][cnt] / $max * 100); $list[$i][bar] = $bar; $list[$i][num] = $i; } $list2 = array(); // ±âŸÀÇ°ß ¸®½ºÆ® $sql = " select a.*, b.mb_open from $g4[poll_etc_table] a left join $g4[member_table] b on (a.mb_id = b.mb_id) where po_id = '$po_id' order by pc_id desc "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { $list2[$i][name] = get_sideview($row[mb_id], cut_str($row[pc_name],10), '', '', $row[mb_open]); $list2[$i][idea] = get_text(cut_str($row[pc_idea], 255)); $list2[$i][datetime] = $row[pc_datetime]; $list2[$i][del] = ""; if ($is_admin == "super" || ($row[mb_id] == $member[mb_id] && $row[mb_id])) $list2[$i][del] = ""; } // ±âŸÀÇ°ß ÀÔ·Â $is_etc = false; if ($po[po_etc]) { $is_etc = true; $po_etc = $po[po_etc]; if ($member[mb_id]) $name = "$member[mb_nick] "; else $name = ""; } $list3 = array(); // ´Ù¸¥ÅõÇ¥ $sql = " select po_id, po_subject, po_date from $g4[poll_table] order by po_id desc "; $result = sql_query($sql); for ($i=0; $row2=sql_fetch_array($result); $i++) { $list3[$i][po_id] = $row2[po_id]; $list3[$i][date] = substr($row2[po_date],2,8); $list3[$i][subject] = cut_str($row2[po_subject],60,"¡¦"); } ?>