Advertisement
animdenis

active els

Oct 16th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1. \Bitrix\Main\Loader::includeModule('iblock');
  2. $dbSec = CIBlockElement::GetList([],['IBLOCK_ID' => 6]);
  3. $bs = new CIBlockElement;
  4. $cnt = 0;
  5. while($ob = $dbSec->GetNext()){
  6.   $bs->Update($ob['ID'], ['ACTIVE' => 'Y']);
  7.     $cnt++;
  8. }
  9. echo $cnt;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement