Documentation

GetPrevVote

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

The function returns the ID of the previous poll in the channel.

Parameters

ParameterDescription
GROUP_SYMBOLIC_NAMESymbolic name of the channel.
level Level of the poll for which the ID is to be returned (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 example displays the diagram of results of the previous poll.

<?
function ShowPrevVoteResults($GROUP_SYMBOLIC_NAME, $level=1, $lid=LANG)
{
    $PREV_VOTE_ID = GetPrevVote($GROUP_SYMBOLIC_NAME, $level, $lid);
    if (intval($PREV_VOTE_ID) > 0)
        ShowVoteResults($PREV_VOTE_ID);
}
?>
© «Bitrix24», 2001-2024
Up