23 $args->poll_srl = $poll_srl;
32 $args->ipaddress = $_SERVER[
'REMOTE_ADDR'];
35 if(
$output->data->count)
return true;
43 function getPollHtml($poll_srl, $style =
'', $skin =
'default')
46 $args->poll_srl = $poll_srl;
48 $columnList = array(
'poll_count',
'stop_date');
53 $poll->style = $style;
54 $poll->poll_count = (int)
$output->data->poll_count;
55 $poll->stop_date =
$output->data->stop_date;
57 $columnList = array(
'poll_index_srl',
'title',
'checkcount',
'poll_count');
62 $poll->poll = array();
63 foreach(
$output->data as $key => $val)
65 $poll->poll[$val->poll_index_srl] =
new stdClass;
66 $poll->poll[$val->poll_index_srl]->title = $val->title;
67 $poll->poll[$val->poll_index_srl]->checkcount = $val->checkcount;
68 $poll->poll[$val->poll_index_srl]->poll_count = $val->poll_count;
72 foreach(
$output->data as $key => $val)
74 $poll->poll[$val->poll_index_srl]->item[] = $val;
77 $poll->poll_srl = $poll_srl;
79 if($poll->stop_date >= date(
"Ymd"))
81 if($this->
isPolled($poll_srl)) $tpl_file =
"result";
82 else $tpl_file =
"form";
92 $tpl_path = sprintf(
"%sskins/%s/", $this->module_path, $skin);
95 return $oTemplate->compile($tpl_path, $tpl_file);
103 $args =
new stdClass;
104 $args->poll_srl = $poll_srl;
109 $poll =
new stdClass;
110 $poll->style = $style;
111 $poll->poll_count = (int)
$output->data->poll_count;
112 $poll->stop_date =
$output->data->stop_date;
114 $columnList = array(
'poll_index_srl',
'title',
'checkcount',
'poll_count');
119 $poll->poll = array();
120 foreach(
$output->data as $key => $val)
122 $poll->poll[$val->poll_index_srl] =
new stdClass;
123 $poll->poll[$val->poll_index_srl]->title = $val->title;
124 $poll->poll[$val->poll_index_srl]->checkcount = $val->checkcount;
125 $poll->poll[$val->poll_index_srl]->poll_count = $val->poll_count;
129 foreach(
$output->data as $key => $val)
131 $poll->poll[$val->poll_index_srl]->item[] = $val;
134 $poll->poll_srl = $poll_srl;
136 $tpl_file =
"result";
140 $tpl_path = sprintf(
"%sskins/%s/", $this->module_path, $skin);
143 return $oTemplate->compile($tpl_path, $tpl_file);
153 $skin_info =
$oModuleModel->loadSkinInfo($this->module_path, $skin);
155 for($i=0;$i<count($skin_info->colorset);$i++)
157 $colorset = sprintf(
'%s|@|%s', $skin_info->colorset[$i]->name, $skin_info->colorset[$i]->title);
158 $colorset_list[] = $colorset;
161 if(count($colorset_list)) $colorsets = implode(
"\n", $colorset_list);
162 $this->
add(
'colorset_list', $colorsets);
getPollHtml($poll_srl, $style= '', $skin= 'default')
Return the HTML data of the survey Return the result after checking if the poll has responses...
The model class for the poll modules.
getPollGetColorsetList()
Selected poll - return the colorset of the skin.
set($key, $val, $set_to_get_vars=0)
isPolled($poll_srl)
The function examines if the user has already been polled.
executeQuery($query_id, $args=NULL, $arg_columns=NULL)
The parent class of the poll module.
getPollResultHtml($poll_srl, $skin= 'default')
Return the result's HTML.