本文整理汇总了PHP中CIBlock::ShowPanel方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlock::ShowPanel方法的具体用法?PHP CIBlock::ShowPanel怎么用?PHP CIBlock::ShowPanel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlock
的用法示例。
在下文中一共展示了CIBlock::ShowPanel方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialcharsbx
<tr>
<td>' . htmlspecialcharsbx($matches[3]) . '</td>
</tr>
</table>
');
}
}
global $APPLICATION, $USER;
foreach ($arResult['ITEMS'] as $key => $val) {
$arResult['ITEMS'][$key]["DETAIL_TEXT"] = preg_replace_callback("/(<|\\[)CODE(>|\\])(.+?)(<|\\[)\\/CODE(>|\\])/is", code_replace_func, $arResult['ITEMS'][$key]["DETAIL_TEXT"]);
if (strtoupper($arResult['ITEMS'][$key]["PREVIEW_TEXT_TYPE"]) == "TEXT") {
$arResult['ITEMS'][$key]["PREVIEW_TEXT"] = nl2br($arResult['ITEMS'][$key]["PREVIEW_TEXT"]);
}
if (strtoupper($arResult['ITEMS'][$key]["DETAIL_TEXT_TYPE"]) == "TEXT") {
$arResult['ITEMS'][$key]["DETAIL_TEXT"] = nl2br($arResult['ITEMS'][$key]["DETAIL_TEXT"]);
}
//create button
if ($USER->IsAuthorized()) {
if ($APPLICATION->GetShowIncludeAreas()) {
$ar = CIBlock::ShowPanel($arParams['IBLOCK_ID'], $val['ID'], 0, $arParams["IBLOCK_TYPE"], true);
if (is_array($ar)) {
foreach ($ar as $arButton) {
if (preg_match("/[^A-Z0-9_]ID=\\d+/", $arButton["URL"])) {
$arButton["URL"] = preg_replace("/&return_url=(.+?)&/", "&", $arButton["URL"]);
$arResult['ITEMS'][$key]['EDIT_BUTTON'] = '<a href="' . htmlspecialcharsbx($arButton["URL"]) . '" title="' . htmlspecialcharsbx($arButton["TITLE"]) . '"><img src="' . $arButton["IMAGE"] . '" width="20" height="20" border="0" /></a>';
}
}
}
}
}
}
示例2: GetMessage
********************************************************************/
if ($arParams["SET_TITLE"] == "Y") {
$APPLICATION->SetTitle($arParams["ACTION"] == "CLONE" ? GetMessage("WD_TITLE_CLONE") : GetMessage("WD_TITLE"));
}
if ($arParams["SET_NAV_CHAIN"] == "Y") {
$res = array("section_id" => !empty($arResult["ELEMENT_ORIGINAL"]) ? $arResult["ELEMENT_ORIGINAL"]["IBLOCK_SECTION_ID"] : $arResult["ELEMENT"]["IBLOCK_SECTION_ID"]);
$arResult["NAV_CHAIN"] = $ob->GetNavChain($res, "array");
$arNavChain = array();
foreach ($arResult["NAV_CHAIN"] as $res) {
$arNavChain[] = $res["URL"];
$url = CComponentEngine::MakePathFromTemplate($arParams["~SECTIONS_URL"], array("PATH" => implode("/", $arNavChain), "SECTION_ID" => $res["ID"], "ELEMENT_ID" => "files", "ELEMENT_NAME" => "files"));
$GLOBALS["APPLICATION"]->AddChainItem(htmlspecialcharsEx($res["NAME"]), $url);
}
if (!empty($arResult["ELEMENT_ORIGINAL"])) {
$GLOBALS["APPLICATION"]->AddChainItem(GetMessage("WD_ORIGINAL") . ": " . htmlspecialcharsEx($arResult["ELEMENT_ORIGINAL"]["~NAME"]), WDAddPageParams(CComponentEngine::MakePathFromTemplate($arParams["~ELEMENT_URL"], array("PATH" => $arResult["ELEMENT_ORIGINAL"]["PATH"], "SECTION_ID" => intVal(${$arResult}["ELEMENT_ORIGINAL"]["IBLOCK_SECTION_ID"]), "ELEMENT_ID" => $arResult["ELEMENT_ORIGINAL"]["ID"], "ELEMENT_NAME" => $arResult["ELEMENT_ORIGINAL"]["~NAME"])), array($arParams["FORM_ID"] . "_active_tab" => "tab_version")));
}
$GLOBALS["APPLICATION"]->AddChainItem(htmlspecialcharsEx($arResult["ELEMENT"]["~NAME"]), $arResult["ELEMENT"]["URL"]["VIEW"]);
}
if ($arParams["DISPLAY_PANEL"] == "Y" && $USER->IsAuthorized()) {
CIBlock::ShowPanel($arParams["IBLOCK_ID"], 0, $arParams["SECTION_ID"], $arParams["IBLOCK_TYPE"], false, $this->GetName());
}
/********************************************************************
/Standart operations
********************************************************************/
if ($arParams["WORKFLOW"] == "workflow" && (!empty($arResult["ELEMENT"]["ORIGINAL"]) && intVal($arResult["ELEMENT"]["ORIGINAL"]["WF_STATUS_ID"]) > 1 || empty($arResult["ELEMENT"]["ORIGINAL"]) && intVal($arResult["ELEMENT"]["WF_STATUS_ID"]) > 1)) {
return array("ELEMENT_ID" => false);
} elseif (!empty($arResult["ELEMENT"]["ORIGINAL"])) {
return array("ELEMENT_ID" => $arResult["ELEMENT"]["ORIGINAL"]["ID"], "ELEMENT" => $arResult["ELEMENT"]);
} else {
return array("ELEMENT_ID" => $arParams["ELEMENT_ID"], "ELEMENT" => $arResult["ELEMENT"]);
}
示例3: ShowError
}
$arResult["NAV_STRING"] = $rsElement->GetPageNavStringEx($navComponentObject, $arParams["PAGER_TITLE"], $arParams["PAGER_TEMPLATE"], $arParams["PAGER_SHOW_ALWAYS"]);
$arResult["NAV_CACHED_DATA"] = $navComponentObject->GetTemplateCachedData();
$arResult["NAV_RESULT"] = $rsElement;
$this->SetResultCacheKeys(array("ID", "IBLOCK_TYPE_ID", "NAV_CACHED_DATA", "NAME", "SECTION"));
$this->IncludeComponentTemplate();
} else {
$this->AbortResultCache();
ShowError(GetMessage("T_DOCS_DOCS_NA"));
@define("ERROR_404", "Y");
}
}
if (isset($arResult["ID"])) {
if ($USER->IsAuthorized()) {
if ($GLOBALS["APPLICATION"]->GetShowIncludeAreas() && CModule::IncludeModule("iblock")) {
$this->AddIncludeAreaIcons(CIBlock::ShowPanel($arResult["ID"], 0, 0, $arResult["IBLOCK_TYPE_ID"], true));
}
}
$this->SetTemplateCachedData($arResult["NAV_CACHED_DATA"]);
if ($arParams["SET_TITLE"]) {
$APPLICATION->SetTitle($arResult["NAME"]);
}
if ($arParams["INCLUDE_IBLOCK_INTO_CHAIN"] && isset($arResult["NAME"])) {
$APPLICATION->AddChainItem($arResult["NAME"]);
}
if ($arParams["ADD_SECTIONS_CHAIN"] && is_array($arResult["SECTION"])) {
foreach ($arResult["SECTION"]["PATH"] as $arPath) {
$APPLICATION->AddChainItem($arPath["NAME"], $arPath["SECTION_PAGE_URL"]);
}
}
}
示例4: trim
$arParams["IBLOCK_TYPE"] = trim($arParams["IBLOCK_TYPE"]);
$arParams["IBLOCK_URL"] = trim($arParams["IBLOCK_URL"]);
/*************************************************************************
Work with cache
*************************************************************************/
$arResult["ITEMS"] = array();
if ($this->StartResultCache(false, $arParams["CACHE_GROUPS"] === "N" ? false : $USER->GetGroups())) {
if (!CModule::IncludeModule("iblock")) {
$this->AbortResultCache();
ShowError(GetMessage("IBLOCK_MODULE_NOT_INSTALLED"));
return;
}
//WHERE
$arFilter = array("TYPE" => $arParams["IBLOCK_TYPE"], "SITE_ID" => SITE_ID, "ACTIVE" => "Y");
//ORDER BY
$arSort = array("SORT" => "ASC", "NAME" => "ASC");
$rsIBlocks = CIBlock::GetList($arSort, $arFilter);
while ($arIBlock = $rsIBlocks->GetNext()) {
$arIBlock["PICTURE"] = CFile::GetFileArray($arIBlock["PICTURE"]);
$arIBlock["~LIST_PAGE_URL"] = str_replace(array("#SERVER_NAME#", "#SITE_DIR#", "#IBLOCK_TYPE_ID#", "#IBLOCK_ID#", "#IBLOCK_CODE#", "#IBLOCK_EXTERNAL_ID#", "#CODE#"), array(SITE_SERVER_NAME, SITE_DIR, $arIBlock["IBLOCK_TYPE_ID"], $arIBlock["ID"], $arIBlock["CODE"], $arIBlock["EXTERNAL_ID"], $arIBlock["CODE"]), strlen($arParams["IBLOCK_URL"]) ? trim($arParams["~IBLOCK_URL"]) : $arIBlock["~LIST_PAGE_URL"]);
$arIBlock["~LIST_PAGE_URL"] = preg_replace("'/+'s", "/", $arIBlock["~LIST_PAGE_URL"]);
$arIBlock["LIST_PAGE_URL"] = htmlspecialcharsbx($arIBlock["~LIST_PAGE_URL"]);
$arResult["ITEMS"][] = $arIBlock;
}
$this->IncludeComponentTemplate();
}
if (count($arResult["ITEMS"]) > 0 && $USER->IsAuthorized()) {
if ($APPLICATION->GetShowIncludeAreas() && CModule::IncludeModule("iblock")) {
$this->AddIncludeAreaIcons(CIBlock::ShowPanel(0, 0, 0, $arParams["IBLOCK_TYPE"], true));
}
}
示例5: preg_replace
return preg_replace("/\n/is", "", '
<table cellpadding="0" cellspacing="0" class="data-table">
<tr>
<td>' . htmlspecialcharsbx($matches[3]) . '</td>
</tr>
</table>
');
}
}
global $APPLICATION, $USER;
$arResult['ITEM']["DETAIL_TEXT"] = preg_replace_callback("/(<|\\[)CODE(>|\\])(.+?)(<|\\[)\\/CODE(>|\\])/is", code_replace_func, $arResult['ITEM']["DETAIL_TEXT"]);
if (strtoupper($arResult['ITEM']["PREVIEW_TEXT_TYPE"]) == "TEXT") {
$arResult['ITEM']["PREVIEW_TEXT"] = nl2br($arResult['ITEM']["PREVIEW_TEXT"]);
}
if (strtoupper($arResult['ITEM']["DETAIL_TEXT_TYPE"]) == "TEXT") {
$arResult['ITEM']["DETAIL_TEXT"] = nl2br($arResult['ITEM']["DETAIL_TEXT"]);
}
//create button
if ($USER->IsAuthorized()) {
if ($APPLICATION->GetShowIncludeAreas()) {
$ar = CIBlock::ShowPanel($arParams['IBLOCK_ID'], $arResult['ITEM']['ID'], 0, $arParams["IBLOCK_TYPE"], true);
if (is_array($ar)) {
foreach ($ar as $arButton) {
if (preg_match("/[^A-Z0-9_]ID=\\d+/", $arButton["URL"])) {
$arButton["URL"] = preg_replace("/&return_url=(.+?)&/", "&", $arButton["URL"]);
$arResult['ITEM']['EDIT_BUTTON'] = '<a href="' . htmlspecialcharsbx($arButton["URL"]) . '" title="' . htmlspecialcharsbx($arButton["TITLE"]) . '"><img src="' . $arButton["IMAGE"] . '" width="20" height="20" border="0" /></a>';
}
}
}
}
}
示例6: ShowError
}
}
$this->IncludeComponentTemplate();
} else {
$this->AbortResultCache();
ShowError(GetMessage("T_NEWS_DETAIL_NF"));
@define("ERROR_404", "Y");
}
}
if (isset($arResult["ID"])) {
if (CModule::IncludeModule("iblock")) {
CIBlockElement::CounterInc($arParams["ELEMENT_ID"]);
if ($GLOBALS["APPLICATION"]->GetShowIncludeAreas()) {
$this->AddIncludeAreaIcons(CIBlock::ShowPanel($arResult["IBLOCK_ID"], $arResult["ID"], 0, $arParams["IBLOCK_TYPE"], true));
if ($arParams["DISPLAY_PANEL"]) {
CIBlock::ShowPanel($arResult["IBLOCK_ID"], $arResult["ID"], 0, $arParams["IBLOCK_TYPE"]);
}
}
}
if ($arParams["SET_TITLE"]) {
$APPLICATION->SetTitle($arResult["NAME"]);
}
if ($arParams["ADD_SECTIONS_CHAIN"] && is_array($arResult["SECTION"])) {
foreach ($arResult["SECTION"]["PATH"] as $arPath) {
$APPLICATION->AddChainItem($arPath["NAME"], $arPath["SECTION_PAGE_URL"]);
}
}
return $arResult["ID"];
} else {
return 0;
}