Documentation

ShowPrevVoteResults

ShowPrevVoteResults (
 GROUP_SYMBOLIC_NAME, [
 level, [
 lid]]
);

The function emits the HTML code of the diagram displaying results of the previous poll of the specified channel.

Parameters

ParameterDescription
GROUP_SYMBOLIC_NAMESymbolic name of the channel.
level Level of the poll for which the diagram is to be displayed (1 - previous, 2 - poll before previous etc.). The default value is 1.
lid Site ID. By default, the current site ID is used.

Example

The following is the example of the file vote_prev.php used in the public section.

<?
// Display results of the previous poll of the specified group.

require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
if (strlen($APPLICATION->GetTitle())<=0)
    $APPLICATION->SetTitle(GetMessage("VOTE_PREV_VOTING_TITLE"));

$APPLICATION->AddChainItem(GetMessage("VOTE_VOTES_LIST"), "vote_list.php");
require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_after.php");
?><?
if (CModule::IncludeModule("vote"))
    ShowPrevVoteResults("ANKETA");
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog.php");
?>
© «Bitrix24», 2001-2024
Up