From 61f574fe90156b1873abb3c5b353801f138ceb85 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 6 Apr 2007 08:37:00 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@1012 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- config/config.inc.php | 2 +- modules/poll/poll.controller.php | 5 ++++- modules/poll/poll.model.php | 3 ++- modules/poll/tpl/form.html | 2 +- modules/poll/tpl/js/poll.js | 2 ++ modules/poll/tpl/result.html | 1 - 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config/config.inc.php b/config/config.inc.php index ebb849cc9..5df74186b 100644 --- a/config/config.inc.php +++ b/config/config.inc.php @@ -18,7 +18,7 @@ /** * @brief debug mode = true 일때 files/_debug_message.php 에 디버그 내용이 쌓임 **/ - define('__DEBUG__', true); + define('__DEBUG__', false); if(__DEBUG__) { // php5이상이면 error handling을 handleError() 로 set diff --git a/modules/poll/poll.controller.php b/modules/poll/poll.controller.php index 172911203..710f3720a 100644 --- a/modules/poll/poll.controller.php +++ b/modules/poll/poll.controller.php @@ -165,8 +165,11 @@ $oDB->commit(); + // tpl 가져오기 + $tpl = $oPollModel->getPollHtml($poll_srl); + $this->add('poll_srl', $poll_srl); - $this->add('tpl','haha'); + $this->add('tpl',$tpl); $this->setMessage('success_poll'); } diff --git a/modules/poll/poll.model.php b/modules/poll/poll.model.php index 641d5a06f..b57dd0b4c 100644 --- a/modules/poll/poll.model.php +++ b/modules/poll/poll.model.php @@ -43,6 +43,7 @@ $poll->stop_date = $output->data->stop_date; $output = executeQuery('poll.getPollTitle', $args); + 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; @@ -64,7 +65,7 @@ $tpl_file = "result"; } - Context::set('poll', $poll); + Context::set('poll',$poll); $tpl_path = $this->module_path.'tpl'; diff --git a/modules/poll/tpl/form.html b/modules/poll/tpl/form.html index f4d9ee013..b9b56be53 100644 --- a/modules/poll/tpl/form.html +++ b/modules/poll/tpl/form.html @@ -6,7 +6,7 @@ var poll_alert_lang = "{$lang->msg_check_poll_item}"; -
+
diff --git a/modules/poll/tpl/js/poll.js b/modules/poll/tpl/js/poll.js index a88dfcfe5..495379790 100644 --- a/modules/poll/tpl/js/poll.js +++ b/modules/poll/tpl/js/poll.js @@ -45,5 +45,7 @@ function completePoll(ret_obj) { alert(ret_obj['message']); var poll_srl = ret_obj['poll_srl']; var tpl = ret_obj['tpl']; + var width = xWidth("poll_"+poll_srl); xInnerHtml("poll_"+poll_srl, tpl); + xWidth("poll_"+poll_srl, width); } diff --git a/modules/poll/tpl/result.html b/modules/poll/tpl/result.html index 6059657aa..0a2a0af3f 100644 --- a/modules/poll/tpl/result.html +++ b/modules/poll/tpl/result.html @@ -10,7 +10,6 @@ {$lang->poll_stop_date} : {zdate($poll->stop_date, "Y-m-d H:i")}
-
{$poll_srl_index}. {$val->title} ({$val->poll_count})