Exemplo n.º 1
0
}
$arParams['RATING_ID'] = IntVal($arParams['RATING_ID']);
$arParams['ENTITY_ID'] = IntVal($arParams['ENTITY_ID']);
if (isset($arParams['LINK'])) {
    $arResult['LINK'] = $arParams['LINK'];
}
$arResult["SHOW_RATING_NAME"] = 'Y';
if (isset($arParams['SHOW_RATING_NAME']) && $arParams['SHOW_RATING_NAME'] == 'N') {
    $arResult["SHOW_RATING_NAME"] = 'N';
} else {
    if (isset($arParams['RATING_NAME'])) {
        $arResult["RATING_NAME"] = $arParams["RATING_NAME"];
    } else {
        if ($arParams['RATING_ID'] > 0) {
            $arRating = CRatings::GetArrayByID($arParams['RATING_ID']);
            if ($arRating = CRatings::GetArrayByID($arParams['RATING_ID'])) {
                $arResult['RATING_NAME'] = $arRating['NAME'];
            } else {
                $arParams['TEMPLATE_HIDE'] = 'Y';
            }
        } else {
            $arResult['RATING_NAME'] = GetMessage('RATING_NAME');
        }
    }
}
if (isset($arParams['RESULT_TYPE']) && $arParams['RESULT_TYPE'] == 'POSITION') {
    $arResult['RESULT_TYPE'] = 'POSITION';
    if (isset($arParams['CURRENT_POSITION'])) {
        $arResult["CURRENT_POSITION"] = intval($arParams["CURRENT_POSITION"]);
    }
    if (isset($arParams['PREVIOUS_POSITION'])) {