ShowVoteResults
ShowVoteResults( VOTE_ID, [ template] );
The function emits the HTML code of the diagram displaying results of the specified poll.
Parameters
Parameter | Description |
---|---|
VOTE_ID | Poll ID. |
template | Name of the template file used to display the poll results. If omitted, the template specified in the poll settings is used instead. |
Example
The following is the example of the file vote_results.php used in the public section.
<? // Display the poll results by its ID. require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); if (strlen($APPLICATION->GetTitle()) <= 0) $APPLICATION->SetTitle(GetMessage("VOTE_RESULTS_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")) ShowVoteResults($VOTE_ID); require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog.php"); ?>
© «Bitrix24», 2001-2024