$APPLICATION->SetTitle($strTitleFormatted . ": " . GetMessage("SONET_C35_PAGE_TITLE")); } if ($arParams["SET_NAV_CHAIN"] != "N") { $APPLICATION->AddChainItem($strTitleFormatted, $arResult["Urls"]["User"]); $APPLICATION->AddChainItem(GetMessage("SONET_C35_PAGE_TITLE")); } if ($arResult["CurrentUserPerms"]["IsCurrentUser"]) { $arResult["FatalError"] = GetMessage("SONET_C35_SELF") . ". "; } elseif ($arResult["CurrentUserRelation"] != SONET_RELATIONS_FRIEND) { $arResult["FatalError"] = GetMessage("SONET_C35_NOT_FRIEND") . ". "; } else { $arResult["ShowForm"] = "Input"; if ($_SERVER["REQUEST_METHOD"] == "POST" && strlen($_POST["save"]) > 0 && check_bitrix_sessid()) { $errorMessage = ""; if (strlen($errorMessage) <= 0) { if (!CSocNetUserRelations::DeleteRelation($GLOBALS["USER"]->GetID(), $arResult["User"]["ID"])) { if ($e = $APPLICATION->GetException()) { $errorMessage .= $e->GetString(); } } } if (strlen($errorMessage) > 0) { $arResult["ErrorMessage"] = $errorMessage; } else { $arResult["ShowForm"] = "Confirm"; } } } } } }
if ($_SERVER["REQUEST_METHOD"] == "POST" && strlen($_POST["delete"]) > 0 && $arResult["CurrentUserPerms"]["IsCurrentUser"] && check_bitrix_sessid()) { $errorMessage = ""; $arIDs = array(); if (strlen($errorMessage) <= 0) { for ($i = 0; $i <= IntVal($_POST["max_count"]); $i++) { if ($_POST["checked_" . $i] == "Y") { $arIDs[] = IntVal($_POST["id_" . $i]); } } if (count($arIDs) <= 0) { $errorMessage .= GetMessage("SONET_C33_NOT_SELECTED") . ". "; } } if (strlen($errorMessage) <= 0) { foreach ($arIDs as $user_id) { if (!CSocNetUserRelations::DeleteRelation($arResult["User"]["ID"], $user_id)) { if ($e = $APPLICATION->GetException()) { $errorMessage .= $e->GetString(); } } } } if (strlen($errorMessage) > 0) { $arResult["ErrorMessage"] = $errorMessage; } } if ($arResult["CurrentUserPerms"] && $arResult["CurrentUserPerms"]["Operations"]["viewprofile"] && $arResult["CurrentUserPerms"]["Operations"]["viewfriends"]) { $arNavParams = array("nPageSize" => $arParams["ITEMS_COUNT"], "bDescPageNumbering" => false); $arNavigation = CDBResult::GetNavParams($arNavParams); $arResult["Urls"]["Search"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_SEARCH"], array()); $arResult["Urls"]["LogUsers"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_LOG"], array());