本文整理汇总了PHP中CForumUser::SearchUser方法的典型用法代码示例。如果您正苦于以下问题:PHP CForumUser::SearchUser方法的具体用法?PHP CForumUser::SearchUser怎么用?PHP CForumUser::SearchUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CForumUser
的用法示例。
在下文中一共展示了CForumUser::SearchUser方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$arResult["CURRENT_PAGE"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PM_SEARCH"], array());
// *****************************************************************************************
$arResult["sessid"] = bitrix_sessid_post();
$arResult["SITE_CHARSET"] = SITE_CHARSET;
// *****************************************************************************************
$arResult["~search_template"] = trim($_REQUEST["search_template"]);
if (!empty($arResult["~search_template"])) {
$arResult["~search_template"] = preg_replace("/[%]+/", "%", "%" . str_replace("*", "%", $arResult["~search_template"]) . "%");
}
$arResult["search_template"] = htmlspecialcharsEx($_REQUEST["search_template"]);
// *****************************************************************************************
$arResult["SHOW_SEARCH_RESULT"] = "N";
$arResult["SEARCH_RESULT"] = array();
if (!empty($arResult["~search_template"]) && $arResult["~search_template"] != "%") {
$arResult["SHOW_SEARCH_RESULT"] = "Y";
$reqSearch = CForumUser::SearchUser($arResult["~search_template"], array("bDescPageNumbering" => false, "bShowAll" => false, "nPageSize" => $arParams["PM_USER_PAGE"], "sNameTemplate" => $arParams["NAME_TEMPLATE"]));
$reqSearch->NavStart($arParams["PM_USER_PAGE"], false);
$arResult["NAV_RESULT"] = $reqSearch;
$arResult["NAV_STRING"] = $reqSearch->GetPageNavStringEx($navComponentObject, GetMessage("PM_SEARCH_RESULT"), $arParams["PAGE_NAVIGATION_TEMPLATE"]);
if ($reqSearch && ($res = $reqSearch->GetNext())) {
do {
$arResult["SEARCH_RESULT"][] = array_merge(array("link" => ForumAddPageParams($arResult["CURRENT_PAGE"], array("search_insert" => "Y", "UID" => intVal($res["ID"]), "sessid" => bitrix_sessid()))), $res);
} while ($res = $reqSearch->GetNext());
}
}
$arResult["SHOW_SELF_CLOSE"] = "N";
if ($_REQUEST["search_insert"] == "Y" && intval($UID) > 0 || !empty($_REQUEST["search_by_login"])) {
if (empty($_REQUEST["search_by_login"])) {
$db_res = CForumUser::GetList(array(), array("USER_ID" => $UID, "SHOW_ABC" => ""), array("sNameTemplate" => $arParams["NAME_TEMPLATE"]));
if ($db_res && ($res = $db_res->GetNext())) {
$arResult["SHOW_SELF_CLOSE"] = "Y";
示例2: array
$arResult["CURRENT_PAGE"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PM_SEARCH"], array());
// *****************************************************************************************
$arResult["sessid"] = bitrix_sessid_post();
$arResult["SITE_CHARSET"] = SITE_CHARSET;
// *****************************************************************************************
$arResult["~search_template"] = trim($_REQUEST["search_template"]);
if (!empty($arResult["~search_template"])) {
$arResult["~search_template"] = preg_replace("/[%]+/", "%", "%" . str_replace("*", "%", $arResult["~search_template"]) . "%");
}
$arResult["search_template"] = htmlspecialcharsEx($_REQUEST["search_template"]);
// *****************************************************************************************
$arResult["SHOW_SEARCH_RESULT"] = "N";
$arResult["SEARCH_RESULT"] = array();
if (!empty($arResult["~search_template"]) && $arResult["~search_template"] != "%") {
$arResult["SHOW_SEARCH_RESULT"] = "Y";
$reqSearch = CForumUser::SearchUser($arResult["~search_template"], array("sNameTemplate" => $arParams["NAME_TEMPLATE"]));
$reqSearch->NavStart($arParams["PM_USER_PAGE"], false);
$arResult["NAV_RESULT"] = $reqSearch;
$arResult["NAV_STRING"] = $reqSearch->GetPageNavStringEx($navComponentObject, GetMessage("PM_SEARCH_RESULT"), $arParams["PAGE_NAVIGATION_TEMPLATE"]);
if ($reqSearch && ($res = $reqSearch->GetNext())) {
do {
$arResult["SEARCH_RESULT"][] = array_merge(array("link" => ForumAddPageParams($arResult["CURRENT_PAGE"], array("search_insert" => "Y", "UID" => intVal($res["ID"]), "sessid" => bitrix_sessid()))), $res);
} while ($res = $reqSearch->GetNext());
}
}
$arResult["SHOW_SELF_CLOSE"] = "N";
if ($_REQUEST["search_insert"] == "Y" && intval($UID) > 0 || !empty($_REQUEST["search_by_login"])) {
if (empty($_REQUEST["search_by_login"])) {
$db_res = CForumUser::GetList(array(), array("USER_ID" => $UID, "SHOW_ABC" => ""), array("sNameTemplate" => $arParams["NAME_TEMPLATE"]));
if ($db_res && ($res = $db_res->GetNext())) {
$arResult["SHOW_SELF_CLOSE"] = "Y";