当前位置: 首页>>代码示例>>PHP>>正文


PHP CBlogUser::DeleteFromUserGroup方法代码示例

本文整理汇总了PHP中CBlogUser::DeleteFromUserGroup方法的典型用法代码示例。如果您正苦于以下问题:PHP CBlogUser::DeleteFromUserGroup方法的具体用法?PHP CBlogUser::DeleteFromUserGroup怎么用?PHP CBlogUser::DeleteFromUserGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBlogUser的用法示例。


在下文中一共展示了CBlogUser::DeleteFromUserGroup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

                             }
                         }
                         $arMailFields = array("BLOG_ID" => $arOwnBlog["ID"], "BLOG_NAME" => $arOwnBlog["NAME"], "BLOG_URL" => $arOwnBlog["URL"], "BLOG_ADR" => "http://" . $serverName . CComponentEngine::MakePathFromTemplate(htmlspecialcharsBack($arParams["PATH_TO_BLOG"]), array("blog" => $arOwnBlog["URL"])), "USER_ID" => $user_id, "USER" => $AuthorName, "USER_URL" => "http://" . $serverName . CComponentEngine::MakePathFromTemplate(htmlspecialcharsBack($arParams["PATH_TO_USER"]), array("user_id" => $arUser["ID"])), "EMAIL_FROM" => COption::GetOptionString("main", "email_from", "nobody@nobody.com"));
                         $arF1 = $arF2 = $arMailFields;
                         $arF1["EMAIL_TO"] = $arUserBlog["EMAIL"];
                         $arF2["EMAIL_TO"] = $arUser["EMAIL"];
                         CEvent::Send("BLOG_YOUR_BLOG_TO_USER", SITE_ID, $arF1);
                         CEvent::Send("BLOG_BLOG_TO_YOU", SITE_ID, $arF2);
                     } else {
                         $frnd_er = 2;
                     }
                 }
             }
         }
     } elseif ($_GET["become_friend"] == "N") {
         CBlogUser::DeleteFromUserGroup($user_id, $arResult["BLOG"]["ID"], BLOG_BY_USER_ID);
         $dbCandidate = CBlogCandidate::GetList(array(), array("BLOG_ID" => $arResult["BLOG"]["ID"], "USER_ID" => $user_id));
         if ($arCandidate = $dbCandidate->Fetch()) {
             CBlogCandidate::Delete($arCandidate["ID"]);
         }
         $frnd_ok = 7;
     }
 } else {
     $arResult["ERROR_MESSAGE"][] = GetMessage("BLOG_BLOG_BLOG_NO_BLOG");
     CHTTP::SetStatus("404 Not Found");
 }
 if (IntVal($frnd_er) > 0) {
     LocalRedirect($APPLICATION->GetCurPageParam("frnd_res_er=" . $frnd_er, array("frnd_res_er", "sessid", "frnd_res_ok")));
 } elseif (IntVal($frnd_ok) > 0) {
     LocalRedirect($APPLICATION->GetCurPageParam("frnd_res_ok=" . $frnd_ok, array("frnd_res_er", "sessid", "frnd_res_ok")));
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例2: array

         $dbCandidate = CBlogCandidate::GetList(array(), array("BLOG_ID" => $arBlog["ID"], "USER_ID" => $user_id));
         if ($arCandidate = $dbCandidate->Fetch()) {
             echo '<font class="text">' . GetMessage("BLOG_BLOG_BLOG_REQUEST_ALREADY") . '</font>';
         } else {
             if (CBlogCandidate::Add(array("BLOG_ID" => $arBlog["ID"], "USER_ID" => $user_id))) {
                 echo '<font class="text">' . GetMessage("BLOG_BLOG_BLOG_REQUEST_ADDED") . '</font>';
             } else {
                 echo ShowError(GetMessage('BLOG_BLOG_BLOG_REQUEST_ERROR'));
             }
         }
     } else {
         echo '<font class="text">' . GetMessage("BLOG_BLOG_BLOG_REQUEST_NEED_AUTH") . '</font>';
     }
 } elseif ($_GET["become_friend"] == "N") {
     if ($USER->IsAuthorized()) {
         CBlogUser::DeleteFromUserGroup($user_id, $arBlog["ID"], BLOG_BY_USER_ID);
         $dbCandidate = CBlogCandidate::GetList(array(), array("BLOG_ID" => $arBlog["ID"], "USER_ID" => $user_id));
         if ($arCandidate = $dbCandidate->Fetch()) {
             CBlogCandidate::Delete($arCandidate["ID"]);
         }
         echo '<font class="text">' . GetMessage("BLOG_BLOG_BLOG_LEAVED") . '</font>';
     }
 }
 if ($PostPerm >= BLOG_PERMS_READ) {
     $arFilter = array("PUBLISH_STATUS" => BLOG_PUBLISH_STATUS_PUBLISH, ">PERMS" => "D", "BLOG_ID" => $arBlog["ID"]);
     if ($year && $month && $day) {
         $from = mktime(0, 0, 0, $month, $day, $year);
         $to = mktime(0, 0, 0, $month, $day + 1, $year);
         if ($to > time()) {
             $to = time();
         }
开发者ID:,项目名称:,代码行数:31,代码来源:


注:本文中的CBlogUser::DeleteFromUserGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。