그누보드5 정식버전
This commit is contained in:
67
skin/poll/basic/poll.skin.php
Normal file
67
skin/poll/basic/poll.skin.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$poll_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<!-- 설문조사 시작 { -->
|
||||
<form name="fpoll" action="<?php echo G5_BBS_URL ?>/poll_update.php" onsubmit="return fpoll_submit(this);" method="post">
|
||||
<input type="hidden" name="po_id" value="<?php echo $po_id ?>">
|
||||
<input type="hidden" name="skin_dir" value="<?php echo $skin_dir ?>">
|
||||
<section id="poll">
|
||||
<header>
|
||||
<h2>설문조사</h2>
|
||||
<?php if ($is_admin == "super") { ?><a href="<?php echo G5_ADMIN_URL ?>/poll_form.php?w=u&po_id=<?php echo $po_id ?>" class="btn_admin">설문조사 관리</a><?php } ?>
|
||||
<p><?php echo $po['po_subject'] ?></p>
|
||||
</header>
|
||||
<ul>
|
||||
<?php for ($i=1; $i<=9 && $po["po_poll{$i}"]; $i++) { ?>
|
||||
<li><input type="radio" name="gb_poll" value="<?php echo $i ?>" id="gb_poll_<?php echo $i ?>"> <label for="gb_poll_<?php echo $i ?>"><?php echo $po['po_poll'.$i] ?></label></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<footer>
|
||||
<input type="submit" value="투표하기">
|
||||
<a href="<?php echo G5_BBS_URL."/poll_result.php?po_id=$po_id&skin_dir=$skin_dir" ?>" target="_blank" onclick="poll_result(this.href); return false;">결과보기</a>
|
||||
</footer>
|
||||
</section>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fpoll_submit(f)
|
||||
{
|
||||
<?php
|
||||
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) {
|
||||
chk = f.gb_poll[i].value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!chk) {
|
||||
alert("투표하실 설문항목을 선택하세요");
|
||||
return false;
|
||||
}
|
||||
|
||||
var new_win = window.open("about:blank", "win_poll", "width=616,height=500,scrollbars=yes,resizable=yes");
|
||||
f.target = "win_poll";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function poll_result(url)
|
||||
{
|
||||
<?php
|
||||
if ($member['mb_level'] < $po['po_level'])
|
||||
echo " alert('권한 {$po['po_level']} 이상의 회원만 결과를 보실 수 있습니다.'); return false; ";
|
||||
?>
|
||||
|
||||
win_poll(url);
|
||||
}
|
||||
</script>
|
||||
<!-- } 설문조사 끝 -->
|
||||
131
skin/poll/basic/poll_result.skin.php
Normal file
131
skin/poll/basic/poll_result.skin.php
Normal file
@ -0,0 +1,131 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
|
||||
add_stylesheet('<link rel="stylesheet" href="'.$poll_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
|
||||
<!-- 설문조사 결과 시작 { -->
|
||||
<div id="poll_result" class="new_win">
|
||||
<h1 id="win_title"><?php echo $g5['title'] ?></h1>
|
||||
|
||||
<!-- 설문조사 결과 그래프 시작 { -->
|
||||
<section id="poll_result_list">
|
||||
<h2><?php echo $po_subject ?> 결과</h2>
|
||||
|
||||
<dl>
|
||||
<dt><span>전체 <?php echo $nf_total_po_cnt ?>표</span></dt>
|
||||
<dd>
|
||||
<ol>
|
||||
<?php for ($i=1; $i<=count($list); $i++) { ?>
|
||||
<li>
|
||||
<p>
|
||||
<?php echo $list[$i]['content'] ?>
|
||||
<strong><?php echo $list[$i]['cnt'] ?> 표</strong>
|
||||
<span><?php echo number_format($list[$i]['rate'], 1) ?> 퍼센트</span>
|
||||
</p>
|
||||
<div class="poll_result_graph">
|
||||
<span style="width:<?php echo number_format($list[$i]['rate'], 1) ?>%"></span>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ol>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<!-- } 설문조사 결과 그래프 끝 -->
|
||||
|
||||
<!-- 설문조사 기타의견 시작 { -->
|
||||
<?php if ($is_etc) { ?>
|
||||
<section id="poll_result_cmt">
|
||||
<h2>이 설문에 대한 기타의견</h2>
|
||||
|
||||
<?php for ($i=0; $i<count($list2); $i++) { ?>
|
||||
<article>
|
||||
<header>
|
||||
<h1><?php echo $list2[$i]['pc_name'] ?><span class="sound_only">님의 의견</span></h1>
|
||||
<?php echo $list2[$i]['name'] ?>
|
||||
<span class="poll_datetime"><?php echo $list2[$i]['datetime'] ?></span>
|
||||
</header>
|
||||
<p>
|
||||
<?php echo $list2[$i]['idea'] ?>
|
||||
</p>
|
||||
<footer>
|
||||
<span class="poll_cmt_del"><?php if ($list2[$i]['del']) { echo $list2[$i]['del']."삭제</a>"; } ?></span>
|
||||
</footer>
|
||||
</article>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($member['mb_level'] >= $po['po_level']) { ?>
|
||||
<form name="fpollresult" action="./poll_etc_update.php" onsubmit="return fpollresult_submit(this);" method="post" autocomplete="off">
|
||||
<input type="hidden" name="po_id" value="<?php echo $po_id ?>">
|
||||
<input type="hidden" name="w" value="">
|
||||
<input type="hidden" name="skin_dir" value="<?php echo $skin_dir ?>">
|
||||
<?php if ($is_member) { ?><input type="hidden" name="pc_name" value="<?php echo cut_str($member['mb_nick'],255) ?>"><?php } ?>
|
||||
<h3><?php echo $po_etc ?></h3>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table id="poll_result_wcmt">
|
||||
<tbody>
|
||||
<?php if ($is_guest) { ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="pc_name">이름<strong class="sound_only">필수</strong></label></th>
|
||||
<td><input type="text" name="pc_name" id="pc_name" required class="frm_input required" size="10"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<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" required class="frm_input required" size="47" maxlength="100"></td>
|
||||
</tr>
|
||||
<?php if ($is_guest) { ?>
|
||||
<tr>
|
||||
<th scope="row">자동등록방지</th>
|
||||
<td><?php echo captcha_html(); ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" class="btn_submit" value="의견남기기">
|
||||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
</section>
|
||||
<?php } ?>
|
||||
<!-- } 설문조사 기타의견 끝 -->
|
||||
|
||||
<!-- 설문조사 다른 결과 보기 시작 { -->
|
||||
<aside id="poll_result_oth">
|
||||
<h2>다른 투표 결과 보기</h2>
|
||||
<ul>
|
||||
<?php for ($i=0; $i<count($list3); $i++) { ?>
|
||||
<li><a href="./poll_result.php?po_id=<?php echo $list3[$i]['po_id'] ?>&skin_dir=<?php echo $skin_dir ?>">[<?php echo $list3[$i]['date'] ?>] <?php echo $list3[$i]['subject'] ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</aside>
|
||||
<!-- } 설문조사 다른 결과 보기 끝 -->
|
||||
|
||||
<div class="win_btn">
|
||||
<button type="button" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$(".poll_delete").click(function() {
|
||||
if(!confirm("해당 기타의견을 삭제하시겠습니까?"))
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
function fpollresult_submit(f)
|
||||
{
|
||||
<?php if ($is_guest) { echo chk_captcha_js(); } ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
<!-- } 설문조사 결과 끝 -->
|
||||
90
skin/poll/basic/style.css
Normal file
90
skin/poll/basic/style.css
Normal file
@ -0,0 +1,90 @@
|
||||
@charset "utf-8";
|
||||
/* SIR 지운아빠 */
|
||||
|
||||
/* ### 기본 스타일 커스터마이징 시작 ### */
|
||||
|
||||
#poll a.btn_admin {} /* 관리자 전용 버튼 */
|
||||
#poll a.btn_admin:focus, #poll a.btn_admin:hover {}
|
||||
|
||||
#poll_result .tbl_frm table {}
|
||||
#poll_result .tbl_frm .frm_info {}
|
||||
#poll_result .tbl_frm .frm_address {}
|
||||
#poll_result .tbl_frm .frm_file {}
|
||||
#poll_result .tbl_frm caption {}
|
||||
|
||||
#poll_result .tbl_frm01 {}
|
||||
#poll_result .tbl_frm01 th {}
|
||||
#poll_result .tbl_frm01 td {}
|
||||
#poll_result .tbl_frm01 textarea, #poll_result tbl_frm01 .frm_input {}
|
||||
#poll_result .tbl_frm01 textarea {}
|
||||
/*
|
||||
#poll_result .tbl_frm01 #captcha {}
|
||||
#poll_result .tbl_frm01 #captcha input {}
|
||||
*/
|
||||
#poll_result .tbl_frm01 a {}
|
||||
|
||||
/* 필수입력 */
|
||||
#poll_result .required, #poll_result textarea.required {}
|
||||
|
||||
#poll_result .btn_confirm {} /* 서식단계 진행 */
|
||||
#poll_result .btn_submit {}
|
||||
#poll_result button.btn_submit {}
|
||||
#poll_result .win_btn {} /* 새창용 */
|
||||
#poll_result .win_btn button {}
|
||||
#poll_result .win_btn input {}
|
||||
#poll_result .win_btn a {}
|
||||
#poll_result .win_btn a:focus, #poll_result .win_btn a:hover {}
|
||||
|
||||
/* ### 기본 스타일 커스터마이징 끝 ### */
|
||||
|
||||
/* 설문조사 스킨 */
|
||||
#poll {border-bottom:1px solid #dde4e9}
|
||||
#poll header {position:relative;padding:15px 14px 0}
|
||||
#poll h2 {}
|
||||
#poll header .btn_admin {margin-top:5px;width:158px;text-align:center}
|
||||
#poll header p {padding:5px 0 0}
|
||||
#poll ul {margin:0 0 10px;padding:5px 14px;list-style:none}
|
||||
#poll li {padding:3px 0}
|
||||
#poll footer {padding:0 14px 14px}
|
||||
#poll footer input {width:88px;height:27px;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer}
|
||||
#poll footer a {display:inline-block;width:86px;height:25px;border:1px solid #ccc;background:#fafafa;text-align:center;line-height:2.2em}
|
||||
#poll footer a:focus, #poll footer a:hover {text-decoration:none !important}
|
||||
|
||||
/* 설문조사 결과 (새창) */
|
||||
#poll_result {}
|
||||
#poll_result section {margin:0 20px 20px;padding:15px;border:1px solid #dde4e9;background:#fff}
|
||||
#poll_result .tbl_wrap {margin:0}
|
||||
#poll_result h2 {margin:0;padding:20px 0}
|
||||
#poll_result a {}
|
||||
#poll_result .sv_member,
|
||||
#poll_result .sv_guest {font-weight:bold}
|
||||
#poll_result_list {margin:0 auto 20px}
|
||||
#poll_result_list h2 {text-align:center}
|
||||
#poll_result_list dl,
|
||||
#poll_result_list dt,
|
||||
#poll_result_list dd {margin:0;padding:0}
|
||||
#poll_result_list dl {padding-bottom:30px}
|
||||
#poll_result_list dt {margin-right:5%;color:#e8180d;text-align:right}
|
||||
#poll_result_list ol {margin:0;padding-left:30px}
|
||||
#poll_result_list li {margin-top:10px}
|
||||
#poll_result_list p {position:relative;margin:0;padding:5px 0}
|
||||
#poll_result_list p strong {position:absolute;top:5px;right:5%;padding-right:80px;width:100px;text-align:right}
|
||||
#poll_result_list p span {position:absolute;top:5px;right:5%;width:80px;color:#68999c;text-align:right}
|
||||
.poll_result_graph {position:relative;margin-right:5%;height:5px;background:#eee}
|
||||
.poll_result_graph span {position:absolute;top:0;left:0;height:5px;background:#565e60;font-size:0.1em}
|
||||
#poll_result_cmt {}
|
||||
#poll_result_cmt h2 {text-align:center}
|
||||
#poll_result_cmt h3 {margin:0 0 10px}
|
||||
#poll_result_cmt article {margin:0 0 15px;border-bottom:1px solid #eee}
|
||||
#poll_result_cmt h1 {position:absolute;margin:0;padding:0;border:0;font-size:0;text-indent:-9999em;line-height:0;overflow:hidden}
|
||||
.poll_datetime {display:inline-block;margin-left:10px}
|
||||
#poll_result_cmt p {padding:3px 0}
|
||||
#poll_result_cmt fieldset {margin-bottom:0;text-align:left}
|
||||
#poll_result_cmt fieldset p {margin:0 0 15px;padding:3px 0 0px;text-align:left}
|
||||
#poll_result_cmt footer {text-align:right}
|
||||
#poll_result_wcmt {margin:0 0 10px}
|
||||
.poll_cmt_del a {display:inline-block;padding-bottom:10px}
|
||||
#poll_result_oth {margin:0 auto 20px;width:93%}
|
||||
#poll_result_oth h2 {padding:0 0 10px}
|
||||
#poll_result_oth ul {margin:0;padding:0;list-style:none}
|
||||
#poll_result_oth a {display:block;padding:10px 0;border-bottom:1px solid #eee}
|
||||
Reference in New Issue
Block a user