Bitrix Site Manager

CStopList::GetByID

CDBResult
CStopList::GetByID(
 int record_id
)

The method GetByID returns information on the stop list records.

Parameters

Parameter Description
record_id The ID of the stop list record.

Structure of the returned record

Array
(
    [ID] => the record ID
    [TIMESTAMP_X] => modification time
    [DATE_START] => date and time of record activation
    [DATE_END] => date and time of record deactivation
    [ACTIVE] => "Y" - record is active; "N" - record is inactive
    [SAVE_STATISTIC] => "Y" - keep statistics of the visitor
                        added to the stop list;
                        "N" - don't keep
    [IP_1] => the octet 1 of the IP address
    [IP_2] => the octet 2 of the IP address
    [IP_3] => the octet 3 of the IP address
    [IP_4] => the octet 4 of the IP address
    [MASK_1] => the octet 1 mask of the IP address
    [MASK_2] => the octet 2 mask of the IP address
    [MASK_3] => the octet 3 mask of the IP address
    [MASK_4] => the octet 4 mask of the IP address
    [USER_AGENT] => the visitor UserAgent
    [USER_AGENT_IS_NULL] => "Y" - the visitor UserAgent is not specified (empty);
                            "N" - specified (default)
    [URL_TO] => the target page url(or its part)
    [URL_FROM] => the referring page url(or its part)
    [MESSAGE] => text of the message which will
                 be displayed to the site visitor
                 if they match this stop list record
    [MESSAGE_LID] => language of the message in the field [MESSAGE]
    [URL_REDIRECT] => the page to which the visitor is to be
                      redirected after it have been found in the stop list
    [COMMENTS] => administrator's comment;
                  commonly used to explain reasons for creating the record
    [TEST] => "Y" - this is a test record;
              "N" - this is not a test record
              (see also: CStopList::Check)
    [SITE_ID] => the ID of the site for which the record is effective;
                 if not specified, the record is effective for all sites
    [LAMP] => "green" - the record is active and effective;
              "red" - the record is inactive (expired or became inactive)
)

See Also

Example



<?
$stop_id = 1;
if ($rs = CStopList::GetByID($stop_id))
{
    $ar = $rs->Fetch();
    // print the stop list record parameters
    echo "<pre>"; print_r($ar); echo "</pre>";
}
?>