mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1005 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c2209ea9b0
commit
160e9f5a65
6 changed files with 125 additions and 13 deletions
|
|
@ -5,7 +5,12 @@
|
|||
* @brief 설문조사 (poll) 모듈의 기본 언어팩
|
||||
**/
|
||||
|
||||
$lang->poll_stop_date = "설문조사 종료일";
|
||||
$lang->poll_total_count = "참가자";
|
||||
$lang->poll_check_count = "필수 선택 항목수";
|
||||
|
||||
$lang->cmd_delete_checked_poll = '선택항목 삭제';
|
||||
$lang->cmd_apply_poll = '설문 참여';
|
||||
|
||||
$lang->msg_cart_is_null = '삭제할 글을 선택해주세요';
|
||||
$lang->msg_checked_poll_is_deleted = '%d개의 설문조사가 삭제되었습니다';
|
||||
|
|
|
|||
|
|
@ -40,19 +40,25 @@
|
|||
$poll->poll[$val->poll_index_srl]->item[] = $val;
|
||||
}
|
||||
|
||||
// 현 사용자가 설문조사에 응하였는지 검사
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$output = executeQuery('poll.getPollLog', $args);
|
||||
if($output->data->count) $poll->poll_date = $output->data->regdate;
|
||||
else $poll->poll_date = '';
|
||||
Context::set('poll', $poll);
|
||||
// 종료일이 지났으면 무조건 결과만
|
||||
if($poll->stop_date > date("YmdHis")) {
|
||||
// 현 사용자가 설문조사에 응하였는지 검사
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
$output = executeQuery('poll.getPollLog', $args);
|
||||
if($output->data->count) $poll->poll_date = $output->data->regdate;
|
||||
else $poll->poll_date = '';
|
||||
Context::set('poll', $poll);
|
||||
|
||||
// 응하였다면 결과 html return
|
||||
if($poll->poll_date) $template_file = "result";
|
||||
// 응하였다면 결과 html return
|
||||
if($poll->poll_date) $template_file = "result";
|
||||
|
||||
// 응하지 않았다면 설문 form html return
|
||||
else $template_file = "form";
|
||||
// 응하지 않았다면 설문 form html return
|
||||
else $template_file = "form";
|
||||
|
||||
} else {
|
||||
$template_file = "result";
|
||||
}
|
||||
|
||||
$tpl_path = $this->module_path.'tpl';
|
||||
$tpl_file = $template_file;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<query id="getPollItem" action="select">
|
||||
<tables>
|
||||
<table name="poll_title" />
|
||||
<table name="poll_item" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
|
|
|
|||
54
modules/poll/tpl/css/poll.css
Normal file
54
modules/poll/tpl/css/poll.css
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
.poll_box {
|
||||
border:1px solid #EFEFEF;
|
||||
margin:5px;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.poll_title_box {
|
||||
border:2px solid #EFEFEF;
|
||||
margin:5px;
|
||||
padding:5px;
|
||||
height:13px;
|
||||
font-weight:bold;
|
||||
color:#AAAAAA;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.poll_stop_date {
|
||||
float:left;
|
||||
}
|
||||
|
||||
.poll_total_count {
|
||||
float:right;
|
||||
}
|
||||
|
||||
.poll_detail_box {
|
||||
border:1px solid #AAAAAA;
|
||||
margin:5px;
|
||||
}
|
||||
|
||||
.poll_detail_box .title {
|
||||
background-color:#EEEEEE;
|
||||
padding:5px;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.poll_detail_box .item {
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.poll_detail_box .checkcount {
|
||||
color:#555555;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.poll_button_area {
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.poll_button {
|
||||
border:1px solid #555555;
|
||||
background-color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
height:17px;
|
||||
}
|
||||
|
|
@ -1,2 +1,48 @@
|
|||
<!--%import("filter/poll.xml")-->
|
||||
haha
|
||||
<!--%import("css/poll.css")-->
|
||||
|
||||
<div class="poll_box">
|
||||
|
||||
<div class="poll_title_box">
|
||||
<div class="poll_total_count">
|
||||
{$lang->poll_total_count} : {number_format($poll->poll_count)}
|
||||
</div>
|
||||
<div class="poll_stop_date">
|
||||
{$lang->poll_stop_date} : {zdate($poll->stop_date, "Y-m-d H:i")}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--@foreach($poll->poll as $poll_srl_index => $val)-->
|
||||
|
||||
<div class="poll_detail_box">
|
||||
<div class="title">{$poll_srl_index}. {$val->title} ({$val->poll_count})</div>
|
||||
<!--@foreach($val->item as $item_srl => $item)-->
|
||||
{@$_idx = $poll->poll_srl.'_'.$poll_srl_index.'_'.$item_srl}
|
||||
<!--@if($val->checkcount>1)-->
|
||||
{@$_type = "checkbox"}
|
||||
<!--@else-->
|
||||
{@$_type = "radio"}
|
||||
<!--@end-->
|
||||
|
||||
|
||||
<div class="item">
|
||||
<input type="{$_type}" id="poll_item_{$_idx}" /> <label for="poll_item_{$_idx}">{$item->title} ({$item->poll_count})</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<div class="checkcount">
|
||||
{$lang->poll_check_count} : {$val->checkcount}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--@end-->
|
||||
|
||||
<div class="poll_button_area">
|
||||
<input type="submit" value="{$lang->cmd_apply_poll}" class="poll_button" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pre>
|
||||
{@print_r($poll)}
|
||||
</pre>
|
||||
|
||||
|
|
|
|||
1
modules/poll/tpl/result.html
Normal file
1
modules/poll/tpl/result.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
hihi
|
||||
Loading…
Add table
Add a link
Reference in a new issue