本文整理汇总了PHP中Poll::getTranslations方法的典型用法代码示例。如果您正苦于以下问题:PHP Poll::getTranslations方法的具体用法?PHP Poll::getTranslations怎么用?PHP Poll::getTranslations使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poll
的用法示例。
在下文中一共展示了Poll::getTranslations方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: camp_html_breadcrumbs
camp_html_display_error(getGS('You do not have the right to manage polls.'));
exit;
}
$f_poll_nr = Input::Get('f_poll_nr', 'int');
$f_fk_language_id = Input::Get('f_fk_language_id', 'int');
$f_nr_answer = Input::Get('f_nr_answer', 'int');
$poll = new Poll($f_fk_language_id, $f_poll_nr);
$format = '%.2f';
$display[] = $poll;
foreach($poll->getTranslations() as $translation) {
if ($translation->getLanguageId() != $poll->getLanguageId()) {
$display[] = $translation;
}
}
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('Result'), ''),
));
?>
<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>
示例2: OnPollDelete
/**
* Called when poll is deleted
*
* @param int $p_poll_nr
*/
public static function OnPollDelete($p_poll_nr)
{
if (count(Poll::getTranslations($p_poll_nr)) > 1) {
return;
}
foreach (PollArticle::getAssignments($p_poll_nr) as $record) {
$record->delete();
}
}
示例3: 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);
}
}