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


PHP CIBlockRights::UserHasRightTo方法代码示例

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


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

示例1: CheckIBlockOperation

 public static function CheckIBlockOperation($intIBlockID, $strOperation, $strAccess)
 {
     $intIBlockID = intval($intIBlockID);
     if ($intIBlockID <= 0) {
         return false;
     }
     if (!self::$boolCheck) {
         self::CheckExtRights();
     }
     if (self::$boolExtRights) {
         return CIBlockRights::UserHasRightTo($intIBlockID, $intIBlockID, $strOperation);
     } else {
         return CIBlock::GetPermission($intIBlockID) >= $strAccess;
     }
 }
开发者ID:Hawkart,项目名称:megatv,代码行数:15,代码来源:iblock_rights.php

示例2: executeComponent

 public function executeComponent()
 {
     global $USER, $APPLICATION;
     $this->setFrameMode(false);
     if (!CModule::IncludeModule('lists')) {
         ShowError(Loc::getMessage("CC_BLL_MODULE_NOT_INSTALLED"));
         return;
     }
     $this->arResult["BIZPROC"] = (bool) CModule::includeModule("bizproc");
     $this->arResult["DISK"] = (bool) CModule::includeModule("disk");
     $this->listsPerm = CListPermissions::CheckAccess($USER, $this->arParams["~IBLOCK_TYPE_ID"], $this->arResult["IBLOCK_ID"], $this->arParams["~SOCNET_GROUP_ID"]);
     if ($this->listsPerm < 0) {
         switch ($this->listsPerm) {
             case CListPermissions::WRONG_IBLOCK_TYPE:
                 ShowError(GetMessage("CC_BLL_WRONG_IBLOCK_TYPE"));
                 return;
             case CListPermissions::WRONG_IBLOCK:
                 ShowError(GetMessage("CC_BLL_WRONG_IBLOCK"));
                 return;
             case CListPermissions::LISTS_FOR_SONET_GROUP_DISABLED:
                 ShowError(GetMessage("CC_BLL_LISTS_FOR_SONET_GROUP_DISABLED"));
                 return;
             default:
                 ShowError(GetMessage("CC_BLL_UNKNOWN_ERROR"));
                 return;
         }
     } elseif ($this->listsPerm < CListPermissions::CAN_READ && !(CIBlockRights::UserHasRightTo($this->arResult["IBLOCK_ID"], $this->arResult["IBLOCK_ID"], "element_read") || CIBlockSectionRights::UserHasRightTo($this->arResult["IBLOCK_ID"], $this->arResult["SECTION_ID"], "section_element_bind"))) {
         ShowError(GetMessage("CC_BLL_ACCESS_DENIED"));
         return;
     }
     if (!(!$this->arResult["IS_SOCNET_GROUP_CLOSED"] && ($this->listsPerm > CListPermissions::CAN_READ || CIBlockSectionRights::UserHasRightTo($this->arResult["IBLOCK_ID"], $this->arResult["SECTION_ID"], "element_read") || CIBlockSectionRights::UserHasRightTo($this->arResult["IBLOCK_ID"], $this->arResult["SECTION_ID"], "section_element_bind")))) {
         ShowError(GetMessage("CC_BLL_ACCESS_DENIED"));
         return;
     }
     $this->createDataExcel();
     $APPLICATION->RestartBuffer();
     header("Content-Type: application/vnd.ms-excel");
     header("Content-Disposition: filename=list_" . $this->arIBlock["ID"] . ".xls");
     $this->IncludeComponentTemplate();
     $r = $APPLICATION->EndBufferContentMan();
     echo $r;
     include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
     die;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:44,代码来源:class.php

示例3: IncludeModuleLangFile

<?php

/** @global CMain $APPLICATION */
/** @global CDatabase $DB */
use Bitrix\Main\Loader, Bitrix\Main, Bitrix\Iblock;
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
Loader::includeModule('iblock');
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/iblock/prolog.php";
IncludeModuleLangFile(__FILE__);
$arIBlock = CIBlock::GetArrayByID($_GET["IBLOCK_ID"]);
if (!is_array($arIBlock)) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
if (!CIBlockRights::UserHasRightTo($arIBlock["ID"], $arIBlock["ID"], "iblock_edit")) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
$simpleTypeList = array(Iblock\PropertyTable::TYPE_STRING => true, Iblock\PropertyTable::TYPE_NUMBER => true, Iblock\PropertyTable::TYPE_LIST => true, Iblock\PropertyTable::TYPE_FILE => true, Iblock\PropertyTable::TYPE_SECTION => true, Iblock\PropertyTable::TYPE_ELEMENT => true);
$sTableID = "tbl_iblock_property_admin_" . $arIBlock["ID"];
$oSort = new CAdminSorting($sTableID, 'SORT', 'ASC');
$lAdmin = new CAdminList($sTableID, $oSort);
$arFilterFields = array("find_name", "find_code", "find_active", "find_searchable", "find_filtrable", "find_is_required", "find_multiple", "find_xml_id", "find_property_type");
$lAdmin->InitFilter($arFilterFields);
$arFilter = array("=IBLOCK_ID" => $arIBlock["ID"], "?NAME" => $find_name, "?CODE" => $find_code, "=ACTIVE" => $find_active, "=SEARCHABLE" => $find_searchable, "=FILTRABLE" => $find_filtrable, "=XML_ID" => $find_xml_id, "=PROPERTY_TYPE" => $find_property_type, "=IS_REQUIRED" => $find_is_required, "=MULTIPLE" => $find_multiple);
foreach ($arFilter as $key => $value) {
    if (!strlen(trim($value))) {
        unset($arFilter[$key]);
    }
}
if (isset($arFilter['=PROPERTY_TYPE'])) {
    if (!isset($simpleTypeList[$arFilter['=PROPERTY_TYPE']])) {
        list($arFilter['=PROPERTY_TYPE'], $arFilter['=USER_TYPE']) = explode(':', $arFilter['=PROPERTY_TYPE'], 2);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:iblock_property_admin.php

示例4: intval

}
if (0 == $IBLOCK_ID) {
    $IBLOCK_ID = intval($_REQUEST["IBLOCK_ID"]);
    if (0 >= $IBLOCK_ID) {
        $IBLOCK_ID = 0;
    }
}
$arIBTYPE = false;
if ($IBLOCK_ID > 0) {
    $arIBlock = CIBlock::GetArrayByID($IBLOCK_ID);
    if ($arIBlock) {
        $arIBTYPE = CIBlockType::GetByIDLang($arIBlock["IBLOCK_TYPE_ID"], LANGUAGE_ID);
        if (!$arIBTYPE) {
            $APPLICATION->AuthForm(GetMessage("BX_MOD_CATALOG_ADMIN_CSS_BAD_BLOCK_TYPE_ID"));
        }
        $bBadBlock = !CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_admin_display");
    } else {
        $bBadBlock = true;
    }
    if ($bBadBlock) {
        $APPLICATION->AuthForm(GetMessage("BX_MOD_CATALOG_ADMIN_CSS_BAD_IBLOCK"));
    }
} else {
    $arIBlock = array("ID" => 0, "NAME" => "", "SECTIONS_NAME" => GetMessage("BX_MOD_CATALOG_ADMIN_CSS_SECTIONS"));
}
############################################
$arFilter = array("?NAME" => $find_section_name, "SECTION_ID" => $find_section_section, "ID" => $find_section_id, ">=TIMESTAMP_X" => $find_section_timestamp_1, "<=TIMESTAMP_X" => $find_section_timestamp_2, "MODIFIED_BY" => $find_section_modified_user_id ? $find_section_modified_user_id : $find_section_modified_by, ">=DATE_CREATE" => $find_section_date_create_1, "<=DATE_CREATE" => $find_section_date_create_2, "CREATED_BY" => $find_section_created_user_id ? $find_section_created_user_id : $find_section_created_by, "ACTIVE" => $find_section_active, "CODE" => $find_section_code, "EXTERNAL_ID" => $find_section_external_id);
if ($entity_id) {
    $USER_FIELD_MANAGER->AdminListAddFilter($entity_id, $arFilter);
}
if ($find_section_section == "") {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:cat_section_search.php

示例5: foreach

        foreach ($_SESSION["BX_IBLOCK_CONV"]["arNumber"] as $id) {
            $id = intval($id);
            $ar["arNumber"][$id] = $id;
        }
    }
    $_SESSION["BX_IBLOCK_CONV"] = $ar;
} else {
    $_SESSION["BX_IBLOCK_CONV"] = false;
}
$arErrors = array();
$arMessages = array();
$APPLICATION->SetTitle(GetMessage("IBCONV_TITLE"));
$sTableID = "tbl_iblock_convert";
$lAdmin = new CAdminList($sTableID);
$lAdmin->BeginCustomContent();
if (!CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_edit") || !check_bitrix_sessid() && $STEP > 0) {
    $arErrors[] = GetMessage("IBCONV_PERMISSION");
} else {
    $rsIBlock = CIBlock::GetList(array(), array("ID" => $IBLOCK_ID, "CHECK_PERMISSIONS" => "N"));
    if ($arIBlock = $rsIBlock->Fetch()) {
        if ($arIBlock["VERSION"] == 1) {
            if ($STEP != 0 && $WAY != 12) {
                $arErrors[] = GetMessage("IBCONV_WRONG_CONVERSION");
            } elseif ($STEP == 1) {
                $STEP = 2;
            } elseif ($STEP == 2) {
                $STEP = FirstStep12($arIBlock);
            } elseif ($STEP == 3) {
                $STEP = NextStep12($arIBlock);
            } elseif ($STEP == 4) {
                $STEP = 5;
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:iblock_convert.php

示例6: strval

$ACTION = strval($ACTION);
//********************  ACTIONS  **************************************//
if (($ACTION == 'EXPORT_EDIT' || $ACTION == 'EXPORT_COPY') && $STEP == 1) {
    if (isset($arOldSetupVars['IBLOCK_ID'])) {
        $IBLOCK_ID = $arOldSetupVars['IBLOCK_ID'];
    }
}
if ($STEP > 1) {
    $IBLOCK_ID = (int) $IBLOCK_ID;
    if ($IBLOCK_ID <= 0) {
        $arSetupErrors[] = GetMessage("CATI_NO_IBLOCK");
    } else {
        $rsIBlocks = CIBlock::GetList(array(), array('IBLOCK_ID' => $IBLOCK_ID, 'CHECK_PERMISSIONS' => 'N'));
        if (!($arIBlock = $rsIBlocks->Fetch())) {
            $arSetupErrors[] = GetMessage("CATI_NO_IBLOCK");
        } elseif (!CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, 'iblock_admin_display')) {
            $arSetupErrors[] = str_replace('#IBLOCK_ID#', $IBLOCK_ID, GetMessage('CET_ERROR_IBLOCK_PERM'));
        }
    }
    if (!empty($arSetupErrors)) {
        $STEP = 1;
    }
}
if (($ACTION == 'EXPORT_EDIT' || $ACTION == 'EXPORT_COPY') && $STEP == 2) {
    if (isset($arOldSetupVars['IBLOCK_ID']) && $arOldSetupVars['IBLOCK_ID'] == $IBLOCK_ID) {
        if (isset($arOldSetupVars['field_needed'])) {
            $field_needed = $arOldSetupVars['field_needed'];
        }
        if (isset($arOldSetupVars['field_num'])) {
            $field_num = $arOldSetupVars['field_num'];
        }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:csv_new_setup.php

示例7: unset

 unset($currency, $currencyName);
 $IBLOCK_ID = intval($IBLOCK_ID);
 if ($IBLOCK_ID <= 0) {
     return;
 }
 $arCatalog = CCatalog::GetByID($IBLOCK_ID);
 $PRODUCT_ID = 0 < $ID ? CIBlockElement::GetRealElement($ID) : 0;
 $arBaseProduct = CCatalogProduct::GetByID($PRODUCT_ID);
 $periodTimeTypes = array();
 if ($arCatalog["SUBSCRIPTION"] == "Y") {
     $periodTimeTypes = CCatalogProduct::GetTimePeriodTypes(true);
 }
 if (0 < $PRODUCT_ID) {
     $bReadOnly = !($USER->CanDoOperation('catalog_price') && CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $PRODUCT_ID, "element_edit_price"));
 } else {
     $bReadOnly = !($USER->CanDoOperation('catalog_price') && CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "element_edit_price"));
 }
 if ($bSubCopy) {
     $arBaseProduct['QUANTITY'] = '';
     $arBaseProduct['QUANTITY_RESERVED'] = '';
 }
 $bDiscount = $USER->CanDoOperation('catalog_discount');
 $bStore = $USER->CanDoOperation('catalog_store');
 $bUseStoreControl = COption::GetOptionString('catalog', 'default_use_store_control') == "Y";
 $bEnableReservation = 'N' != COption::GetOptionString('catalog', 'enable_reservation');
 $availQuantityTrace = COption::GetOptionString("catalog", "default_quantity_trace");
 $availCanBuyZero = COption::GetOptionString("catalog", "default_can_buy_zero");
 $availNegativeAmountGlobal = COption::GetOptionString("catalog", "allow_negative_amount");
 $strGlobalSubscribe = COption::GetOptionString("catalog", "default_subscribe");
 $arExtraList = array();
 $l = CExtra::GetList(array("NAME" => "ASC"));
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:subproduct_edit.php

示例8: ShowError

            return;
        case CListPermissions::WRONG_IBLOCK:
            ShowError(GetMessage("CC_BLF_WRONG_IBLOCK"));
            return;
        case CListPermissions::LISTS_FOR_SONET_GROUP_DISABLED:
            ShowError(GetMessage("CC_BLF_LISTS_FOR_SONET_GROUP_DISABLED"));
            return;
        default:
            ShowError(GetMessage("CC_BLF_UNKNOWN_ERROR"));
            return;
    }
} elseif ($arParams["~IBLOCK_ID"] > 0 && $lists_perm < CListPermissions::IS_ADMIN && !CIBlockRights::UserHasRightTo($arParams["~IBLOCK_ID"], $arParams["~IBLOCK_ID"], "iblock_edit") || $arParams["~IBLOCK_ID"] == 0 && $lists_perm < CListPermissions::IS_ADMIN) {
    ShowError(GetMessage("CC_BLF_ACCESS_DENIED"));
    return;
}
$arParams["CAN_EDIT"] = $lists_perm >= CListPermissions::IS_ADMIN || $arParams["~IBLOCK_ID"] > 0 && CIBlockRights::UserHasRightTo($arParams["~IBLOCK_ID"], $arParams["~IBLOCK_ID"], "iblock_edit");
$arIBlock = CIBlock::GetArrayByID(intval($arParams["~IBLOCK_ID"]));
$arResult["~IBLOCK"] = $arIBlock;
$arResult["IBLOCK"] = htmlspecialcharsex($arIBlock);
$arResult["IBLOCK_ID"] = $arIBlock["ID"];
if (isset($arParams["SOCNET_GROUP_ID"]) && $arParams["SOCNET_GROUP_ID"] > 0) {
    $arParams["SOCNET_GROUP_ID"] = intval($arParams["SOCNET_GROUP_ID"]);
} else {
    $arParams["SOCNET_GROUP_ID"] = "";
}
$arResult["GRID_ID"] = "lists_fields";
$arResult["~LISTS_URL"] = str_replace(array("#group_id#"), array($arParams["SOCNET_GROUP_ID"]), $arParams["~LISTS_URL"]);
$arResult["LISTS_URL"] = htmlspecialcharsbx($arResult["~LISTS_URL"]);
$arResult["~LIST_URL"] = CHTTP::urlAddParams(str_replace(array("#list_id#", "#section_id#", "#group_id#"), array($arResult["IBLOCK_ID"], 0, $arParams["SOCNET_GROUP_ID"]), $arParams["~LIST_URL"]), array("list_section_id" => ""));
$arResult["LIST_URL"] = htmlspecialcharsbx($arResult["~LIST_URL"]);
$arResult["~LIST_EDIT_URL"] = str_replace(array("#list_id#", "#group_id#"), array($arResult["IBLOCK_ID"], $arParams["SOCNET_GROUP_ID"]), $arParams["~LIST_EDIT_URL"]);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例9: GetMessage

		if (is_array($arCatalog))
		{
			$arPropLinks = CIBlockSectionPropertyLink::GetArray($arCatalog["IBLOCK_ID"], 0);
		?>
		<tr colspan="2" class="heading">
			<td align="center"><?echo GetMessage("CAT_CEDIT_PROP_SKU_SECTION");?></td>
		</tr>
		<tr colspan="2"><td align="center">
			<table class="internal" id="table_SKU_SECTION_PROPERTY">
			<tr class="heading">
				<td><?echo GetMessage("CAT_CEDIT_PROP_TABLE_NAME");?></td>
				<td><?echo GetMessage("CAT_CEDIT_PROP_TABLE_TYPE");?></td>
				<td><?echo GetMessage("CAT_CEDIT_PROP_TABLE_SMART_FILTER");?></td>
				<td><?echo GetMessage("CAT_CEDIT_PROP_TABLE_ACTION");?></td></tr>
			<?
			if(CIBlockRights::UserHasRightTo($arCatalog["IBLOCK_ID"], $arCatalog["IBLOCK_ID"], "iblock_edit"))
				$arShadow = $arHidden = array(
					-1 => GetMessage("CAT_CEDIT_PROP_SELECT_CHOOSE"),
					0 => GetMessage("CAT_CEDIT_PROP_SELECT_CREATE"),
				);
			else
				$arShadow = $arHidden = array(
					-1 => GetMessage("CAT_CEDIT_PROP_SELECT_CHOOSE"),
				);

			$rsProps =  CIBlockProperty::GetList(array(
					"SORT"=>"ASC",
					'ID' => 'ASC',
				), array(
					"IBLOCK_ID" => $arCatalog["IBLOCK_ID"],
					"CHECK_PERMISSIONS" => "N",
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:cat_catalog_edit.php

示例10: checkIblockAccess

 protected function checkIblockAccess()
 {
     if (!$this->checkPermissions) {
         return true;
     }
     $id = $this->getIblockId();
     $error = '';
     if ($id) {
         if (!\CIBlockRights::UserHasRightTo($id, $id, "element_read")) {
             $error = Loc::getMessage("SPS_NO_PERMS");
         }
     } else {
         $error = Loc::getMessage("SPS_NO_CATALOGS");
     }
     if ($error) {
         $this->arResult['ERROR'] = $error;
         $this->arResult['IS_EXTERNALCONTEXT'] = $this->isExternalContext();
         $this->includeComponentTemplate('error');
         exit;
     }
 }
开发者ID:ASDAFF,项目名称:1C_Bitrix_info_site,代码行数:21,代码来源:class.php

示例11: elseif

     } elseif ($bWorkflow && ($WF == "Y" || $view == "Y")) {
         $bBadBlock = false;
     } elseif ($bBizproc) {
         $bBadBlock = false;
     } elseif (($ID <= 0 || $bCopy) && CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, 0, "section_element_bind")) {
         $bBadBlock = false;
     }
 }
 if ($bBadBlock) {
     $error = new _CIBlockError(1, "BAD_IBLOCK", GetMessage("IBLOCK_BAD_IBLOCK"));
     $APPLICATION->SetTitle($arIBTYPE["ELEMENT_NAME"] . ": " . GetMessage("IBLOCK_EDIT_TITLE"));
     break;
 }
 $arShowTabs['workflow'] = $bWorkflow;
 $arShowTabs['bizproc'] = $bBizproc && $historyId <= 0;
 $bEditRights = $arIBlock["RIGHTS_MODE"] === "E" && (CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $ID, "element_rights_edit") || ($ID <= 0 || $bSubCopy) && CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "element_rights_edit"));
 $arShowTabs['edit_rights'] = $bEditRights;
 $arShowTabs['catalog'] = $view != "Y" && $bCatalog && ($USER->CanDoOperation('catalog_read') || $USER->CanDoOperation('catalog_price'));
 $aTabs = array();
 $aTabs[] = array("DIV" => "sub_edit1", "TAB" => $arIBlock["ELEMENT_NAME"], "ICON" => "iblock_element", "TITLE" => htmlspecialcharsex($arIBlock["ELEMENT_NAME"]));
 $aTabs[] = array("DIV" => "sub_edit5", "TAB" => GetMessage("IBEL_E_TAB_PREV"), "ICON" => "iblock_element", "TITLE" => GetMessage("IBEL_E_TAB_PREV_TITLE"));
 $aTabs[] = array("DIV" => "sub_edit6", "TAB" => GetMessage("IBEL_E_TAB_DET"), "ICON" => "iblock_element", "TITLE" => GetMessage("IBEL_E_TAB_DET_TITLE"));
 $aTabs[] = array("DIV" => "sub_edit14", "TAB" => GetMessage("IBEL_E_TAB14"), "ICON" => "iblock_iprops", "TITLE" => GetMessage("IBEL_E_TAB14_TITLE"));
 if ($arShowTabs['catalog']) {
     $aTabs[] = array("DIV" => "sub_edit10", "TAB" => GetMessage("IBLOCK_TCATALOG"), "ICON" => "iblock_element", "TITLE" => GetMessage("IBLOCK_TCATALOG"), "required" => true);
 }
 if ($arShowTabs['product_group']) {
     $aTabs[] = array("DIV" => "product_group", "TAB" => GetMessage("IBLOCK_EL_TAB_PRODUCT_GROUP"), "ICON" => "iblock_element", "TITLE" => GetMessage("IBLOCK_EL_TAB_PRODUCT_GROUP_TITLE"), "required" => true);
 }
 if ($arShowTabs['workflow']) {
     $aTabs[] = array("DIV" => "sub_edit4", "TAB" => GetMessage("IBLOCK_EL_TAB_WF"), "ICON" => "iblock_element_wf", "TITLE" => GetMessage("IBLOCK_EL_TAB_WF_TITLE"));
开发者ID:vim84,项目名称:b-markt,代码行数:31,代码来源:iblock_subelement_edit.php

示例12: array

$boolCatalogPurchasInfo = false;
$boolCatalogSet = false;
$arProductTypeList = array();
if ($bCatalog) {
    $strUseStoreControl = COption::GetOptionString("catalog", "default_use_store_control");
    $strSaveWithoutPrice = COption::GetOptionString('catalog', 'save_product_without_price', 'N');
    $boolCatalogRead = $USER->CanDoOperation('catalog_read');
    $boolCatalogPrice = $USER->CanDoOperation('catalog_price');
    $boolCatalogPurchasInfo = $USER->CanDoOperation('catalog_purchas_info');
    $boolCatalogSet = CBXFeatures::IsFeatureEnabled('CatCompleteSet');
    $arCatalog = CCatalogSKU::GetInfoByIBlock($arIBlock["ID"]);
    if (empty($arCatalog)) {
        $bCatalog = false;
    } else {
        if (CCatalogSKU::TYPE_PRODUCT == $arCatalog['CATALOG_TYPE'] || CCatalogSKU::TYPE_FULL == $arCatalog['CATALOG_TYPE']) {
            if (CIBlockRights::UserHasRightTo($arCatalog['IBLOCK_ID'], $arCatalog['IBLOCK_ID'], "iblock_admin_display")) {
                $boolSKU = true;
                $strSKUName = GetMessage('IBEL_A_OFFERS');
            }
        }
        if (CCatalogSKU::TYPE_PRODUCT == $arCatalog['CATALOG_TYPE'])
            $bCatalog = false;
        if (!$boolCatalogRead && !$boolCatalogPrice)
            $bCatalog = false;
    }
    $arProductTypeList = array(
        CCatalogProduct::TYPE_PRODUCT => GetMessage('IBEL_CATALOG_TYPE_MESS_PRODUCT'),
        CCatalogProduct::TYPE_SET => GetMessage('IBEL_CATALOG_TYPE_MESS_SET'),
        CCatalogProduct::TYPE_SKU => GetMessage('IBEL_CATALOG_TYPE_MESS_SKU'),
        CCatalogProduct::TYPE_OFFER => GetMessage('IBEL_CATALOG_TYPE_MESS_OFFER')
    );
开发者ID:ASDAFF,项目名称:bitrix-modules-setprops,代码行数:31,代码来源:setprops.php

示例13: array

$rsCatalog = CCatalog::GetList(array(), array(), false, false, array('IBLOCK_ID', 'PRODUCT_IBLOCK_ID'));
while ($ar = $rsCatalog->Fetch()) {
    if (!$ar["PRODUCT_IBLOCK_ID"]) {
        $arCatalogs[$ar["IBLOCK_ID"]] = 1;
    }
}
$rsIBlocks = CIBlock::GetList(array("SORT" => "asc", "NAME" => "ASC"), array('ID' => array_keys($arCatalogs), "MIN_PERMISSION" => "U"));
$rsIBlocks = new CAdminResult($rsIBlocks, $sTableID);
while ($dbrs = $rsIBlocks->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $dbrs, 'cat_catalog_edit.php?IBLOCK_ID=' . $f_ID . '&lang=' . LANGUAGE_ID);
    $f_LID = '';
    $db_LID = CIBlock::GetSite($f_ID);
    while ($ar_LID = $db_LID->Fetch()) {
        $f_LID .= ($f_LID != "" ? " / " : "") . htmlspecialcharsbx($ar_LID["LID"]);
    }
    $row->AddViewField("LID", $f_LID);
    $row->AddViewField("NAME", '<a href="' . htmlspecialcharsbx('cat_catalog_edit.php?IBLOCK_ID=' . $f_ID . '&lang=' . LANGUAGE_ID) . '">' . $f_NAME . '</a>');
    $row->AddCheckField("ACTIVE", false);
    $arActions = array();
    if (CIBlockRights::UserHasRightTo($f_ID, $f_ID, "iblock_edit")) {
        $arActions[] = array("ICON" => "edit", "TEXT" => GetMessage("MAIN_ADMIN_MENU_EDIT"), "DEFAULT" => $_REQUEST["admin"] == "Y", "ACTION" => "window.location='" . CUtil::JSEscape('cat_catalog_edit.php?IBLOCK_ID=' . $f_ID . '&lang=' . LANGUAGE_ID) . "';");
    }
    if (!empty($arActions)) {
        $row->AddActions($arActions);
    }
}
$lAdmin->CheckListMode();
$APPLICATION->SetTitle(GetMessage("CAT_CADM_TITLE"));
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$lAdmin->DisplayList();
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:cat_catalog_admin.php

示例14: GetMessage

        echo GetMessage("IBSEC_E_PROP_TABLE_ACTION_ADD");
        ?>
" onclick="javascript:addSectionProperty(<?php 
        echo $arCatalog["IBLOCK_ID"];
        ?>
, 'select_SKU_SECTION_PROPERTY', 'shadow_SKU_SECTION_PROPERTY', 'table_SKU_SECTION_PROPERTY')">
		</td></tr>
			<?php 
    }
    ?>
	<?php 
    $tabControl->EndCustomField("SECTION_PROPERTY", '');
}
if (strlen($return_url) > 0) {
    $bu = $return_url;
} else {
    $bu = "/bitrix/admin/" . CIBlock::GetAdminSectionListLink($IBLOCK_ID, array('find_section_section' => intval($find_section_section)));
}
if (!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1) {
    $tabControl->Buttons(array("disabled" => false, "btnSaveAndAdd" => true, "return_url" => $bu));
} elseif ($nobuttons !== "Y") {
    $save_and_add = "{\n\t\ttitle: '" . CUtil::JSEscape(GetMessage("IBSEC_E_SAVE_AND_ADD")) . "',\n\t\tname: 'save_and_add',\n\t\tid: 'save_and_add',\n\t\tclassName: 'adm-btn-add',\n\t\taction: function () {\n\t\t\tvar FORM = this.parentWindow.GetForm();\n\t\t\tFORM.appendChild(BX.create('INPUT', {\n\t\t\t\tprops: {\n\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\tname: 'save_and_add',\n\t\t\t\t\tvalue: 'Y'\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\tthis.parentWindow.hideNotify();\n\t\t\tthis.disableUntilError();\n\t\t\tthis.parentWindow.Submit();\n\t\t}\n\t}";
    $cancel = "{\n\t\ttitle: '" . CUtil::JSEscape(GetMessage("admin_lib_edit_cancel")) . "',\n\t\tname: 'cancel',\n\t\tid: 'cancel',\n\t\taction: function () {\n\t\t\tBX.WindowManager.Get().Close();\n\t\t\tif(window.reloadAfterClose)\n\t\t\t\ttop.BX.reload(true);\n\t\t}\n\t}";
    $tabControl->ButtonsPublic(array('.btnSave', $cancel, $save_and_add));
}
$tabControl->Show();
$tabControl->ShowWarnings($tabControl->GetName(), $message);
if (CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_edit") && (!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1)) {
    echo BeginNote(), GetMessage("IBSEC_E_IBLOCK_MANAGE_HINT"), ' <a href="iblock_edit.php?type=' . htmlspecialcharsbx($type) . '&amp;lang=' . LANGUAGE_ID . '&amp;ID=' . $IBLOCK_ID . '&amp;admin=Y&amp;return_url=' . urlencode(CIBlock::GetAdminSectionEditLink($IBLOCK_ID, $ID, array("find_section_section" => intval($find_section_section), "return_url" => strlen($return_url) > 0 ? $return_url : null))) . '">', GetMessage("IBSEC_E_IBLOCK_MANAGE_HINT_HREF"), '</a>', EndNote();
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:iblock_section_edit.php

示例15: trim

         }
     }
     if (strlen($strError) <= 0) {
         if (strlen($DATA_FILE_NAME) <= 0) {
             if (strlen($URL_DATA_FILE) > 0) {
                 $URL_DATA_FILE = trim(str_replace("\\", "/", trim($URL_DATA_FILE)), "/");
                 $FILE_NAME = rel2abs($_SERVER["DOCUMENT_ROOT"], "/" . $URL_DATA_FILE);
                 if (strlen($FILE_NAME) > 1 && $FILE_NAME === "/" . $URL_DATA_FILE && $io->FileExists($_SERVER["DOCUMENT_ROOT"] . $FILE_NAME) && $APPLICATION->GetFileAccessPermission($FILE_NAME) >= "W") {
                     $DATA_FILE_NAME = $FILE_NAME;
                 }
             }
         }
         if (strlen($DATA_FILE_NAME) <= 0) {
             $strError .= GetMessage("IBLOCK_ADM_IMP_NO_DATA_FILE_SIMPLE") . "<br>";
         }
         if (!CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "element_edit_any_wf_status")) {
             $strError .= GetMessage("IBLOCK_ADM_IMP_NO_IBLOCK") . "<br>";
         }
     }
     if (strlen($strError) <= 0) {
         if ($CUR_FILE_POS > 0 && is_set($_SESSION, $CUR_LOAD_SESS_ID) && is_set($_SESSION[$CUR_LOAD_SESS_ID], "LOAD_SCHEME")) {
             parse_str($_SESSION[$CUR_LOAD_SESS_ID]["LOAD_SCHEME"]);
             $STEP = 4;
         }
     }
     if (strlen($strError) > 0) {
         $STEP = 1;
     }
     //*****************************************************************//
 }
 if ($STEP > 2) {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:data_import.php


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