$USER_ID=$USER->GetId(); $res=CIBlock::GetList(Array("DATE_ACTIVE_FROM"=>"DESC", "SORT"=>"ASC", "NAME" => "ASC"),Array('TYPE'=>'test_iblock','ACTIVE'=>'Y',"CNT_ACTIVE"=>"Y","PROPERTY_P_USER_ID"=>$USER_ID), true); while($item=$res->GetNext()) { $num_rec=$item["ELEMENT_CNT"]; }
$res_rate=CIBlockElement::GetList(array("ID"=>"DESC"), array("ACTIVE"=>"Y", "IBLOCK_TYPE"=>"Rating","PROPERTY_R_USER_ID"=>$USER_ID), false, array("nTopCount"=>1), array("PROPERTY_R_RATE")); while($ar=$res_rate->GetNext()) { $curent_rate=$ar["PROPERTY_R_RATE_VALUE"]; if(!empty($curent_rate)) echo "0"; }
if ($res_rate->SelectedRowsCount()==0) echo "0";
$USER_ID=$USER->GetId(); $res=CIBlockElement::GetList(array("ID"=>"DESC"), array("ACTIVE"=>"Y", "IBLOCK_TYPE"=>"Invitation","PROPERTY_R_USER_ID"=>$USER_ID), false, array(), array("PROPERTY_R_RATE")); $inv_rating=$res->SelectedRowsCount();