Documentation

GetSubscriptionCount

int
CRubric::GetSubscriptionCount(
    int ID
);

Method updates a number of subscribers to a defined newsletter. Considers both confirmed and unconfirmed subscribers. Static method.

Parameters

ParameterDescriptionAvailable from version
IDNewsletter identifier.

Returned values

integer, equal to the number of subscribers to newsletter. In case the subscription with specified identifier doesn't exist, returns "0" (zero).

Example

<?
//get site's newsletter categories
$rub = CRubric::GetList(array("SORT"=>"ASC", "NAME"=>"ASC"), array("ACTIVE"=>"Y", "LID"=>LANG));
while($rub->ExtractFields("r_")):
?>
    <input type="checkbox" name="sf_RUB_ID[]" value="<?echo $r_ID?>">
    <?echo $r_NAME?> (<?echo CRubric::GetSubscriptionCount($r_ID);?>)<br>
<?
endwhile;
?>


© «Bitrix24», 2001-2024
Up