mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
#174 설문조사 결과 보기 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2733 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ece48de14e
commit
e4d55fc4d1
10 changed files with 80 additions and 2 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
<action name="procInsert" type="controller" standalone="true" />
|
<action name="procInsert" type="controller" standalone="true" />
|
||||||
<action name="procPoll" type="controller" standalone="true" />
|
<action name="procPoll" type="controller" standalone="true" />
|
||||||
|
<action name="procPollViewResult" type="controller" standalone="true" />
|
||||||
<action name="procPollAdminDeleteChecked" type="controller" standalone="true" />
|
<action name="procPollAdminDeleteChecked" type="controller" standalone="true" />
|
||||||
<action name="procPollAdminInsertConfig" type="controller" standalone="true" />
|
<action name="procPollAdminInsertConfig" type="controller" standalone="true" />
|
||||||
</actions>
|
</actions>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
$lang->cmd_poll_list = 'View poll list';
|
$lang->cmd_poll_list = 'View poll list';
|
||||||
$lang->cmd_delete_checked_poll = 'Delete selected poll';
|
$lang->cmd_delete_checked_poll = 'Delete selected poll';
|
||||||
$lang->cmd_apply_poll = 'Apply poll';
|
$lang->cmd_apply_poll = 'Apply poll';
|
||||||
|
$lang->cmd_view_result = 'Preview result';
|
||||||
$lang->cmd_delete_checked_poll = 'Delete selected poll';
|
$lang->cmd_delete_checked_poll = 'Delete selected poll';
|
||||||
|
|
||||||
$lang->success_poll = 'Thank you for joining the poll.';
|
$lang->success_poll = 'Thank you for joining the poll.';
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
$lang->cmd_poll_list = 'Ver la lista de la encuesta';
|
$lang->cmd_poll_list = 'Ver la lista de la encuesta';
|
||||||
$lang->cmd_delete_checked_poll = 'Eliminar la encuesta seleccionada';
|
$lang->cmd_delete_checked_poll = 'Eliminar la encuesta seleccionada';
|
||||||
$lang->cmd_apply_poll = 'Aplicar la encuesta';
|
$lang->cmd_apply_poll = 'Aplicar la encuesta';
|
||||||
|
$lang->cmd_view_result = 'Preview result';
|
||||||
$lang->cmd_delete_checked_poll = 'Eliminar la encuesta seleccionada';
|
$lang->cmd_delete_checked_poll = 'Eliminar la encuesta seleccionada';
|
||||||
|
|
||||||
$lang->success_poll = 'Gracias por participar en la encuesta.';
|
$lang->success_poll = 'Gracias por participar en la encuesta.';
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
$lang->cmd_poll_list = 'アンケートのリスト表示';
|
$lang->cmd_poll_list = 'アンケートのリスト表示';
|
||||||
$lang->cmd_delete_checked_poll = '選択項目削除';
|
$lang->cmd_delete_checked_poll = '選択項目削除';
|
||||||
$lang->cmd_apply_poll = 'アンケート調査へ参加する';
|
$lang->cmd_apply_poll = 'アンケート調査へ参加する';
|
||||||
|
$lang->cmd_view_result = 'Preview result';
|
||||||
$lang->cmd_delete_checked_poll = '選択アンケート削除';
|
$lang->cmd_delete_checked_poll = '選択アンケート削除';
|
||||||
|
|
||||||
$lang->success_poll = 'アンケート調査へのご応募ありがとうございます。';
|
$lang->success_poll = 'アンケート調査へのご応募ありがとうございます。';
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
$lang->cmd_poll_list = '설문조사 목록 보기';
|
$lang->cmd_poll_list = '설문조사 목록 보기';
|
||||||
$lang->cmd_delete_checked_poll = '선택항목 삭제';
|
$lang->cmd_delete_checked_poll = '선택항목 삭제';
|
||||||
$lang->cmd_apply_poll = '설문 참여';
|
$lang->cmd_apply_poll = '설문 참여';
|
||||||
|
$lang->cmd_view_result = '결과 보기';
|
||||||
$lang->cmd_delete_checked_poll = '선택 설문 삭제';
|
$lang->cmd_delete_checked_poll = '선택 설문 삭제';
|
||||||
|
|
||||||
$lang->success_poll = '설문에 응하여 주셔서 감사합니다';
|
$lang->success_poll = '설문에 응하여 주셔서 감사합니다';
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
$lang->cmd_poll_list = '查看目录';
|
$lang->cmd_poll_list = '查看目录';
|
||||||
$lang->cmd_delete_checked_poll = '删除所选项目';
|
$lang->cmd_delete_checked_poll = '删除所选项目';
|
||||||
$lang->cmd_apply_poll = '参与投票';
|
$lang->cmd_apply_poll = '参与投票';
|
||||||
|
$lang->cmd_view_result = 'Preview result';
|
||||||
$lang->cmd_delete_checked_poll = '删除所选';
|
$lang->cmd_delete_checked_poll = '删除所选';
|
||||||
|
|
||||||
$lang->success_poll = '感谢您参与投票。';
|
$lang->success_poll = '感谢您参与投票。';
|
||||||
|
|
|
||||||
|
|
@ -190,5 +190,18 @@
|
||||||
$this->add('tpl',$tpl);
|
$this->add('tpl',$tpl);
|
||||||
$this->setMessage('success_poll');
|
$this->setMessage('success_poll');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 결과 미리 보기
|
||||||
|
**/
|
||||||
|
function procPollViewResult() {
|
||||||
|
$poll_srl = Context::get('poll_srl');
|
||||||
|
|
||||||
|
$oPollModel = &getModel('poll');
|
||||||
|
$tpl = $oPollModel->getPollResultHtml($poll_srl);
|
||||||
|
|
||||||
|
$this->add('poll_srl', $poll_srl);
|
||||||
|
$this->add('tpl',$tpl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,51 @@
|
||||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 결과 html을 return
|
||||||
|
**/
|
||||||
|
function getPollResultHtml($poll_srl) {
|
||||||
|
$args->poll_srl = $poll_srl;
|
||||||
|
|
||||||
|
// 해당 설문조사에 대한 내용을 조사
|
||||||
|
$output = executeQuery('poll.getPoll', $args);
|
||||||
|
if(!$output->data) return '';
|
||||||
|
|
||||||
|
$poll->style = $style;
|
||||||
|
$poll->poll_count = (int)$output->data->poll_count;
|
||||||
|
$poll->stop_date = $output->data->stop_date;
|
||||||
|
|
||||||
|
$output = executeQuery('poll.getPollTitle', $args);
|
||||||
|
if(!$output->data) return;
|
||||||
|
if(!is_array($output->data)) $output->data = array($output->data);
|
||||||
|
foreach($output->data as $key => $val) {
|
||||||
|
$poll->poll[$val->poll_index_srl]->title = $val->title;
|
||||||
|
$poll->poll[$val->poll_index_srl]->checkcount = $val->checkcount;
|
||||||
|
$poll->poll[$val->poll_index_srl]->poll_count = $val->poll_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = executeQuery('poll.getPollItem', $args);
|
||||||
|
foreach($output->data as $key => $val) {
|
||||||
|
$poll->poll[$val->poll_index_srl]->item[] = $val;
|
||||||
|
}
|
||||||
|
|
||||||
|
$poll->poll_srl = $poll_srl;
|
||||||
|
|
||||||
|
$tpl_file = "result";
|
||||||
|
|
||||||
|
Context::set('poll',$poll);
|
||||||
|
|
||||||
|
// 기본 설정의 스킨, 컬러셋 설정
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$poll_config = $oModuleModel->getModuleConfig('poll');
|
||||||
|
if(!$poll_config->skin) $poll_config->skin = 'default';
|
||||||
|
Context::set('poll_config', $poll_config);
|
||||||
|
$tpl_path = sprintf("%sskins/%s/", $this->module_path, $poll_config->skin);
|
||||||
|
|
||||||
|
$oTemplate = &TemplateHandler::getInstance();
|
||||||
|
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 선택된 설문조사 - 스킨의 컬러셋을 return
|
* @brief 선택된 설문조사 - 스킨의 컬러셋을 return
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,12 @@
|
||||||
<td class="r"><img src="./images/blank.gif" height="7" alt="blank" /></td>
|
<td class="r"><img src="./images/blank.gif" height="7" alt="blank" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="poll_button"><div><span class="button"><input type="submit" value="{$lang->cmd_apply_poll}" class="poll_button" /></span></div></td>
|
<td colspan="3" class="poll_button">
|
||||||
|
<div>
|
||||||
|
<span class="button"><input type="button" value="{$lang->cmd_view_result}" class="poll_button" onclick="doPollViewResult('{$poll->poll_srl}'); return false;"/></span>
|
||||||
|
<span class="button"><input type="submit" value="{$lang->cmd_apply_poll}" class="poll_button" /></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="lb" ><img src="./images/lb.png" alt="lb" class="iePngFix" width="7" height="7" /></td>
|
<td class="lb" ><img src="./images/lb.png" alt="lb" class="iePngFix" width="7" height="7" /></td>
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,19 @@ function doPoll(fo_obj) {
|
||||||
|
|
||||||
/* 설문 조사후 내용을 바꿀 함수 */
|
/* 설문 조사후 내용을 바꿀 함수 */
|
||||||
function completePoll(ret_obj) {
|
function completePoll(ret_obj) {
|
||||||
alert(ret_obj['message']);
|
|
||||||
var poll_srl = ret_obj['poll_srl'];
|
var poll_srl = ret_obj['poll_srl'];
|
||||||
var tpl = ret_obj['tpl'];
|
var tpl = ret_obj['tpl'];
|
||||||
var width = xWidth("poll_"+poll_srl);
|
var width = xWidth("poll_"+poll_srl);
|
||||||
xInnerHtml("poll_"+poll_srl, tpl);
|
xInnerHtml("poll_"+poll_srl, tpl);
|
||||||
xWidth("poll_"+poll_srl, width);
|
xWidth("poll_"+poll_srl, width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 설문 미리 보기 */
|
||||||
|
function doPollViewResult(poll_srl) {
|
||||||
|
var params = new Array();
|
||||||
|
params['poll_srl'] = poll_srl;
|
||||||
|
|
||||||
|
var response_tags = new Array('error','message','poll_srl', 'tpl');
|
||||||
|
|
||||||
|
exec_xml('poll','procPollViewResult', params, completePoll, response_tags);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue