本文整理汇总了PHP中CDBResult::GetPageNavStringEx方法的典型用法代码示例。如果您正苦于以下问题:PHP CDBResult::GetPageNavStringEx方法的具体用法?PHP CDBResult::GetPageNavStringEx怎么用?PHP CDBResult::GetPageNavStringEx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDBResult
的用法示例。
在下文中一共展示了CDBResult::GetPageNavStringEx方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
top.arLogCom<?php
echo $arLog["ID"];
echo $commentId;
?>
= '<?php
echo $arComment["EVENT"]["ID"];
?>
';<?php
?>
</script><?php
$t = ob_get_clean();
$records[$commentId] = array("ID" => $commentId, "NEW" => $lastLogTs > 0 && $arComment["LOG_DATE_TS"] > $lastLogTs && $USER->IsAuthorized() && $arEvent["EVENT"]["FOLLOW"] != "N" && $arComment["EVENT"]["USER_ID"] != $USER->GetID() && ($arResult["COUNTER_TYPE"] == "**" || $arResult["COUNTER_TYPE"] == "CRM_**" || $arResult["COUNTER_TYPE"] == "blog_post") ? "Y" : "N", "APPROVED" => "Y", "POST_TIMESTAMP" => $arComment["LOG_DATE_TS"], "AUTHOR_ID" => array("ID" => $arComment["CREATED_BY"]["TOOLTIP_FIELDS"]["ID"], "NAME" => $arComment["CREATED_BY"]["TOOLTIP_FIELDS"]["NAME"], "LAST_NAME" => $arComment["CREATED_BY"]["TOOLTIP_FIELDS"]["LAST_NAME"], "SECOND_NAME" => $arComment["CREATED_BY"]["TOOLTIP_FIELDS"]["SECOND_NAME"], "AVATAR" => $arComment["AVATAR_SRC"]), "FILES" => false, "UF" => $arComment["UF"], "~POST_MESSAGE_TEXT" => $arComment["EVENT_FORMATTED"]["MESSAGE"], "POST_MESSAGE_TEXT" => $arComment["EVENT_FORMATTED"]["FULL_MESSAGE_CUT"], "CLASSNAME" => $t ? "" : "", "BEFORE_HEADER" => "", "BEFORE_ACTIONS" => "", "AFTER_ACTIONS" => "", "AFTER_HEADER" => "", "BEFORE" => "", "AFTER" => $t, "BEFORE_RECORD" => "", "AFTER_RECORD" => "");
}
$eventHandlerID = AddEventHandler("main", "system.field.view.file", array("CSocNetLogTools", "logUFfileShow"));
$rights = CSocNetLogComponent::getCommentRights(array("EVENT_ID" => $arLog["EVENT_ID"], "SOURCE_ID" => $arLog["SOURCE_ID"]));
$res = $APPLICATION->IncludeComponent("bitrix:main.post.list", "", array("TEMPLATE_ID" => '', "RATING_TYPE_ID" => $rating_entity_type, "ENTITY_XML_ID" => $entity_xml_id, "RECORDS" => array_reverse($records, true), "NAV_STRING" => $db_res->GetPageNavStringEx($navComponentObject, ""), "NAV_RESULT" => $db_res, "PREORDER" => "N", "RIGHTS" => array("MODERATE" => "N", "EDIT" => $rights["COMMENT_RIGHTS_EDIT"], "DELETE" => $rights["COMMENT_RIGHTS_DELETE"]), "ERROR_MESSAGE" => "", "OK_MESSAGE" => "", "VIEW_URL" => isset($arComment["EVENT"]["URL"]) && strlen($arComment["EVENT"]["URL"]) > 0 ? $arComment["EVENT"]["URL"] : (isset($arParams["PATH_TO_LOG_ENTRY"]) && strlen($arParams["PATH_TO_LOG_ENTRY"]) > 0 ? CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_LOG_ENTRY"], array("log_id" => $arLog["ID"])) . "?commentId=#ID#" : ""), "EDIT_URL" => "__logEditComment('" . $entity_xml_id . "', '#ID#', '" . $log_tmp_id . "');", "MODERATE_URL" => "", "DELETE_URL" => '/bitrix/components/bitrix/socialnetwork.log.entry/ajax.php?lang=' . LANGUAGE_ID . '&action=delete_comment&delete_comment_id=#ID#&post_id=' . $arLog["ID"] . '&site=' . SITE_ID, "AUTHOR_URL" => $arParams["PATH_TO_USER"], "AVATAR_SIZE" => $arParams["AVATAR_SIZE_COMMENT"], "NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"], "SHOW_LOGIN" => $arParams["SHOW_LOGIN"], "DATE_TIME_FORMAT" => $arParams["DATE_TIME_FORMAT"], "LAZYLOAD" => "Y", "NOTIFY_TAG" => "", "NOTIFY_TEXT" => "", "SHOW_MINIMIZED" => "Y", "SHOW_POST_FORM" => "", "IMAGE_SIZE" => "", "mfi" => ""), array(), null);
RemoveEventHandler('main', 'system.field.view.file', $eventHandlerID);
}
} elseif ($action == "change_favorites" && $GLOBALS["USER"]->IsAuthorized()) {
$log_id = intval($_REQUEST["log_id"]);
if ($arLog = CSocNetLog::GetByID($log_id)) {
$strRes = CSocNetLogFavorites::Change($GLOBALS["USER"]->GetID(), $log_id);
if ($strRes) {
if ($strRes == "Y") {
CSocNetLogFollow::Set($GLOBALS["USER"]->GetID(), "L" . $log_id, "Y", $arLog["LOG_UPDATE"]);
}
$arResult["bResult"] = $strRes;
} else {
if ($e = $GLOBALS["APPLICATION"]->GetException()) {
$arResult["strMessage"] = $e->GetString();
} else {
示例2: array
$arRawResult = $obAuthor->getAlbumPhotos($arParams["ALBUM_ID"], array('sort' => $arParams['PHOTOS_SORT']));
$arResult = $arRawResult;
$arResult['ITEMS'] = array();
if (is_array($arRawResult['ITEMS'])) {
$dbresult = new CDBResult;
$dbresult->InitFromArray($arRawResult['ITEMS']);
$dbresult->NavStart($arParams['ITEMS_LIMIT'], false);
while ($arItem = $dbresult->GetNext()) {
$arItem['URL'] = str_replace(array('#album_id#', '#photo_id#'), array($arParams["ALBUM_ID"], $arItem["ID"]), $arParams['PHOTO_URL']);
$arResult['ITEMS'][] = $arItem;
}
$arResult['PAGE_NUMBER'] = $dbresult->NavPageNomer;
$arResult["NAV_STRING"] = $dbresult->GetPageNavStringEx($navComponentObject, false, $arParams["PAGER_TEMPLATE"], $arParams["PAGER_SHOW_ALWAYS"]);
}
if (!$arRawResult['ID']) {
throw new Exception(GetMessage('BEONO_YAFOTKI_COMP_ERROR_ALBUM404'));
}
} catch (Exception $e) {
ShowError($e->getMessage());
$this->AbortResultCache();
CHTTP::SetStatus("404 Not Found");
}
// if there are sub-albums
if (!$arResult['TOTAL'] && $arResult['SELF_LINK']) {
示例3: while
while ($arRequest = $dbRequests->GetNext()) {
$gu = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP"], array("group_id" => $arRequest["GROUP_ID"]));
$arGroup = CSocNetGroup::GetByID($arRequest["GROUP_ID"]);
$arImage = array();
if (intval($arParams["THUMBNAIL_LIST_SIZE"]) > 0) {
if (intval($arGroup["IMAGE_ID"]) <= 0) {
$arGroup["IMAGE_ID"] = COption::GetOptionInt("socialnetwork", "default_group_picture", false, SITE_ID);
}
$arImage = CFile::ResizeImageGet($arGroup["IMAGE_ID"], array("width" => $arParams["THUMBNAIL_LIST_SIZE"], "height" => $arParams["THUMBNAIL_LIST_SIZE"]), BX_RESIZE_IMAGE_EXACT, false);
}
$arEventTmp = array("EVENT_TYPE" => "INVITE_GROUP", "ID" => $arRequest["ID"], "USER_ID" => $arRequest["USER_ID"], "GROUP_ID" => $arRequest["GROUP_ID"], "GROUP_URL" => $gu, "GROUP_NAME" => $arGroup["NAME"], "GROUP_IMG" => $arImage, "DATE_CREATE" => $arRequest["DATE_CREATE"], "MESSAGE" => $parser->convert($arRequest["~MESSAGE"], false, array(), array("HTML" => "N", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LIST" => "Y", "QUOTE" => "Y", "CODE" => "Y", "FONT" => "Y", "SMILES" => "Y", "UPLOAD" => "N", "NL2BR" => "N")));
$arTmpResult["RequestsOut"][] = $arEventTmp;
}
}
$rsRequestsOut = new CDBResult();
$rsRequestsOut->InitFromArray($arTmpResult["RequestsOut"]);
$rsRequestsOut->NavStart();
while ($arRecord = $rsRequestsOut->GetNext()) {
$arResult["RequestsOut"]["List"][] = $arRecord;
}
$arResult["RequestsOut"]["NAV_STRING"] = $rsRequestsOut->GetPageNavStringEx($navComponentObject, GetMessage("SONET_URE_NAV"), "", false);
} else {
$arResult["FatalError"] = GetMessage("SONET_URE_NO_PERMS");
}
} else {
$arResult["FatalError"] = GetMessage("SONET_URE_NO_USER");
}
$arResult["InfoMessage"] = $infoMessage;
$arResult["ErrorMessage"] = $errorMessage;
}
$this->IncludeComponentTemplate();
示例4: intval
$arLoc['ID'] = $arLoc['~ID'] = intval($arLocation['ID']);
$arLoc['COUNTRY_NAME'] = $arLoc['~COUNTRY_NAME'] = $arLocation['COUNTRY_NAME'] != null ? $arLocation['COUNTRY_NAME'] : $arLocation['COUNTRY_NAME_ORIG'];
$arLoc['REGION_NAME'] = $arLoc['~REGION_NAME'] = $arLocation['REGION_NAME'] != null ? $arLocation['REGION_NAME'] : $arLocation['REGION_NAME_ORIG'];
$arLoc['CITY_NAME'] = $arLoc['~CITY_NAME'] = $arLocation['CITY_NAME'] != null ? $arLocation['CITY_NAME'] : $arLocation['CITY_NAME_ORIG'];
$arLoc['SORT'] = $arLocation['SORT'];
$locations[] = $arLoc;
}
$sort = $arResult['SORT'];
if (is_array($sort) && count($sort) > 0) {
// Process only first expression
reset($sort);
$by = key($sort);
$order = $sort[$by] == 'asc' ? SORT_ASC : SORT_DESC;
sortByColumn($locations, array(strtoupper($by) => $order));
}
$arResult['LOCS'] = array();
$dbRecordsList = new CDBResult();
$dbRecordsList->InitFromArray($locations);
$dbRecordsList->NavStart(20);
$dbRecordsList->bShowAll = false;
unset($locations);
while ($arLoc = $dbRecordsList->Fetch()) {
$arLoc['PATH_TO_LOCATIONS_EDIT'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_LOCATIONS_EDIT'], array('loc_id' => $arLoc['ID']));
$arLoc['PATH_TO_LOCATIONS_DELETE'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_LOCATIONS_LIST'], array('loc_id' => $arLoc['ID'])), array('action_' . $arResult['GRID_ID'] => 'delete', 'ID' => $arLoc['ID'], 'sessid' => bitrix_sessid()));
$arResult['LOCS'][$arLoc['ID']] = $arLoc;
}
$arResult['ROWS_COUNT'] = $dbRecordsList->NavRecordCount;
$arResult["NAV_STRING"] = $dbRecordsList->GetPageNavStringEx($navComponentObject, GetMessage("CRM_INTS_TASKS_NAV"), "", false);
$arResult["NAV_CACHED_DATA"] = $navComponentObject->GetTemplateCachedData();
$arResult["NAV_RESULT"] = $dbRecordsList;
$this->IncludeComponentTemplate();