本文整理汇总了PHP中Poll::getProperty方法的典型用法代码示例。如果您正苦于以下问题:PHP Poll::getProperty方法的具体用法?PHP Poll::getProperty怎么用?PHP Poll::getProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poll
的用法示例。
在下文中一共展示了Poll::getProperty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Poll
if (!$g_user->hasPermission('plugin_poll')) {
camp_html_display_error(getGS('You do not have the right to manage polls.'));
exit;
}
$allLanguages = Language::GetLanguages();
$f_poll_nr = Input::Get('f_poll_nr', 'int');
$f_fk_language_id = Input::Get('f_fk_language_id', 'int');
$f_from = Input::Get('f_from', 'string', false);
$poll = new Poll($f_fk_language_id, $f_poll_nr);
if ($poll->exists()) {
// edit existing poll
$parent_poll_nr = $poll->getProperty('parent_poll_nr');
$is_extended = $poll->isExtended();
$title = $poll->getProperty('title');
$question = $poll->getProperty('question');
$date_begin = $poll->getProperty('date_begin');
$date_end = $poll->getProperty('date_end');
$nr_of_answers = $poll->getProperty('nr_of_answers');
$fk_language_id = $poll->getProperty('fk_language_id');
$votes_per_user = $poll->getProperty('votes_per_user');
$poll_answers = $poll->getAnswers();
foreach ($poll_answers as $poll_answer) {
$answers[$poll_answer->getProperty('nr_answer')] = $poll_answer->getProperty('answer');
}
示例2: SyncNrOfAnswers
public static function SyncNrOfAnswers($p_fk_language_id, $p_fk_poll_nr)
{
global $g_ado_db;
$poll = new Poll($p_fk_language_id, $p_fk_poll_nr);
if (count($poll->getTranslations()) > 1) {
$nr_of_answers = $poll->getProperty('nr_of_answers');
$query = "DELETE FROM plugin_poll_answer
WHERE fk_poll_nr = $p_fk_poll_nr
AND fk_language_id = $p_fk_language_id
AND nr_answer > $nr_of_answers";
$g_ado_db->execute($query);
Poll::triggerStatistics($p_fk_poll_nr);
}
}
示例3: camp_html_breadcrumbs
camp_html_display_error(getGS('You do not have the right to manage polls.'));
exit;
}
$allLanguages = Language::GetLanguages();
$f_poll_nr = Input::Get('f_poll_nr', 'int');
$f_fk_language_id = Input::Get('f_fk_language_id', 'int');
$poll = new Poll($f_fk_language_id, $f_poll_nr);
if ($poll->exists()) {
foreach ($poll->getTranslations() as $translation) {
$existing[$translation->getLanguageId()] = true;
}
$title = $poll->getProperty('title');
$question = $poll->getProperty('question');
$is_used_as_default = false;
}
echo camp_html_breadcrumbs(array(
array(getGS('Plugins'), $Campsite['WEBSITE_URL'] . '/admin/plugins/manage.php'),
array(getGS('Polls'), $Campsite['WEBSITE_URL'] . '/admin/poll/index.php'),
array(getGS('Translate Poll'), ''),
));
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" class="action_buttons" style="padding-top: 5px;">
<TR>
<TD><A HREF="index.php"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/left_arrow.png" BORDER="0"></A></TD>
<TD><A HREF="index.php"><B><?php putGS("Poll List"); ?></B></A></TD>
</TR>
示例4: Poll
exit;
}
$allLanguages = Language::GetLanguages();
$f_poll_nr = Input::Get('f_poll_nr', 'int');
$f_fk_language_id = Input::Get('f_fk_language_id', 'int');
$poll = new Poll($f_fk_language_id, $f_poll_nr);
if (!$poll->exists()) {
camp_html_display_error(getGS('Poll does not exists.'));
exit;
}
$title = $poll->getProperty('title');
$question = $poll->getProperty('question');
$date_begin = $poll->getProperty('date_begin');
$date_end = $poll->getProperty('date_end');
$fk_language_id = $poll->getProperty('fk_language_id');
$votes_per_user = $poll->getProperty('votes_per_user');
/*
$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj,
'Section' => $sectionObj);
camp_html_content_top(getGS('Add new article'), $topArray, true, false, array(getGS("Articles") => "/$ADMIN/articles/?f_publication_id=$f_publication_id&f_issue_number=$f_issue_number&f_section_number=$f_section_number&f_language_id=$f_language_id"));
*/
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" class="action_buttons" style="padding-top: 5px;">
<TR>
<TD><A HREF="index.php"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/left_arrow.png" BORDER="0"></A></TD>