Esempio n. 1
0
		));

		$arSiteMapFields = array(
			'NAME' => trim($_REQUEST['NAME']),
			'ACTIVE' => $_REQUEST['ACTIVE'] == 'N' ? 'N' : 'Y',
			'SITE_ID' => $SITE_ID,
			'SETTINGS' => serialize($arSitemapSettings),
		);

		if($ID > 0)
		{
			$result = SitemapTable::update($ID, $arSiteMapFields);
		}
		else
		{
			$result = SitemapTable::add($arSiteMapFields);
			$ID = $result->getId();
		}

		if($result->isSuccess())
		{
			$arSitemapIblock = array();

			SitemapIblockTable::clearBySitemap($ID);

			if(is_array($_REQUEST['IBLOCK_AUTO']))
			{
				foreach($_REQUEST['IBLOCK_AUTO'] as $iblockId => $auto)
				{
					if($auto === 'Y')
					{