本文整理汇总了PHP中CBlog::IsFriend方法的典型用法代码示例。如果您正苦于以下问题:PHP CBlog::IsFriend方法的具体用法?PHP CBlog::IsFriend怎么用?PHP CBlog::IsFriend使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlog
的用法示例。
在下文中一共展示了CBlog::IsFriend方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$arF1 = $arF2 = $arMailFields;
$arF1["EMAIL_TO"] = $arUser["EMAIL"];
$arF2["EMAIL_TO"] = $arUserBlog["EMAIL"];
CEvent::Send("BLOG_YOU_TO_BLOG", SITE_ID, $arF1);
CEvent::Send("BLOG_USER_TO_YOUR_BLOG", SITE_ID, $arF2);
} else {
$frnd_er = 1;
}
}
}
if ($arOwnBlog = CBlog::GetByOwnerID($user_id, $arParams["GROUP_ID"])) {
$dbCandidate = CBlogCandidate::GetList(array(), array("BLOG_ID" => $arOwnBlog["ID"], "USER_ID" => $arResult["BLOG"]["OWNER_ID"]));
if ($arCandidate = $dbCandidate->Fetch()) {
$frnd_ok = 4;
} else {
if (CBlog::IsFriend($arOwnBlog["ID"], $arResult["BLOG"]["OWNER_ID"])) {
$frnd_ok = 5;
} else {
if (CBlogCandidate::Add(array("BLOG_ID" => $arOwnBlog["ID"], "USER_ID" => $arResult["BLOG"]["OWNER_ID"]))) {
$frnd_ok = 6;
$BlogUser = CBlogUser::GetByID($arResult["BLOG"]["OWNER_ID"], BLOG_BY_USER_ID);
$BlogUser = CBlogTools::htmlspecialcharsExArray($BlogUser);
$dbUser = CUser::GetByID($arResult["BLOG"]["OWNER_ID"]);
$arUser = $dbUser->GetNext();
$AuthorName = CBlogUser::GetUserName($BlogUser["ALIAS"], $arUser["NAME"], $arUser["LAST_NAME"], $arUser["LOGIN"]);
$dbUser = CUser::GetByID($user_id);
$arUserBlog = $dbUser->GetNext();
if (strlen($serverName) <= 0) {
if (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0) {
$serverName = SITE_SERVER_NAME;
} else {
示例2: elseif
$arResult["SecondLine"] = "Y";
} elseif ($perm >= BLOG_PERMS_PREMODERATE) {
$arResult["urlToNewPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST_EDIT"], array("blog" => $arBlog["URL"], "post_id" => "new"));
$arResult["SecondLine"] = "Y";
}
if (CBlog::CanUserManageBlog($arBlog["ID"], $user_id)) {
$arResult["urlToUserSettings"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_SETTINGS"], array("blog" => $arBlog["URL"]));
$arResult["urlToGroupEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP_EDIT"], array("blog" => $arBlog["URL"]));
$arResult["urlToCategoryEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_CATEGORY_EDIT"], array("blog" => $arBlog["URL"]));
$arResult["urlToBlogEdit"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG_EDIT"], array("blog" => $arBlog["URL"]));
$arResult["ThirdLine"] = "Y";
}
}
if (empty($arOwnBlog) || $arOwnBlog["URL"] != $arBlog["URL"]) {
if (IntVal($user_id) > 0) {
if (!CBlog::IsFriend($arBlog["ID"], $user_id)) {
$arResult["urlToBecomeFriend"] = $arResult["urlToCurrentBlog"] . (strpos($arResult["urlToCurrentBlog"], "?") === false ? "?" : "&") . "become_friend=Y&" . bitrix_sessid_get();
$arResult["SecondLine"] = "Y";
}
if (!empty($arOwnBlog)) {
if (!CBlog::IsFriend($arOwnBlog["ID"], $arBlog["OWNER_ID"])) {
$tmpUrl = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER_SETTINGS"], array("blog" => $arOwnBlog["URL"]));
$arResult["urlToAddFriend"] = $tmpUrl . (strpos($tmpUrl, "?") === false ? "?" : "&") . "add_friend[]=" . UrlEncode($arBlog["URL"]) . "&" . bitrix_sessid_get();
$arResult["SecondLine"] = "Y";
}
}
}
}
}
}
$this->IncludeComponentTemplate();