mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 15:22:15 +09:00
NOISSUE PHP 5.4 이상 호환성 개선.
This commit is contained in:
parent
742af78932
commit
41ff8ace3b
32 changed files with 365 additions and 113 deletions
|
|
@ -19,6 +19,7 @@ class pollModel extends poll
|
|||
*/
|
||||
function isPolled($poll_srl)
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->poll_srl = $poll_srl;
|
||||
|
||||
if(Context::get('is_logged'))
|
||||
|
|
@ -41,12 +42,14 @@ class pollModel extends poll
|
|||
*/
|
||||
function getPollHtml($poll_srl, $style = '', $skin = 'default')
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->poll_srl = $poll_srl;
|
||||
// Get the information related to the survey
|
||||
$columnList = array('poll_count', 'stop_date');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
if(!$output->data) return '';
|
||||
|
||||
$poll = new stdClass;
|
||||
$poll->style = $style;
|
||||
$poll->poll_count = (int)$output->data->poll_count;
|
||||
$poll->stop_date = $output->data->stop_date;
|
||||
|
|
@ -55,8 +58,11 @@ class pollModel extends poll
|
|||
$output = executeQuery('poll.getPollTitle', $args, $columnList);
|
||||
if(!$output->data) return;
|
||||
if(!is_array($output->data)) $output->data = array($output->data);
|
||||
|
||||
$poll->poll = array();
|
||||
foreach($output->data as $key => $val)
|
||||
{
|
||||
$poll->poll[$val->poll_index_srl] = new stdClass;
|
||||
$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;
|
||||
|
|
@ -94,11 +100,13 @@ class pollModel extends poll
|
|||
*/
|
||||
function getPollResultHtml($poll_srl, $skin = 'default')
|
||||
{
|
||||
$args = new stdClass;
|
||||
$args->poll_srl = $poll_srl;
|
||||
// Get the information related to the survey
|
||||
$output = executeQuery('poll.getPoll', $args);
|
||||
if(!$output->data) return '';
|
||||
|
||||
$poll = new stdClass;
|
||||
$poll->style = $style;
|
||||
$poll->poll_count = (int)$output->data->poll_count;
|
||||
$poll->stop_date = $output->data->stop_date;
|
||||
|
|
@ -107,8 +115,11 @@ class pollModel extends poll
|
|||
$output = executeQuery('poll.getPollTitle', $args, $columnList);
|
||||
if(!$output->data) return;
|
||||
if(!is_array($output->data)) $output->data = array($output->data);
|
||||
|
||||
$poll->poll = array();
|
||||
foreach($output->data as $key => $val)
|
||||
{
|
||||
$poll->poll[$val->poll_index_srl] = new stdClass;
|
||||
$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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue