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


PHP IBlockShowRights函数代码示例

本文整理汇总了PHP中IBlockShowRights函数的典型用法代码示例。如果您正苦于以下问题:PHP IBlockShowRights函数的具体用法?PHP IBlockShowRights怎么用?PHP IBlockShowRights使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: GetMessage

                ?>
		<tr>
			<td width="40%" class="adm-detail-valign-top"><label for="RIGHTS_MODE"><?php 
                echo GetMessage("IB_E_RIGHTS_MODE");
                ?>
</label></td>
			<td width="60%">
				<input type="hidden" name="RIGHTS_MODE" value="S">
				<input type="checkbox" id="RIGHTS_MODE" name="RIGHTS_MODE" value="E" checked="checked"><?php 
                echo BeginNote(), GetMessage("IB_E_RIGHTS_MODE_NOTE1"), EndNote();
                ?>
			</td>
		</tr>
		<?php 
                $obIBlockRights = new CIBlockRights($ID);
                IBlockShowRights('iblock', $ID, $ID, GetMessage("IB_E_RIGHTS_SECTION_TITLE"), "RIGHTS", $obIBlockRights->GetRightsList(), $obIBlockRights->GetRights(array("count_overwrited" => true)), true);
                ?>
		<tr>
			<td colspan="2">&nbsp;</td>
		</tr>
	<?php 
            } else {
                ?>
		<tr>
			<td width="40%" class="adm-detail-valign-top"><label for="RIGHTS_MODE"><?php 
                echo GetMessage("IB_E_RIGHTS_MODE");
                ?>
</label></td>
			<td width="60%">
				<input type="hidden" name="RIGHTS_MODE" value="S">
				<input type="checkbox" id="RIGHTS_MODE" name="RIGHTS_MODE" value="E"><?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:iblock_edit.php

示例2: CIBlockSectionRights

				<input type="hidden" name="RIGHTS[][GROUP_CODE]" value="'.htmlspecialcharsbx($arRight["GROUP_CODE"]).'">
				<input type="hidden" name="RIGHTS[][TASK_ID]" value="'.htmlspecialcharsbx($arRight["TASK_ID"]).'">
			';
	}
	else
	{
		$obRights = new CIBlockSectionRights($IBLOCK_ID, $MENU_SECTION_ID);
		$htmlHidden = '';
	}

	$tabControl->BeginCustomField("RIGHTS", GetMessage("IBEL_E_RIGHTS_FIELD"));
		IBlockShowRights(
			'element',
			$IBLOCK_ID,
			$ID,
			GetMessage("IBEL_E_RIGHTS_SECTION_TITLE"),
			"RIGHTS",
			$obRights->GetRightsList(),
			$obRights->GetRights(array("count_overwrited" => true, "parents" => $str_IBLOCK_ELEMENT_SECTION)),
			false, /*$bForceInherited=*/($ID <= 0) || $bCopy
		);
	$tabControl->EndCustomField("RIGHTS", $htmlHidden);
endif;

$bDisabled =
	($view=="Y")
	|| ($bWorkflow && $prn_LOCK_STATUS=="red")
	|| (
		(($ID <= 0) || $bCopy)
		&& !CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, $MENU_SECTION_ID, "section_element_bind")
	)
	|| (
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:32,代码来源:iblock_element_edit.php

示例3: CIBlockElementRights

        if ($ID > 0) {
            $obRights = new CIBlockElementRights($IBLOCK_ID, $ID);
            $htmlHidden = '';
            foreach ($obRights->GetRights() as $RIGHT_ID => $arRight) {
                $htmlHidden .= '
				<input type="hidden" name="SUB_RIGHTS[][RIGHT_ID]" value="' . htmlspecialcharsbx($RIGHT_ID) . '">
				<input type="hidden" name="SUB_RIGHTS[][GROUP_CODE]" value="' . htmlspecialcharsbx($arRight["GROUP_CODE"]) . '">
				<input type="hidden" name="SUB_RIGHTS[][TASK_ID]" value="' . htmlspecialcharsbx($arRight["TASK_ID"]) . '">
			';
            }
        } else {
            $obRights = new CIBlockSectionRights($IBLOCK_ID, 0);
            $htmlHidden = '';
        }
        $tabControl->BeginCustomField("RIGHTS", GetMessage("IBEL_E_RIGHTS_FIELD"));
        IBlockShowRights('element', $IBLOCK_ID, $ID, GetMessage("IBEL_E_RIGHTS_SECTION_TITLE"), "SUB_RIGHTS", $obRights->GetRightsList(), $obRights->GetRights(array("count_overwrited" => true, "parents" => array())), false, $ID <= 0 || $bCopy);
        $tabControl->EndCustomField("RIGHTS", $htmlHidden);
    }
    $bDisabled = $view == "Y" || $bWorkflow && $prn_LOCK_STATUS == "red" || ($ID <= 0 || $bCopy) && !CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, 0, "section_element_bind") || $ID > 0 && !$bCopy && !CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $ID, "element_edit") || $bBizproc && !$canWrite;
    if ($ID > 0 && !$bSubCopy && BX_SUB_SETTINGS) {
        if (!$ajaxReload) {
            $reloadParams = array('bxpublic' => 'Y', 'bxsku' => 'Y', 'WF' => 'Y', 'TMP_ID' => $strSubTMP_ID, 'ajaxReload' => 'Y');
            if ($arShowTabs['product_group']) {
                $reloadParams['groupdel'] = 'Y';
                $reloadParams['sessid'] = bitrix_sessid();
                $setBtn = "{\n\t\t\t\ttitle: '" . CUtil::JSEscape(GetMessage('IB_SE_SET_PRODUCT_TYPE_GROUP_DELETE')) . "',\n\t\t\t\tname: 'groupdel',\n\t\t\t\tid: 'groupdel',\n\t\t\t\tclassName: 'adm-btn-add',\n\t\t\t\taction: function () {\n\t\t\t\t\tif (confirm('" . CUtil::JSEscape(GetMessage('IB_SE_SET_PRODUCT_TYPE_GROUP_DELETE_CONFIRM')) . "'))\n\t\t\t\t\t{\n\t\t\t\t\t\ttop.BX.showWait();\n\t\t\t\t\t\ttop.BX.ajax.get(\n\t\t\t\t\t\t\t'" . CIBlock::GetAdminSubElementEditLink($IBLOCK_ID, $intProductID, $ID, $reloadParams, '', true) . "',\n\t\t\t\t\t\t\tfunction (result) {\n\t\t\t\t\t\t\t\ttop.BX.closeWait();\n\t\t\t\t\t\t\t\ttop.BX.WindowManager.Get().SetContent(result);\n\t\t\t\t\t\t\t\tif (BX('groupdel'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tBX.style(BX('groupdel'), 'display', 'none');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}";
            } else {
                $reloadParams['SUBPRODUCT_TYPE'] = CCatalogAdminTools::TAB_GROUP;
                $setBtn = "{\n\t\t\t\ttitle: '" . CUtil::JSEscape(GetMessage('IB_SE_SET_PRODUCT_TYPE_GROUP_ADD')) . "',\n\t\t\t\tname: 'groupset',\n\t\t\t\tid: 'groupset',\n\t\t\t\tclassName: 'adm-btn-add',\n\t\t\t\taction: function () {\n\t\t\t\t\ttop.BX.showWait();\n\t\t\t\t\ttop.BX.ajax.get('" . CIBlock::GetAdminSubElementEditLink($IBLOCK_ID, $intProductID, $ID, $reloadParams, '', true) . "',\n\t\t\t\t\tfunction (result) {\n\t\t\t\t\t\ttop.BX.closeWait();\n\t\t\t\t\t\ttop.BX.WindowManager.Get().SetContent(result);\n\t\t\t\t\t\tif (BX('groupset'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tBX.style(BX('groupset'), 'display', 'none');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}";
            }
            $tabControl->ButtonsPublic(array($setBtn));
开发者ID:vim84,项目名称:b-markt,代码行数:31,代码来源:iblock_subelement_edit.php

示例4: array

            }
        }
    }
    if (!$bizProcIndex) {
        $arTab2Fields[] = array("id" => "BIZPROC_NO", "name" => GetMessage("CT_BLEE_BIZPROC_NA_LABEL"), "type" => "label", "value" => GetMessage("CT_BLEE_BIZPROC_NA"));
    }
    $custom_html .= '<input type="hidden" name="bizproc_index" value="' . $bizProcIndex . '">';
    if ($arResult["ELEMENT_ID"]) {
        $bStartWorkflowPermission = CBPDocument::CanUserOperateDocument(CBPCanUserOperateOperation::StartWorkflow, $USER->GetID(), BizProcDocument::getDocumentComplexId($arParams["IBLOCK_TYPE_ID"], $arResult["ELEMENT_ID"]), array("AllUserGroups" => $arCurrentUserGroups, "DocumentStates" => $arDocumentStates, "WorkflowId" => $arDocumentState["TEMPLATE_ID"]));
        if ($bStartWorkflowPermission) {
            $arTab2Fields[] = array("id" => "BIZPROC_NEW", "name" => GetMessage("CT_BLEE_BIZPROC_NEW"), "type" => "section");
            $backUrl = CHTTP::urlAddParams($APPLICATION->GetCurPageParam("", array($arResult["FORM_ID"] . "_active_tab")), array($arResult["FORM_ID"] . "_active_tab" => "tab_bp"));
            $url = CHTTP::urlAddParams(str_replace(array("#list_id#", "#section_id#", "#element_id#", "#group_id#"), array($arResult["IBLOCK_ID"], intval($arResult["SECTION_ID"]), $arResult["ELEMENT_ID"], $arParams["SOCNET_GROUP_ID"]), $arParams["~BIZPROC_WORKFLOW_START_URL"]), array("back_url" => $backUrl, "sessid" => bitrix_sessid()), array("skip_empty" => true, "encode" => true));
            $arTab2Fields[] = array("id" => "BIZPROC_NEW_START", "name" => GetMessage("CT_BLEE_BIZPROC_START"), "type" => "custom", "colspan" => true, "value" => '<a href="' . htmlspecialcharsbx($url) . '">' . GetMessage("CT_BLEE_BIZPROC_START") . '</a>');
        }
    }
    $arTabs[] = array("id" => "tab_bp", "name" => GetMessage("CT_BLEE_BIZPROC_TAB"), "icon" => "", "fields" => $arTab2Fields);
}
if (isset($arResult["RIGHTS"])) {
    ob_start();
    IBlockShowRights('element', $arResult["IBLOCK_ID"], $arResult["ELEMENT_ID"], "", "RIGHTS", $arResult["TASKS"], $arResult["RIGHTS"], true, $arResult["ELEMENT_ID"] <= 0, $arResult["SELECTED"], $arResult["HIGHLIGHT"]);
    $rights_html = ob_get_contents();
    ob_end_clean();
    $rights_fields = array(array("id" => "RIGHTS", "name" => GetMessage("CT_BLEE_ACCESS_RIGHTS"), "type" => "custom", "colspan" => true, "value" => $rights_html));
    $arTabs[] = array("id" => "tab_rights", "name" => GetMessage("CT_BLEE_TAB_ACCESS"), "icon" => "", "fields" => $rights_fields);
}
$custom_html .= '<input type="hidden" name="action" id="action" value="">';
if (!$arParams["CAN_EDIT"]) {
    $custom_html .= '<input type="button" value="' . GetMessage("CT_BLEE_FORM_CANCEL") . '" name="cancel" onclick="window.location=\'' . htmlspecialcharsbx(CUtil::addslashes($arResult["~LIST_SECTION_URL"])) . '\'" title="' . GetMessage("CT_BLEE_FORM_CANCEL_TITLE") . '" />';
}
$APPLICATION->IncludeComponent("bitrix:main.interface.form", "", array("FORM_ID" => $arResult["FORM_ID"], "TABS" => $arTabs, "BUTTONS" => array("standard_buttons" => $arParams["CAN_EDIT"], "back_url" => $arResult["~LIST_SECTION_URL"], "custom_html" => $custom_html), "DATA" => $arResult["FORM_DATA"], "SHOW_SETTINGS" => "N", "THEME_GRID_ID" => $arResult["GRID_ID"]), $component, array("HIDE_ICONS" => "Y"));
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php

示例5: CIBlockSectionRights

    if ($ID > 0) {
        $obSectionRights = new CIBlockSectionRights($IBLOCK_ID, $ID);
        $htmlHidden = '';
        foreach ($obSectionRights->GetRights() as $RIGHT_ID => $arRight) {
            $htmlHidden .= '
				<input type="hidden" name="RIGHTS[][RIGHT_ID]" value="' . htmlspecialcharsbx($RIGHT_ID) . '">
				<input type="hidden" name="RIGHTS[][GROUP_CODE]" value="' . htmlspecialcharsbx($arRight["GROUP_CODE"]) . '">
				<input type="hidden" name="RIGHTS[][TASK_ID]" value="' . htmlspecialcharsbx($arRight["TASK_ID"]) . '">
			';
        }
    } else {
        $obSectionRights = new CIBlockSectionRights($IBLOCK_ID, $str_IBLOCK_SECTION_ID);
        $htmlHidden = '';
    }
    $tabControl->BeginCustomField("RIGHTS", GetMessage("IBSEC_E_RIGHTS_FIELD"));
    IBlockShowRights('section', $IBLOCK_ID, $ID, GetMessage("IBSEC_E_RIGHTS_SECTION_TITLE"), "RIGHTS", $obSectionRights->GetRightsList(), $obSectionRights->GetRights(array("count_overwrited" => true, "parent" => $str_IBLOCK_SECTION_ID)), true, $ID <= 0);
    $tabControl->EndCustomField("RIGHTS", $htmlHidden);
}
if ($arIBlock["SECTION_PROPERTY"] === "Y") {
    $tabControl->BeginNextFormTab();
    $tabControl->BeginCustomField("SECTION_PROPERTY", GetMessage("IBSEC_E_SECTION_PROPERTY_FIELD"));
    ?>
		<tr><td align="right" colspan="2">
				<a id="modeChangeToTree" href="javascript:setMode(BX('table_SECTION_PROPERTY'), 'tree')"><?php 
    echo GetMessage("IBSEC_E_PROP_TREE_MODE");
    ?>
</a>
				<a id="modeChangeToFlat" style="display: none;" href="javascript:setMode(BX('table_SECTION_PROPERTY'), 'flat')"><?php 
    echo GetMessage("IBSEC_E_PROP_FLAT_MODE");
    ?>
</a>
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:iblock_section_edit.php

示例6: array

    $typeTranslation = '';
}
if ($arResult["IBLOCK_ID"]) {
    $arToolbar[] = array("TEXT" => GetMessage("CT_BLLE_TOOLBAR_FIELDS" . $typeTranslation), "TITLE" => GetMessage("CT_BLLE_TOOLBAR_FIELDS" . $typeTranslation), "LINK" => $arResult["LIST_FIELDS_URL"], "ICON" => "btn-view-fields");
    $arToolbar[] = array("TEXT" => GetMessage("CT_BLLE_TOOLBAR_DELETE" . $typeTranslation), "TITLE" => GetMessage("CT_BLLE_TOOLBAR_DELETE_TITLE" . $typeTranslation), "LINK" => "javascript:jsDelete('" . CUtil::JSEscape("form_" . $arResult["FORM_ID"]) . "', '" . GetMessage("CT_BLLE_TOOLBAR_DELETE_WARNING" . $typeTranslation) . "')", "ICON" => "btn-delete-list");
    $arToolbar[] = array("SEPARATOR" => "Y");
    $arToolbar[] = array("TEXT" => $arResult["IBLOCK"]["ELEMENTS_NAME"], "TITLE" => GetMessage("CT_BLLE_TOOLBAR_LIST_TITLE"), "LINK" => $arResult["LIST_URL"], "ICON" => "btn-view-elements");
    if (!$processes && IsModuleInstalled('intranet') && !$arParams["SOCNET_GROUP_ID"]) {
        $arToolbar[] = array("TEXT" => GetMessage("CT_BLLE_TOOLBAR_MIGRATE_PROCESSES"), "TITLE" => GetMessage("CT_BLLE_TOOLBAR_MIGRATE_PROCESSES"), "LINK" => "javascript:jsMigrate('" . CUtil::JSEscape("form_" . $arResult["FORM_ID"]) . "', '" . GetMessage("CT_BLLE_TOOLBAR_MIGRATE_WARNING_PROCESS") . "')", "ICON" => "btn-delete-list");
    }
}
if (count($arToolbar)) {
    $APPLICATION->IncludeComponent("bitrix:main.interface.toolbar", "", array("BUTTONS" => $arToolbar), $component, array("HIDE_ICONS" => "Y"));
}
ob_start();
IBlockShowRights('iblock', $arResult["IBLOCK_ID"], $arResult["IBLOCK_ID"], "", "RIGHTS", $arResult["TASKS"], $arResult["RIGHTS"], true, false, $arResult["SELECTED"], $arResult["HIGHLIGHT"]);
$rights_html = ob_get_contents();
ob_end_clean();
$rights_fields = array(array("id" => "RIGHTS", "name" => GetMessage("CT_BLLE_ACCESS_RIGHTS"), "type" => "custom", "colspan" => true, "value" => $rights_html));
$custom_html = '<input type="hidden" name="action" id="action" value="">';
$arTab1 = array("id" => "tab1", "name" => GetMessage("CT_BLLE_TAB_EDIT"), "title" => GetMessage("CT_BLLE_TAB_EDIT_TITLE" . $typeTranslation), "icon" => "", "fields" => array(array("id" => "NAME", "name" => GetMessage("CT_BLLE_FIELD_NAME" . $typeTranslation), "required" => true), array("id" => "DESCRIPTION", "name" => GetMessage("CT_BLLE_FIELD_DESCRIPTION" . $typeTranslation), "type" => "textarea"), array("id" => "SORT", "name" => GetMessage("CT_BLLE_FIELD_SORT"), "params" => array("size" => 5)), array("id" => "PICTURE", "name" => GetMessage("CT_BLLE_FIELD_PICTURE"), "type" => "file")));
if ($arParams["IBLOCK_TYPE_ID"] == COption::GetOptionString("lists", "livefeed_iblock_type_id")) {
    if (isset($arResult["FORM_DATA"]["BIZPROC"])) {
        $arTab1["fields"][] = array("id" => "BIZPROC", "type" => "custom", "value" => '<input type="hidden" name="BIZPROC" value="Y">');
    }
} else {
    if (isset($arResult["FORM_DATA"]["BIZPROC"])) {
        $arTab1["fields"][] = array("id" => "BIZPROC", "name" => GetMessage("CT_BLLE_FIELD_BIZPROC"), "type" => "checkbox");
    }
}
$APPLICATION->IncludeComponent("bitrix:main.interface.form", "", array("FORM_ID" => $arResult["FORM_ID"], "TABS" => array($arTab1, array("id" => "tab2", "name" => GetMessage("CT_BLLE_TAB_MESSAGES"), "title" => GetMessage("CT_BLLE_TAB_MESSAGES_TITLE" . $typeTranslation), "icon" => "", "fields" => array(array("id" => "ELEMENTS_NAME", "name" => GetMessage("CT_BLLE_FIELD_ELEMENTS_NAME")), array("id" => "ELEMENT_NAME", "name" => GetMessage("CT_BLLE_FIELD_ELEMENT_NAME")), array("id" => "ELEMENT_ADD", "name" => GetMessage("CT_BLLE_FIELD_ELEMENT_ADD")), array("id" => "ELEMENT_EDIT", "name" => GetMessage("CT_BLLE_FIELD_ELEMENT_EDIT")), array("id" => "ELEMENT_DELETE", "name" => GetMessage("CT_BLLE_FIELD_ELEMENT_DELETE")), array("id" => "SECTIONS_NAME", "name" => GetMessage("CT_BLLE_FIELD_SECTIONS_NAME")), array("id" => "SECTION_NAME", "name" => GetMessage("CT_BLLE_FIELD_SECTION_NAME")), array("id" => "SECTION_ADD", "name" => GetMessage("CT_BLLE_FIELD_SECTION_ADD")), array("id" => "SECTION_EDIT", "name" => GetMessage("CT_BLLE_FIELD_SECTION_EDIT")), array("id" => "SECTION_DELETE", "name" => GetMessage("CT_BLLE_FIELD_SECTION_DELETE")))), array("id" => "tab3", "name" => GetMessage("CT_BLLE_TAB_ACCESS"), "title" => GetMessage("CT_BLLE_TAB_ACCESS_TITLE" . $typeTranslation), "icon" => "", "fields" => $rights_fields)), "BUTTONS" => array("back_url" => $arResult["~LISTS_URL"], "custom_html" => $custom_html), "DATA" => $arResult["FORM_DATA"], "SHOW_SETTINGS" => "N", "THEME_GRID_ID" => $arResult["GRID_ID"]), $component, array("HIDE_ICONS" => "Y"));
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php


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