Код |
---|
$arFilter = array( "TO_USER_ID" => $GLOBALS["USER"]->GetID(), "DATE_VIEW" => "", "TO_DELETED" => "N" ); $dbUserRequests = CSocNetMessages::GetList( array(), $arFilter, array("TO_USER_ID"), false, array("COUNT" => "ID") ); if ($arUserRequests = $dbUserRequests->Fetch()) { $arResult["ITEMS_TOTAL"] += intval($arUserRequests["CNT"]); $arResult["ITEMS_MESSAGES"] += intval($arUserRequests["CNT"]); } |