설문조사 의견삭제시 skin_dir 넘어가지 않던 문제 수정

This commit is contained in:
chicpro
2013-01-17 15:31:25 +09:00
parent 35e41411b7
commit e932f9a6e4
2 changed files with 22 additions and 13 deletions

View File

@ -2,9 +2,12 @@
include_once('./_common.php'); include_once('./_common.php');
$po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '{$po_id}' "); $po = sql_fetch(" select * from {$g4['poll_table']} where po_id = '{$po_id}' ");
if (!$po['po_id']) if (!$po['po_id'])
alert('설문조사 정보가 없습니다.'); alert('설문조사 정보가 없습니다.');
if ($member['mb_level'] < $po['po_level'])
alert('권한 '.$po['po_level'].' 이상의 회원만 결과를 보실 수 있습니다.');
$g4['title'] = '설문조사 결과'; $g4['title'] = '설문조사 결과';
$po_subject = $po['po_subject']; $po_subject = $po['po_subject'];
@ -31,11 +34,11 @@ for ($i=1; $i<=9; $i++) {
$list[$i]['content'] = $poll; $list[$i]['content'] = $poll;
$list[$i]['cnt'] = $po['po_cnt'.$i]; $list[$i]['cnt'] = $po['po_cnt'.$i];
if ($total_po_cnt > 0) if ($total_po_cnt > 0)
$list[$i]['rate'] = ($list[$i]['cnt'] / $total_po_cnt) * 100; $list[$i]['rate'] = ($list[$i]['cnt'] / $total_po_cnt) * 100;
$bar = (int)($list[$i]['cnt'] / $max * 100); $bar = (int)($list[$i]['cnt'] / $max * 100);
$list[$i]['bar'] = $bar; $list[$i]['bar'] = $bar;
$list[$i]['num'] = $i; $list[$i]['num'] = $i;
} }
@ -54,8 +57,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$list2[$i]['datetime'] = $row['pc_datetime']; $list2[$i]['datetime'] = $row['pc_datetime'];
$list2[$i]['del'] = ''; $list2[$i]['del'] = '';
if ($is_admin == 'super' || ($row['mb_id'] == $member['mb_id'] && $row['mb_id'])) if ($is_admin == 'super' || ($row['mb_id'] == $member['mb_id'] && $row['mb_id']))
$list2[$i]['del'] = '<a href="'.$g4['bbs_url'].'/poll_etc_update.php?w=d&amp;pc_id='.$row['pc_id'].'&amp;po_id='.$po_id.'\');">'; $list2[$i]['del'] = '<a href="'.$g4['bbs_url'].'/poll_etc_update.php?w=d&amp;pc_id='.$row['pc_id'].'&amp;po_id='.$po_id.'&amp;skin_dir='.$skin_dir.'">';
} }
// 기타의견 입력 // 기타의견 입력
@ -63,9 +66,9 @@ $is_etc = false;
if ($po['po_etc']) { if ($po['po_etc']) {
$is_etc = true; $is_etc = true;
$po_etc = $po['po_etc']; $po_etc = $po['po_etc'];
if ($member['mb_id']) if ($member['mb_id'])
$name = '<b>'.$member['mb_nick'].'</b> <input type="hidden" name="pc_name" value="'.$member['mb_nick'].'">'; $name = '<b>'.$member['mb_nick'].'</b> <input type="hidden" name="pc_name" value="'.$member['mb_nick'].'">';
else else
$name = '<input type="text" name="pc_name" size="10" class="input" required>'; $name = '<input type="text" name="pc_name" size="10" class="input" required>';
} }

View File

@ -1,5 +1,5 @@
<? <?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?> ?>
<div id="poll_result" class="new_win"> <div id="poll_result" class="new_win">
@ -7,7 +7,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<section id="poll_result_list"> <section id="poll_result_list">
<h2><?=$po_subject?> 결과</h2> <h2><?=$po_subject?> 결과</h2>
<dl> <dl>
<dt><span>전체 <?=$nf_total_po_cnt?>표</span></dt> <dt><span>전체 <?=$nf_total_po_cnt?>표</span></dt>
<dd> <dd>
@ -89,8 +89,14 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<? } ?> <? } ?>
</ul> </ul>
</section> </section>
</div>
<div class="btn_win"> <script>
<a href="javascript:window.close();" class="btn_cancel">창닫기</a> $(function() {
</div> $("#poll_result").append("<div class=\"btn_win\"><a class=\"btn_cancel\">창닫기</a></div>");
</div>
$(".btn_win a").click(function() {
window.close();
});
});
</script>