}
                $urlCurrent = CHTTP::urlDeleteParams($urlCurrent, array($tmp[0]));
                $arUrlAdd[$tmp[0]] = $tmp[1];
            }
        }
        $url = CHTTP::urlAddParams($urlCurrent, $arUrlAdd, array("encode", "skip_empty"));
        $arCatalog[$key]["url"] = $url;
        if (isset($submenu["items"]) && count($submenu["items"]) > 0) {
            $subCatal = fReplaceUrl($submenu["items"], $urlCurrentDefault);
            $arCatalog[$key]["items"] = $subCatal;
        }
    }
    return $arCatalog;
}
$urlCurrent = $APPLICATION->GetCurPageParam();
$arCatalog = CCatalogAdmin::get_sections_menu('', $iblockId, 2, 0);
$arCatalog = fReplaceUrl($arCatalog, $urlCurrent);
foreach ($arCatalog as $submenu) {
    $adminMenu->_SetActiveItems($submenu, array());
    $adminMenu->Show($submenu, 0, $urlCurrent);
}
?>
	</div>
</td>
<td valign="top" align="left" style="border-left: 1px solid rgb(164, 185, 204);padding-left:15px;">
	<form name="find_form" method="GET" onsubmit="checkParameters(this); return false;" action="<?php 
echo $APPLICATION->GetCurPage();
?>
?" accept-charset="<?php 
echo LANG_CHARSET;
?>
Exemplo n.º 2
0
	public static function OnBuildSaleSettingsMenu(&$arItems)
	{
		global $USER;
		if (!isset($USER) || !(($USER instanceof CUser) && ('CUser' == get_class($USER))))
			return;
		if (!is_array($arItems))
			return;

		$boolRead = $USER->CanDoOperation('catalog_read');
		$boolGroup = $USER->CanDoOperation('catalog_group');
		$boolPrice = $USER->CanDoOperation('catalog_price');
		$boolExportEdit = $USER->CanDoOperation('catalog_export_edit');
		$boolExportExec = $USER->CanDoOperation('catalog_export_exec');
		$boolImportEdit = $USER->CanDoOperation('catalog_import_edit');
		$boolImportExec = $USER->CanDoOperation('catalog_import_exec');

		if ($boolRead || $boolGroup)
		{
			$arItems[] = array(
				"text" => GetMessage("GROUP"),
				"url" => "cat_group_admin.php?lang=".LANGUAGE_ID,
				"more_url" => array("cat_group_edit.php"),
				"title" => GetMessage("GROUP_ALT"),
				"readonly" => !$boolGroup,
			);
		}

		if (CBXFeatures::IsFeatureEnabled('CatMultiPrice'))
		{
			if ($boolRead || $boolPrice)
			{
				$arItems[] = array(
					"text" => GetMessage("EXTRA"),
					"url" => "cat_extra.php?lang=".LANGUAGE_ID,
					"more_url" => array("cat_extra_edit.php"),
					"title" => GetMessage("EXTRA_ALT"),
					"readonly" => !$boolPrice,
				);
			}
		}

		if ($boolRead || $boolExportEdit || $boolExportExec)
		{
			$arItems[] = array(
				"text" => GetMessage("SETUP_UNLOAD_DATA"),
				"url" => "cat_export_setup.php?lang=".LANGUAGE_ID,
				"more_url" => array("cat_exec_exp.php"),
				"title" => GetMessage("SETUP_UNLOAD_DATA_ALT"),
				"dynamic" => true,
				"module_id" => "sale",
				"items_id" => "mnu_catalog_exp",
				"readonly" => !$boolExportEdit && !$boolExportExec,
				"items" => CCatalogAdmin::OnBuildSaleExportMenu("mnu_catalog_exp"),
			);
		}

		if ($boolRead || $boolImportEdit || $boolImportExec)
		{
			$arItems[] = array(
				"text" => GetMessage("SETUP_LOAD_DATA"),
				"url" => "cat_import_setup.php?lang=".LANGUAGE_ID,
				"more_url" => array("cat_exec_imp.php"),
				"title" => GetMessage("SETUP_LOAD_DATA_ALT"),
				"dynamic" => true,
				"module_id" => "sale",
				"items_id" => "mnu_catalog_imp",
				"readonly" => !$boolImportEdit && !$boolImportExec,
				"items" => CCatalogAdmin::OnBuildSaleImportMenu("mnu_catalog_imp"),
			);
		}
	}
Exemplo n.º 3
0
	function OnBuildSaleSettingsMenu(&$arItems)
	{
		if (self::$catalogRead || self::$catalogGroup)
		{
			$arItems[] = array(
				"text" => Loc::getMessage("GROUP"),
				"url" => "cat_group_admin.php?lang=".LANGUAGE_ID,
				"more_url" => array("cat_group_edit.php"),
				"title" => Loc::getMessage("GROUP_ALT"),
				"readonly" => !self::$catalogGroup,
			);
		}

		if (CBXFeatures::IsFeatureEnabled('CatMultiPrice'))
		{
			if (self::$catalogRead || self::$catalogExtra)
			{
				$arItems[] = array(
					"text" => Loc::getMessage("EXTRA"),
					"url" => "cat_extra.php?lang=".LANGUAGE_ID,
					"more_url" => array("cat_extra_edit.php"),
					"title" => Loc::getMessage("EXTRA_ALT"),
					"readonly" => !self::$catalogExtra,
				);
			}
		}

		if (self::$catalogRead || self::$catalogMeasure)
		{
			$arItems[] = array(
				"text" => Loc::getMessage("MEASURE"),
				"url" => "cat_measure_list.php?lang=".LANGUAGE_ID,
				"more_url" => array("cat_measure_edit.php"),
				"title" => Loc::getMessage("MEASURE_ALT"),
				"readonly" => !self::$catalogMeasure,
			);
		}

		if (self::$catalogRead || self::$catalogExportEdit || self::$catalogExportExec)
		{
			$arItems[] = array(
				"text" => Loc::getMessage("SETUP_UNLOAD_DATA"),
				"url" => "cat_export_setup.php?lang=".LANGUAGE_ID,
				"more_url" => array("cat_exec_exp.php"),
				"title" => Loc::getMessage("SETUP_UNLOAD_DATA_ALT"),
				"dynamic" => true,
				"module_id" => "sale",
				"items_id" => "mnu_catalog_exp",
				"readonly" => !self::$catalogExportEdit && !self::$catalogExportExec,
				"items" => CCatalogAdmin::OnBuildSaleExportMenu("mnu_catalog_exp"),
			);
		}

		if (self::$catalogRead || self::$catalogImportEdit || self::$catalogImportExec)
		{
			$arItems[] = array(
				"text" => Loc::getMessage("SETUP_LOAD_DATA"),
				"url" => "cat_import_setup.php?lang=".LANGUAGE_ID,
				"more_url" => array("cat_exec_imp.php"),
				"title" => Loc::getMessage("SETUP_LOAD_DATA_ALT"),
				"dynamic" => true,
				"module_id" => "sale",
				"items_id" => "mnu_catalog_imp",
				"readonly" => !self::$catalogImportEdit && !self::$catalogImportExec,
				"items" => CCatalogAdmin::OnBuildSaleImportMenu("mnu_catalog_imp"),
			);
		}
	}
Exemplo n.º 4
0
 function OnBuildSaleSettingsMenu(&$arItems)
 {
     global $USER;
     if (!isset($USER) || !($USER instanceof CUser && 'CUser' == get_class($USER))) {
         return;
     }
     if (!is_array($arItems)) {
         return;
     }
     $boolRead = $USER->CanDoOperation('catalog_read');
     $boolStore = $USER->CanDoOperation('catalog_store');
     $boolGroup = $USER->CanDoOperation('catalog_group');
     $boolPrice = $USER->CanDoOperation('catalog_price');
     $boolExportEdit = $USER->CanDoOperation('catalog_export_edit');
     $boolExportExec = $USER->CanDoOperation('catalog_export_exec');
     $boolImportEdit = $USER->CanDoOperation('catalog_import_edit');
     $boolImportExec = $USER->CanDoOperation('catalog_import_exec');
     $boolStore = false;
     $arResult = array();
     foreach ($arItems as &$arOneItem) {
         $arResult[] = $arOneItem;
         if (isset($arOneItem['items_id']) && 'menu_sale_locations' == $arOneItem['items_id']) {
             $boolStore = true;
             if (CBXFeatures::IsFeatureEnabled('CatMultiStore')) {
                 if ($boolRead || $boolStore) {
                     $arResult[] = array("text" => GetMessage("CM_STORE"), "url" => "cat_store_list.php?lang=" . LANGUAGE_ID, "more_url" => array("cat_store_edit.php"), "title" => GetMessage("CM_STORE"), "readonly" => !$boolStore);
                 }
             }
         }
     }
     if (isset($arOneItem)) {
         unset($arOneItem);
     }
     if (!$boolStore) {
         if (CBXFeatures::IsFeatureEnabled('CatMultiStore')) {
             if ($boolRead || $boolStore) {
                 $arResult[] = array("text" => GetMessage("CM_STORE"), "url" => "cat_store_list.php?lang=" . LANGUAGE_ID, "more_url" => array("cat_store_edit.php"), "title" => GetMessage("CM_STORE"), "readonly" => !$boolStore);
             }
         }
     }
     if ($boolRead || $boolGroup) {
         $arResult[] = array("text" => GetMessage("GROUP"), "url" => "cat_group_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("cat_group_edit.php"), "title" => GetMessage("GROUP_ALT"), "readonly" => !$boolGroup);
     }
     if (CBXFeatures::IsFeatureEnabled('CatMultiPrice')) {
         if ($boolRead || $boolPrice) {
             $arResult[] = array("text" => GetMessage("EXTRA"), "url" => "cat_extra.php?lang=" . LANGUAGE_ID, "more_url" => array("cat_extra_edit.php"), "title" => GetMessage("EXTRA_ALT"), "readonly" => !$boolPrice);
         }
     }
     if ($boolRead || $boolExportEdit || $boolExportExec) {
         $arResult[] = array("text" => GetMessage("SETUP_UNLOAD_DATA"), "url" => "cat_export_setup.php?lang=" . LANGUAGE_ID, "more_url" => array("cat_exec_exp.php"), "title" => GetMessage("SETUP_UNLOAD_DATA_ALT"), "dynamic" => true, "module_id" => "sale", "items_id" => "mnu_catalog_exp", "readonly" => !$boolExportEdit && !$boolExportExec, "items" => CCatalogAdmin::OnBuildSaleExportMenu("mnu_catalog_exp"));
     }
     if ($boolRead || $boolImportEdit || $boolImportExec) {
         $arResult[] = array("text" => GetMessage("SETUP_LOAD_DATA"), "url" => "cat_import_setup.php?lang=" . LANGUAGE_ID, "more_url" => array("cat_exec_imp.php"), "title" => GetMessage("SETUP_LOAD_DATA_ALT"), "dynamic" => true, "module_id" => "sale", "items_id" => "mnu_catalog_imp", "readonly" => !$boolImportEdit && !$boolImportExec, "items" => CCatalogAdmin::OnBuildSaleImportMenu("mnu_catalog_imp"));
     }
     $arItems = $arResult;
 }