사용자: neo -> basic
This commit is contained in:
@ -1,92 +1,47 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
global $is_admin;
|
||||
|
||||
// 투표번호가 넘어오지 않았다면 가장 큰(최근에 등록한) 투표번호를 얻는다
|
||||
if (!$po_id)
|
||||
{
|
||||
$po_id = $config[cf_max_po_id];
|
||||
if (!$po_id) {
|
||||
$po_id = $config['cf_max_po_id'];
|
||||
|
||||
if (!$po_id) return;
|
||||
}
|
||||
|
||||
$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' ");
|
||||
?>
|
||||
|
||||
<table width="220" border="0" cellspacing="0" cellpadding="0">
|
||||
<form name="fpoll" method="post" action="<?=$g4[bbs_path]?>/poll_update.php" onsubmit="return fpoll_submit(this);" target="winPoll">
|
||||
<form name="fpoll" method="post" action="<?=G4_BBS_URL?>/poll_update.php" onsubmit="return fpoll_submit(this);" target="win_poll">
|
||||
<input type="hidden" name="po_id" value="<?=$po_id?>">
|
||||
<input type="hidden" name="skin_dir" value="<?=$skin_dir?>">
|
||||
<tr>
|
||||
<td width=7 height=7><img src="<?=$poll_skin_path?>/img/bg_tl.gif" width=7></td>
|
||||
<td background="<?=$poll_skin_path?>/img/bg_t.gif"></td>
|
||||
<td width=6><img src="<?=$poll_skin_path?>/img/bg_tr.gif" width=6></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td background="<?=$poll_skin_path?>/img/bg_ml.gif"></td>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr><td height=5 colspan=5></td></tr>
|
||||
<tr>
|
||||
<td width="5"></td>
|
||||
<td align="center" colspan=3>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width=5><img src="<?=$poll_skin_path?>/img/bg_mcl.gif"></td>
|
||||
<td align=center background="<?=$poll_skin_path?>/img/bg_mc.gif"><img src="<?=$poll_skin_path?>/img/title.gif"></td>
|
||||
<td width=4><img src="<?=$poll_skin_path?>/img/bg_mcr.gif"></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td width="5"></td>
|
||||
</tr>
|
||||
<tr><td height=10 colspan=4></td></tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td width="25" align="center"><img src="<?=$poll_skin_path?>/img/q.gif" width="12" height="13"></td>
|
||||
<td height="20" style="text-align:justify;"><font color="#848484"><?=$po[po_subject]?></font>
|
||||
<? if ($is_admin == "super") { ?><a href="<?=$g4[admin_path]?>/poll_form.php?w=u&po_id=<?=$po_id?>"><img src="<?=$poll_skin_path?>/img/admin.gif" width="33" height="15" border=0 align=absmiddle></a></center><? } ?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr><td height=5 colspan=4></td></tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan=2>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<? for ($i=1; $i<=9 && $po["po_poll{$i}"]; $i++) { ?>
|
||||
<tr>
|
||||
<td width="25" align="center"><? if ($i == 1) { echo "<img src='$poll_skin_path/img/a.gif' width='12' height='13'>"; } else { echo " "; } ?></td>
|
||||
<td width="30" height="25" align="center"><input type="radio" name="gb_poll" value="<?=$i?>" id='gb_poll_<?=$i?>'></td>
|
||||
<td width=""><font color="#848484"><label for='gb_poll_<?=$i?>'><?=$po['po_poll'.$i]?></label></font></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr><td height=5 colspan=4></td></tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="2" align=center>
|
||||
<input type="image" src="<?=$poll_skin_path?>/img/poll_button.gif" width="70" height="25" border="0">
|
||||
<a href="javascript:;" onclick="poll_result('<?=$po_id?>');"><img src="<?=$poll_skin_path?>/img/poll_view.gif" width="70" height="25" border="0"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr><td height=5 colspan=5></td></tr>
|
||||
</table></td>
|
||||
<td background="<?=$poll_skin_path?>/img/bg_mr.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=7><img src="<?=$poll_skin_path?>/img/bg_bl.gif" width=7></td>
|
||||
<td background="<?=$poll_skin_path?>/img/bg_b.gif"></td>
|
||||
<td><img src="<?=$poll_skin_path?>/img/bg_br.gif" width=6></td>
|
||||
</tr>
|
||||
<section id="poll">
|
||||
<header>
|
||||
<h2>설문조사</h2>
|
||||
<? if ($is_admin == "super") { ?><a href="<?=G4_ADMIN_URL?>/poll_form.php?w=u&po_id=<?=$po_id?>">설문조사 관리</a><? } ?>
|
||||
<p><?=$po['po_subject']?></p>
|
||||
</header>
|
||||
<ul>
|
||||
<? for ($i=1; $i<=9 && $po["po_poll{$i}"]; $i++) { ?>
|
||||
<li><input type="radio" name="gb_poll" value="<?=$i?>" id='gb_poll_<?=$i?>'> <label for='gb_poll_<?=$i?>'><?=$po['po_poll'.$i]?></label></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
<footer>
|
||||
<input type="submit" class="btn_submit" value="투표하기">
|
||||
<a href="<?=G4_BBS_URL."/poll_result.php?po_id=$po_id&skin_dir=$skin_dir"?>" class="btn_cancel" target="_blank" onclick="poll_result(this.href); return false;">결과보기</a>
|
||||
</footer>
|
||||
</section>
|
||||
</form>
|
||||
</table>
|
||||
|
||||
<script type='text/javascript'>
|
||||
<script>
|
||||
function fpoll_submit(f)
|
||||
{
|
||||
<?
|
||||
if ($member['mb_level'] < $po['po_level'])
|
||||
echo " alert('권한 {$po['po_level']} 이상의 회원만 투표에 참여하실 수 있습니다.'); return false; ";
|
||||
?>
|
||||
|
||||
var chk = false;
|
||||
for (i=0; i<f.gb_poll.length;i ++) {
|
||||
if (f.gb_poll[i].checked == true) {
|
||||
@ -95,13 +50,8 @@ function fpoll_submit(f)
|
||||
}
|
||||
}
|
||||
|
||||
<?
|
||||
if ($member[mb_level] < $po[po_level])
|
||||
echo " alert('권한 $po[po_level] 이상의 회원만 투표에 참여하실 수 있습니다.'); return false; ";
|
||||
?>
|
||||
|
||||
if (!chk) {
|
||||
alert("항목을 선택하세요");
|
||||
alert("투표하실 설문항목을 선택하세요");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -109,13 +59,13 @@ function fpoll_submit(f)
|
||||
return true;
|
||||
}
|
||||
|
||||
function poll_result(po_id)
|
||||
function poll_result(url)
|
||||
{
|
||||
<?
|
||||
if ($member[mb_level] < $po[po_level])
|
||||
echo " alert('권한 $po[po_level] 이상의 회원만 결과를 보실 수 있습니다.'); return false; ";
|
||||
if ($member['mb_level'] < $po['po_level'])
|
||||
echo " alert('권한 {$po['po_level']} 이상의 회원만 결과를 보실 수 있습니다.'); return false; ";
|
||||
?>
|
||||
|
||||
win_poll("<?=$g4[bbs_path]?>/poll_result.php?po_id="+po_id+"&skin_dir="+document.fpoll.skin_dir.value);
|
||||
win_poll(url);
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@ -1,153 +1,110 @@
|
||||
<?
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<table width="600" border="0" cellspacing="0" cellpadding="0" align=center>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<table width="600" height="70" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td align="center" valign="middle" bgcolor="#EBEBEB">
|
||||
<table width="590" height="60" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="30" align="center" bgcolor="#FFFFFF" ><img src="<?=$g4[bbs_img_path]?>/icon_01.gif" width="5" height="5"></td>
|
||||
<td width="40" align="left" bgcolor="#FFFFFF" ><font color="#666666"><b>질 문</b></font></td>
|
||||
<td width="20" align="left" bgcolor="#FFFFFF" >l</td>
|
||||
<td width="500" bgcolor="#FFFFFF" ><font color="#666666"><b><?=$po_subject?></b> (전체 <?=$nf_total_po_cnt?>표)</font></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="poll_result" class="new_win">
|
||||
<h1><?=$g4['title']?></h1>
|
||||
|
||||
<table width="600" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="10"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<section id="poll_result_list">
|
||||
<h2><?=$po_subject?> 결과</h2>
|
||||
|
||||
<table width=600 bgcolor=#ffffff cellpadding=1 cellspacing=0>
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% cellpadding=6 cellspacing=1>
|
||||
<dl>
|
||||
<dt><span>전체 <?=$nf_total_po_cnt?>표</span></dt>
|
||||
<dd>
|
||||
<ol>
|
||||
<? for ($i=1; $i<=count($list); $i++) { ?>
|
||||
<tr bgcolor=#FFFFFF>
|
||||
<td width="258" bgcolor="#EBF1F5"><?=$list[$i][num]?>. <?=$list[$i][content]?></td>
|
||||
<td width="175" bgcolor="#EBF1F5"><img src="<?=$g4[bbs_img_path]?>/poll_graph_y.gif" width="<?=(int)$list[$i][bar]?>" height="7"></td>
|
||||
<td width="121" bgcolor="#A1C9E4"><font color="#ffffff"><?=$list[$i][cnt]?>표 (<?=number_format($list[$i][rate], 1)?>%)</font></td>
|
||||
</tr>
|
||||
<li>
|
||||
<p>
|
||||
<?=$list[$i]['content']?>
|
||||
<strong><?=$list[$i]['cnt']?> 표</strong>
|
||||
<span><?=number_format($list[$i]['rate'], 1)?> 퍼센트</span>
|
||||
</p>
|
||||
<div class="poll_result_graph">
|
||||
<span style="width:<?=number_format($list[$i]['rate'], 1)?>%"></span>
|
||||
</div>
|
||||
</li>
|
||||
<? } ?>
|
||||
</table></td>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<? if ($is_etc) { ?>
|
||||
<section id="poll_result_cmt">
|
||||
<h2>이 설문에 대한 기타의견</h2>
|
||||
|
||||
<? for ($i=0; $i<count($list2); $i++) { ?>
|
||||
<article>
|
||||
<header>
|
||||
<h1><?=$list2[$i]['pc_name']?><span class="sound_only">님의 의견</span></h1>
|
||||
<?=$list2[$i]['name']?>
|
||||
<span class="poll_datetime"><?=$list2[$i]['datetime']?></span>
|
||||
</header>
|
||||
<p>
|
||||
<?=$list2[$i]['idea']?>
|
||||
</p>
|
||||
<footer>
|
||||
<span class="poll_cmt_del"><? if ($list2[$i]['del']) { echo $list2[$i]['del']."삭제</a>"; } ?></span>
|
||||
</footer>
|
||||
</article>
|
||||
<? } ?>
|
||||
|
||||
<? if ($member['mb_level'] >= $po['po_level']) { ?>
|
||||
<form name="fpollresult" method="post" action="./poll_etc_update.php" onsubmit="return fpollresult_submit(this);" autocomplete="off">
|
||||
<input type=hidden name="po_id" value="<?=$po_id?>">
|
||||
<input type=hidden name="w" value="">
|
||||
<input type=hidden name="skin_dir" value="<?=$skin_dir?>">
|
||||
<? if ($is_member) { ?><input type="hidden" name="pc_name" value="<?=cut_str($member['mb_nick'],255)?>"><? } ?>
|
||||
<h3><?=$po_etc?></h3>
|
||||
<table id="poll_result_wcmt" class="frm_tbl">
|
||||
<tbody>
|
||||
<? if ($is_guest) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="pc_name">이름<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" id="pc_name" name="pc_name" class="fs_input required" size="10" required></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="570" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="15"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<? if ($is_etc) { ?>
|
||||
|
||||
<? if ($member[mb_level] >= $po[po_level]) { ?>
|
||||
<form name="fpollresult" method="post" onsubmit="return fpollresult_submit(this);" autocomplete="off" style="margin:0px;">
|
||||
<table width=570 bgcolor=#D4D4D4 cellpadding=1 cellspacing=0>
|
||||
<input type=hidden name=po_id value="<?=$po_id?>">
|
||||
<input type=hidden name=w value="">
|
||||
<tr>
|
||||
<td>
|
||||
<table width=100% cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>
|
||||
<tr>
|
||||
<td height=50 colspan=2>
|
||||
<table width=100% cellpadding=4 bgcolor=#FFFFFF>
|
||||
<tr><td><?=$po_etc?></td></tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=35 width=150 align="center">
|
||||
<? if ($member[mb_id]) { ?>
|
||||
<input type=hidden name=pc_name value="<?=cut_str($member[mb_nick],255)?>">
|
||||
<b><?=$member[mb_nick]?></b>
|
||||
<? } else { ?>
|
||||
이름 <input type='text' name='pc_name' size=10 class=input required itemname='이름'>
|
||||
<? } ?>
|
||||
</td>
|
||||
<td>
|
||||
의견 <input type='text' name='pc_idea' size=55 class=input required itemname='의견' maxlength="100">
|
||||
<input name="image" type=image src='<?=$g4[bbs_img_path]?>/ok_btn.gif' align=absmiddle border=0></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<? } ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="pc_idea">의견<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" id="pc_idea" name="pc_idea" class="fs_input required" size="47" required maxlength="100"></td>
|
||||
</tr>
|
||||
<? if ($is_guest) { ?>
|
||||
<tr>
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td><?=captcha_html();?></td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" class="btn_submit" value="의견남기기">
|
||||
</div>
|
||||
</form>
|
||||
<? } ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
function fpollresult_submit(f)
|
||||
{
|
||||
f.action = "./poll_etc_update.php";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
<? } ?>
|
||||
|
||||
<? for ($i=0; $i<count($list2); $i++) { ?>
|
||||
<table width="570" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="10" colspan="4"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20" height="25" align="center" bgcolor="#FAFAFA"><img src="<?=$g4[bbs_img_path]?>/icon_03.gif" width="3" height="5"></td>
|
||||
<td width="350" bgcolor="#FAFAFA"><?=$list2[$i][name]?></td>
|
||||
<td width="70" align="center" bgcolor="#FAFAFA"><? if ($list2[$i][del]) { echo $list2[$i][del] . "<img src='$g4[bbs_img_path]/btn_comment_delete.gif' width=45 height=14 border=0></a>"; } ?></td>
|
||||
<td width="150" align="center" bgcolor="#FAFAFA"><?=$list2[$i][datetime]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="1" colspan="4" background="<?=$g4[bbs_img_path]?>/dot_bg.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="20" height="25" bgcolor="#FAFAFA"> </td>
|
||||
<td width="550" height="25" colspan="3" bgcolor="#FAFAFA"><?=$list2[$i][idea]?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<? } ?>
|
||||
<section id="poll_result_oth">
|
||||
<h2>다른 투표 결과 보기</h2>
|
||||
<ul>
|
||||
<? for ($i=0; $i<count($list3); $i++) { ?>
|
||||
<li><a href="./poll_result.php?po_id=<?=$list3[$i]['po_id']?>&skin_dir=<?=$skin_dir?>">[<?=$list3[$i]['date']?>] <?=$list3[$i]['subject']?></a></li>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<? } ?>
|
||||
<div class="btn_win">
|
||||
<a href="javascript:;" onclick="window.close();">창닫기</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table width="600" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="30" colspan="3" align="center" valign="middle"><table width="595" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="595" height="1" background="<?=$g4[bbs_img_path]?>/dot_bg.gif"></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td height="30" colspan="3" align="left"><img src="<?=$g4[bbs_img_path]?>/title_01.gif" width="180" height="19"></td>
|
||||
</tr>
|
||||
<form name=fpolletc>
|
||||
<tr>
|
||||
<td width="15" align="center"> </td>
|
||||
<td width="35" align="center"><img src="<?=$g4[bbs_img_path]?>/icon_1.gif" width="15" height="8"></td>
|
||||
<td width="560"><select name=po_id onchange="select_po_id(this)"><? for ($i=0; $i<count($list3); $i++) { ?><option value='<?=$list3[$i][po_id]?>'>[<?=$list3[$i][date]?>] <?=$list3[$i][subject]?><? } ?></select><script>document.fpolletc.po_id.value='<?=$po_id?>';</script></td>
|
||||
</tr>
|
||||
</form>
|
||||
<tr>
|
||||
<td height="10" colspan="3"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="5" colspan="3" background="<?=$g4[bbs_img_path]?>/down_line.gif"></td>
|
||||
</tr>
|
||||
<tr align="center" valign="bottom">
|
||||
<td height="38" colspan="3"><a href="javascript:window.close();"><img src="<?=$g4[bbs_img_path]?>/close.gif" width="66" height="20" border="0"></a></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<script type='text/javascript'>
|
||||
function select_po_id(fld)
|
||||
<script>
|
||||
function fpollresult_submit(f)
|
||||
{
|
||||
document.location.href = "./poll_result.php?po_id="+fld.options[fld.selectedIndex].value;
|
||||
<? if ($is_guest) { echo chk_captcha_js(); } ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
Reference in New Issue
Block a user