Last active
          January 26, 2016 08:21 
        
      - 
      
 - 
        
Save marat-dimaev/16e5c5e0b02fff42626b to your computer and use it in GitHub Desktop.  
    Bitrix arrFilters
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $arFilter = array(); | |
| // Фильтр по дате активности | |
| $arFilter["<=DATE_ACTIVE_FROM"] = ConvertTimeStamp(time(),'FULL'); | |
| // Логический фильтр | |
| $logic = array("LOGIC" => "OR"); | |
| foreach ($periods as $period) { | |
| $time = ($NowTime-(86400*$period['days'])); | |
| $logic[] = array("<=DATE_ACTIVE_FROM"=>ConvertTimeStamp($time,'FULL'),'PROPERTY_21'=>$period['value_id']); | |
| } | |
| $arFilter[] = $logic; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment