<?php define(«NO_KEEP_STATISTIC», true); require($_SERVER[«DOCUMENT_ROOT»] . «/bitrix/modules/main/include/prolog_before.php»); \Bitrix\Main\Loader::includeModule(‘iblock’); $arSelect = Array(«ID», ‘NAME’); $arFilter = Array(«IBLOCK_ID»=>IntVal(27)); $res = CIBlockElement::GetList(Array(), $arFilter, false, Array(«nPageSize»=>999999), $arSelect); while($ob = $res->GetNextElement()) { $arFields = $ob->GetFields(); $pos = strripos($arFields[‘NAME’], ‘penosil’); if ($pos === false){ $need_rating = rand(4, 5); }else{ $need_rating = 5; } $vote_count = rand(15, 120); $vote_sum = $vote_count * $need_rating; $rat…
Читать дальше
Комментарии к интересностям