mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1123 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
18fdbd809f
commit
dcbdad4dd0
11 changed files with 54 additions and 4 deletions
|
|
@ -276,7 +276,10 @@
|
|||
* type == number가 아니면 addQuotes()를 하고 ' ' 로 묶음
|
||||
**/
|
||||
function getConditionValue($name, $value, $operation, $type) {
|
||||
if($type == 'number') return (int)$value;
|
||||
if($type == 'number') {
|
||||
if(strpos($value,',')===false && strpos($value,'(')===false) return (int)$value;
|
||||
return $value;
|
||||
}
|
||||
|
||||
switch($operation) {
|
||||
case 'like_prefix' :
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
$width = $matches[2];
|
||||
if(!$width) $width = 400;
|
||||
$style = sprintf('width:%dpx', $width);
|
||||
debugPrint($style);
|
||||
|
||||
// poll model 객체 생성해서 html 얻어와서 return
|
||||
$oPollModel = &getModel('poll');
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
<grants />
|
||||
<actions>
|
||||
<action name="dispPollAdminList" type="view" admin_index="true" standalone="true" />
|
||||
<action name="dispPollAdminResult" type="view" standalone="true" />
|
||||
|
||||
<action name="dispPollAdminConfig" type="controller" standalone="true" />
|
||||
|
||||
<action name="getPollGetColorsetList" type="model" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
$lang->msg_check_poll_item = '설문에 응할 항목을 선택하여 주세요. (설문조사 마다 필수 선택항목이 다를 수 있습니다)';
|
||||
$lang->msg_cart_is_null = '삭제할 설문을 선택해주세요';
|
||||
$lang->msg_checked_poll_is_deleted = '%d개의 설문이 삭제되었습니다';
|
||||
$lang->msg_poll_not_exists = '선택하신 설문이 존재하지 않습니다';
|
||||
|
||||
$lang->cmd_null_item = "설문조사로 등록할 값이 없습니다.\n다시 설정해주세요";
|
||||
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@
|
|||
|
||||
// 응답항목이 없으면 오류
|
||||
if(!count($item_srls)) return new Object(-1, 'msg_check_poll_item');
|
||||
|
||||
// 이미 설문하였는지 조사
|
||||
$oPollModel = &getModel('poll');
|
||||
if($oPollModel->isPolled($poll_srl)) return new Object(-1, 'msg_already_poll');
|
||||
|
|
@ -143,9 +144,9 @@
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
// 설문 항목 추가
|
||||
$args->poll_srl = $poll_srl;
|
||||
|
||||
// 해당 글의 모든 설문조사의 응답수 올림
|
||||
$output = executeQuery('poll.updatePoll', $args);
|
||||
$output = executeQuery('poll.updatePollTitle', $args);
|
||||
if(!$output->toBool()) {
|
||||
|
|
@ -153,6 +154,7 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
// 각 설문조사의 선택된 항목을 기록
|
||||
$args->poll_item_srl = implode(',',$item_srls);
|
||||
$output = executeQuery('poll.updatePollItems', $args);
|
||||
if(!$output->toBool()) {
|
||||
|
|
|
|||
|
|
@ -81,5 +81,45 @@
|
|||
$this->setTemplateFile('config');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설문조사 결과
|
||||
**/
|
||||
function dispPollAdminResult() {
|
||||
// 팝업 레이아웃
|
||||
$this->setLayoutFile("popup_layout");
|
||||
|
||||
// 결과 뽑기
|
||||
$args->poll_srl = Context::get('poll_srl');
|
||||
$args->poll_index_srl = Context::get('poll_index_srl');
|
||||
|
||||
$output = executeQuery('poll.getPoll', $args);
|
||||
if(!$output->data) return $this->stop('msg_poll_not_exists');
|
||||
$poll->stop_date = $output->data->stop_date;
|
||||
$poll->poll_count = $output->data->poll_count;
|
||||
|
||||
$output = executeQuery('poll.getPollTitle', $args);
|
||||
if(!$output->data) return $this->stop('msg_poll_not_exists');
|
||||
|
||||
$poll->poll[$args->poll_index_srl]->title = $output->data->title;
|
||||
$poll->poll[$args->poll_index_srl]->checkcount = $output->data->checkcount;
|
||||
$poll->poll[$args->poll_index_srl]->poll_count = $output->data->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;
|
||||
|
||||
Context::set('poll',$poll);
|
||||
|
||||
// 기본 설정의 스킨, 컬러셋 설정
|
||||
$oModuleModel = &getModel('module');
|
||||
$poll_config = $oModuleModel->getModuleConfig('poll');
|
||||
Context::set('poll_config', $poll_config);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('result');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -7,5 +7,6 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" />
|
||||
<condition operation="equal" column="poll_index_srl" var="poll_index_srl" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -7,5 +7,6 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" />
|
||||
<condition operation="equal" column="poll_index_srl" var="poll_index_srl" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
background-color:#EEEEEE;
|
||||
margin:5px;
|
||||
padding:8px 5px 8px 5px;
|
||||
width:500px;
|
||||
}
|
||||
|
||||
.poll_title_box {
|
||||
BIN
modules/poll/tpl/images/blank.gif
Normal file
BIN
modules/poll/tpl/images/blank.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
|
|
@ -1,6 +1,6 @@
|
|||
<!--%import("css/poll.css")-->
|
||||
|
||||
<div class="poll_box" style="{$poll->style}">
|
||||
<div class="poll_box">
|
||||
|
||||
<div class="poll_title_box">
|
||||
<div class="poll_join_count">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue