SetTitle("Музыкальные ТВ-каналы"); global $USER; ?>
IsAuthorized() || $_REQUEST["edit"]=="Y"){ AddEventHandler("iblock", "OnBeforeIBlockElementAdd", Array("MyClass", "OnBeforeIBlockElementAddHandler")); AddEventHandler("iblock", "OnBeforeIBlockElementUpdate", Array("MyClass", "OnBeforeIBlockElementUpdateHandler")); class MyClass{ // создаем обработчик события "OnBeforeIBlockElementAdd" function OnBeforeIBlockElementAddHandler(&$arFields){ //Обработка города global $APPLICATION; if($_REQUEST["LOCATION"]>0 && CModule::IncludeModule("sale")) { $city_params=CSaleLocation::GetByID( $_REQUEST["LOCATION"], ru); $arFields["PROPERTY_VALUES"][$_REQUEST["city_field_id"]]=$city_params["COUNTRY_NAME_LANG"]; if($city_params["CITY_NAME_LANG"] && $city_params["CITY_NAME_LANG"]!=""){ $arFields["PROPERTY_VALUES"][$_REQUEST["city_field_id"]].=", ".$city_params["CITY_NAME_LANG"]; } }elseif (!$arFields["PROPERTY_VALUES"][$_REQUEST["city_field_id"]]){ $APPLICATION->throwException("Не указан город"); return false; } } } ?> IncludeComponent("bitrix:iblock.element.add", "with_sity", array( "NAV_ON_PAGE" => "5", "USE_CAPTCHA" => "N", "USER_MESSAGE_ADD" => "Спасибо за предоставленную информацию, после одобрения администрацией книга появится в каталоге", "USER_MESSAGE_EDIT" => "Изменения приняты. После проверки модератором изменения будут внесены", "DEFAULT_INPUT_SIZE" => "60", "RESIZE_IMAGES" => "Y", "IBLOCK_TYPE" => "mass_media", "IBLOCK_ID" => "39", "PROPERTY_CODES" => array( 0 => "NAME", 1 => "TAGS", 2 => "PREVIEW_TEXT", 3 => "PREVIEW_PICTURE", 4 => "DETAIL_TEXT", 5 => "DETAIL_PICTURE", 6 => "180", 7 => "183", 8 => "181", 9 => "182", ), "PROPERTY_CODES_REQUIRED" => array( 0 => "NAME", 1 => "PREVIEW_TEXT", ), "GROUPS" => array( 0 => "3", ), "STATUS" => array( 0 => "2", 1 => "3", 2 => "1", ), "STATUS_NEW" => "2", "ALLOW_EDIT" => "Y", "ALLOW_DELETE" => "N", "ELEMENT_ASSOC" => "PROPERTY_ID", "ELEMENT_ASSOC_PROPERTY" => "168", "MAX_USER_ENTRIES" => "100000", "MAX_LEVELS" => "100000", "LEVEL_LAST" => "Y", "MAX_FILE_SIZE" => "0", "PREVIEW_TEXT_USE_HTML_EDITOR" => "N", "DETAIL_TEXT_USE_HTML_EDITOR" => "Y", "SEF_MODE" => "N", "SEF_FOLDER" => "/info/tv-channels/", "AJAX_MODE" => "Y", "AJAX_OPTION_SHADOW" => "Y", "AJAX_OPTION_JUMP" => "Y", "AJAX_OPTION_STYLE" => "Y", "AJAX_OPTION_HISTORY" => "Y", "CUSTOM_TITLE_NAME" => "", "CUSTOM_TITLE_TAGS" => "", "CUSTOM_TITLE_DATE_ACTIVE_FROM" => "", "CUSTOM_TITLE_DATE_ACTIVE_TO" => "", "CUSTOM_TITLE_IBLOCK_SECTION" => "", "CUSTOM_TITLE_PREVIEW_TEXT" => "", "CUSTOM_TITLE_PREVIEW_PICTURE" => "", "CUSTOM_TITLE_DETAIL_TEXT" => "", "CUSTOM_TITLE_DETAIL_PICTURE" => "", "AJAX_OPTION_ADDITIONAL" => "" ), false ); ?> IncludeComponent("bitrix:news", "public_edit", array( "IBLOCK_TYPE" => "mass_media", "IBLOCK_ID" => "39", "NEWS_COUNT" => "10", "USE_SEARCH" => "N", "USE_RSS" => "N", "USE_RATING" => "Y", "MAX_VOTE" => "5", "VOTE_NAMES" => array( 0 => "1", 1 => "2", 2 => "3", 3 => "4", 4 => "5", 5 => "", ), "USE_CATEGORIES" => "N", "USE_REVIEW" => "Y", "MESSAGES_PER_PAGE" => "10", "USE_CAPTCHA" => "Y", "PATH_TO_SMILE" => "/bitrix/images/forum/smile/", "FORUM_ID" => "10", "URL_TEMPLATES_READ" => "", "SHOW_LINK_TO_FORUM" => "N", "POST_FIRST_MESSAGE" => "N", "USE_FILTER" => "N", "SORT_BY1" => "SORT", "SORT_ORDER1" => "DESC", "SORT_BY2" => "SORT", "SORT_ORDER2" => "ASC", "CHECK_DATES" => "Y", "SEF_MODE" => "Y", "SEF_FOLDER" => "/info/tv-channels/", "AJAX_MODE" => "N", "AJAX_OPTION_SHADOW" => "Y", "AJAX_OPTION_JUMP" => "N", "AJAX_OPTION_STYLE" => "Y", "AJAX_OPTION_HISTORY" => "N", "CACHE_TYPE" => "A", "CACHE_TIME" => "3600", "CACHE_FILTER" => "N", "CACHE_GROUPS" => "Y", "SET_TITLE" => "Y", "SET_STATUS_404" => "N", "INCLUDE_IBLOCK_INTO_CHAIN" => "N", "ADD_SECTIONS_CHAIN" => "Y", "USE_PERMISSIONS" => "N", "PREVIEW_TRUNCATE_LEN" => "", "LIST_ACTIVE_DATE_FORMAT" => "d.m.Y", "LIST_FIELD_CODE" => array( 0 => "", 1 => "", ), "LIST_PROPERTY_CODE" => array( 0 => "site", 1 => "adress", 2 => "phone", 3 => "mail", 4 => "", ), "HIDE_LINK_WHEN_NO_DETAIL" => "Y", "DISPLAY_NAME" => "Y", "META_KEYWORDS" => "keywords", "META_DESCRIPTION" => "description", "BROWSER_TITLE" => "-", "DETAIL_ACTIVE_DATE_FORMAT" => "d.m.Y", "DETAIL_FIELD_CODE" => array( 0 => "", 1 => "", ), "DETAIL_PROPERTY_CODE" => array( 0 => "site", 1 => "adress", 2 => "phone", 3 => "mail", 4 => "", ), "DETAIL_DISPLAY_TOP_PAGER" => "N", "DETAIL_DISPLAY_BOTTOM_PAGER" => "Y", "DETAIL_PAGER_TITLE" => "Страница", "DETAIL_PAGER_TEMPLATE" => "", "DETAIL_PAGER_SHOW_ALL" => "Y", "DISPLAY_TOP_PAGER" => "N", "DISPLAY_BOTTOM_PAGER" => "Y", "PAGER_TITLE" => "Музыкальные каналы", "PAGER_SHOW_ALWAYS" => "N", "PAGER_TEMPLATE" => "", "PAGER_DESC_NUMBERING" => "N", "PAGER_DESC_NUMBERING_CACHE_TIME" => "36000", "PAGER_SHOW_ALL" => "Y", "DISPLAY_DATE" => "N", "DISPLAY_PICTURE" => "Y", "DISPLAY_PREVIEW_TEXT" => "Y", "AJAX_OPTION_ADDITIONAL" => "", "SEF_URL_TEMPLATES" => array( "news" => "", "section" => "#SECTION_ID#/", "detail" => "#ELEMENT_ID#.htm", "search" => "search/", "rss" => "rss/", "rss_section" => "#SECTION_ID#/rss/", ) ), false );?>