CAdvContract :: GetPageArray: Bitrix method

      
<?php 
//  CAdvContract :: GetPageArray()
//  /dist/bitrix/modules/advertising/classes/general/advertising.php:590

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