CAdvBanner::GetPageArray: Bitrix method

      
<?php 
//  CAdvBanner :: GetPageArray()
//  /dist/bitrix/modules/advertising/classes/general/advertising.php:1552

    
public static function GetPageArray($BANNER_ID$SHOW="SHOW")
    {
        
$err_mess = (CAdvBanner_all::err_mess())."<br>Function: GetPageArray<br>Line: ";
        global 
$DB;
        
$BANNER_ID intval($BANNER_ID);
        if (
$BANNER_ID<=0)
            return 
false;
        
$arrRes = array();
        
$SHOW_ON_PAGE = ($SHOW=="NOT_SHOW") ? "'N'" "'Y'";
        
$strSql "
            SELECT DISTINCT
                PAGE
            FROM
                b_adv_banner_2_page
            WHERE
                BANNER_ID = 
$BANNER_ID
            and    SHOW_ON_PAGE = 
$SHOW_ON_PAGE
            "
;
        
$rs $DB->Query($strSqlfalse$err_mess.__LINE__);
        while (
$ar $rs->Fetch())
            
$arrRes[] = $ar["PAGE"];
        return 
$arrRes;
    }