/** Add new store in table b_catalog_store, * @static * @param $arFields * @return bool|int */ static function Add($arFields) { /** @global CDataBase $DB */ global $DB; if (!CBXFeatures::IsFeatureEnabled('CatMultiStore')) { $dbResultList = CCatalogStore::GetList(array()); if ($arResult = $dbResultList->Fetch()) { $GLOBALS["APPLICATION"]->ThrowException(GetMessage("CS_ALREADY_HAVE_STORE")); return false; } } if (array_key_exists('DATE_CREATE', $arFields)) { unset($arFields['DATE_CREATE']); } if (array_key_exists('DATE_MODIFY', $arFields)) { unset($arFields['DATE_MODIFY']); } $arFields['~DATE_MODIFY'] = $DB->GetNowFunction(); $arFields['~DATE_CREATE'] = $DB->GetNowFunction(); if (!self::CheckFields('ADD', $arFields)) { return false; } $arInsert = $DB->PrepareInsert("b_catalog_store", $arFields); $strSql = "INSERT INTO b_catalog_store (" . $arInsert[0] . ") " . "VALUES(" . $arInsert[1] . ")"; $res = $DB->Query($strSql, False, "File: " . __FILE__ . "<br>Line: " . __LINE__); if (!$res) { return false; } $lastId = intval($DB->LastID()); return $lastId; }
public static function SPRegisterUpdatedItem($arFields) { if (CBXFeatures::IsFeatureEnabled('intranet_sharepoint')) { if (CIntranetSharepoint::$bUpdateInProgress) { return; } $dbRes = CIntranetSharepoint::GetByID($arFields['IBLOCK_ID']); if ($arRes = $dbRes->Fetch()) { CIntranetSharepoint::AddToUpdateLog($arFields); } } }
/** Add new store in table b_catalog_store, * @static * @param $arFields * @return bool|int */ static function Add($arFields) { /** @global CDataBase $DB */ global $DB; if (!CBXFeatures::IsFeatureEnabled('CatMultiStore')) { $dbResultList = CCatalogStore::GetList(array(), array(), false, array('NAV_PARAMS' => array("nTopCount" => "1")), array("ID")); if ($arResult = $dbResultList->Fetch()) { $GLOBALS["APPLICATION"]->ThrowException(GetMessage("CS_ALREADY_HAVE_STORE")); return false; } } foreach (GetModuleEvents("catalog", "OnBeforeCatalogStoreAdd", true) as $arEvent) { if (ExecuteModuleEventEx($arEvent, array(&$arFields)) === false) { return false; } } if (array_key_exists('DATE_CREATE', $arFields)) { unset($arFields['DATE_CREATE']); } if (array_key_exists('DATE_MODIFY', $arFields)) { unset($arFields['DATE_MODIFY']); } $arFields['~DATE_MODIFY'] = $DB->GetNowFunction(); $arFields['~DATE_CREATE'] = $DB->GetNowFunction(); if (!self::CheckFields('ADD', $arFields)) { return false; } $arInsert = $DB->PrepareInsert("b_catalog_store", $arFields); $strSql = "INSERT INTO b_catalog_store (" . $arInsert[0] . ") VALUES(" . $arInsert[1] . ")"; $res = $DB->Query($strSql, False, "File: " . __FILE__ . "<br>Line: " . __LINE__); if (!$res) { return false; } $lastId = intval($DB->LastID()); foreach (GetModuleEvents("catalog", "OnCatalogStoreAdd", true) as $arEvent) { ExecuteModuleEventEx($arEvent, array($lastId, $arFields)); } return $lastId; }
if ($gadget["COMPANY_PHOTO_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("CompanyPhoto")) { continue; } if ($gadget["COMPANY_CALENDAR_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("CompanyCalendar")) { continue; } if ($gadget["CALENDAR_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("Calendar")) { continue; } if ($gadget["COMPANY_VIDEO_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("CompanyVideo")) { continue; } if ($gadget["WORKGROUPS_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("Workgroups")) { continue; } if ($gadget["FRIENDS_ONLY"] == true && !CBXFeatures::IsFeatureEnabled("Friends")) { continue; } if ($USER->IsAuthorized() && $arResult["PERMISSION"] < "W" && $gadget["SELF_PROFILE_ONLY"] == true && $arParams["MODE"] == "SU" && intval($arParams["USER_ID"]) > 0 && $arParams["USER_ID"] != $USER->GetID()) { continue; } if ($gadget["BLOG_ONLY"] == true && $gadget["SU_ONLY"] == true && intval($arParams["USER_ID"]) > 0 && CModule::IncludeModule('socialnetwork') && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_USER, $arParams["USER_ID"], "blog")) { continue; } if ($gadget["BLOG_ONLY"] == true && $gadget["SG_ONLY"] == true && intval($arParams["SOCNET_GROUP_ID"]) > 0 && CModule::IncludeModule('socialnetwork') && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_GROUP, $arParams["SOCNET_GROUP_ID"], "blog")) { continue; } if ($gadget["FORUM_ONLY"] == true && $gadget["SU_ONLY"] == true && intval($arParams["USER_ID"]) > 0 && CModule::IncludeModule('socialnetwork') && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_USER, $arParams["USER_ID"], "forum")) { continue; } if ($gadget["FORUM_ONLY"] == true && $gadget["SG_ONLY"] == true && intval($arParams["SOCNET_GROUP_ID"]) > 0 && CModule::IncludeModule('socialnetwork') && !CSocNetFeatures::IsActiveFeature(SONET_ENTITY_GROUP, $arParams["SOCNET_GROUP_ID"], "forum")) {
?><a href="/bitrix/admin/event_log.php?lang=<? echo LANGUAGE_ID; ?>&set_filter=Y<? echo CCatalogEvent::GetYandexAgentFilter(); ?>"><? echo Loc::getMessage('CAT_AGENT_EVENT_LOG_SHOW_ERROR')?></a> </td></tr> <? $systemTabControl->BeginNextTab(); ?><tr><td align="left"><? $firstTop = ' style="margin-top: 0;"'; if (!$useSaleDiscountOnly) { ?> <h4<? echo $firstTop; ?>><? echo Loc::getMessage('CAT_PROC_REINDEX_DISCOUNT'); ?></h4> <input class="adm-btn-save" type="button" id="discount_reindex" value="<? echo Loc::getMessage('CAT_PROC_REINDEX_DISCOUNT_BTN'); ?>"> <p><? echo Loc::getMessage('CAT_PROC_REINDEX_DISCOUNT_ALERT'); ?></p><? $firstTop = ''; } if (CBXFeatures::IsFeatureEnabled('CatCompleteSet') && CCatalogProductSetAvailable::getAllCounter() > 0) { ?><h4<? echo $firstTop; ?>><? echo Loc::getMessage('CAT_PROC_REINDEX_SETS_AVAILABLE'); ?></h4> <input class="adm-btn-save" type="button" id="sets_reindex" value="<? echo Loc::getMessage('CAT_PROC_REINDEX_SETS_AVAILABLE_BTN'); ?>"> <p><? echo Loc::getMessage('CAT_PROC_REINDEX_SETS_AVAILABLE_ALERT'); ?></p><? $firstTop = ''; } ?> </td></tr><? if ($strUseStoreControl === 'N' && !empty($arCatalogList)) { $userListID = array(); $strQuantityUser = ''; $strQuantityReservedUser = ''; $strStoreUser = ''; $strClearQuantityDate = '';
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!CModule::IncludeModule("socialnetwork")) { ShowError(GetMessage("SONET_MODULE_NOT_INSTALL")); return; } if (!CBXFeatures::IsFeatureEnabled("Workgroups")) { ShowError(GetMessage("SONET_WORKGROUPS_FEATURE_DISABLED")); return; } $arDefaultUrlTemplates404 = array("index" => "index.php", "group_reindex" => "group_reindex.php", "group_content_search" => "group/#group_id#/search/", "group_request_user" => "group/#group_id#/user/#user_id#/request/", "group_create" => "create/", "search" => "search.php", "group" => "group/#group_id#/", "group_edit" => "group/#group_id#/edit/", "group_requests" => "group/#group_id#/requests/", "group_requests_out" => "group/#group_id#/requests_out/", "group_mods" => "group/#group_id#/moderators/", "group_users" => "group/#group_id#/users/", "group_ban" => "group/#group_id#/ban/", "group_delete" => "group/#group_id#/delete/", "group_features" => "group/#group_id#/features/", "group_subscribe" => "group/#group_id#/subscribe/", "group_list" => "group/", "group_search" => "group/search/", "group_search_subject" => "group/search/#subject_id#/", "user_leave_group" => "group/#group_id#/user_leave/", "user_request_group" => "group/#group_id#/user_request/", "group_request_search" => "group/#group_id#/user_search/", "message_to_group" => "group/#group_id#/chat/", "group_photo" => "group/#group_id#/photo/", "group_photo_gallery" => "group/#group_id#/photo/gallery/", "group_photo_gallery_edit" => "group/#group_id#/photo/gallery/action/#action#/", "group_photo_galleries" => "group/#group_id#/photo/galleries/", "group_photo_section" => "group/#group_id#/photo/album/#section_id#/", "group_photo_section_edit" => "group/#group_id#/photo/album/#section_id#/action/#action#/", "group_photo_section_edit_icon" => "group/#group_id#/photo/album/#section_id#/icon/action/#action#/", "group_photo_element_upload" => "group/#group_id#/photo/photo/#section_id#/action/upload/", "group_photo_element" => "group/#group_id#/photo/photo/#section_id#/#element_id#/", "group_photo_element_edit" => "group/#group_id#/photo/photo/#section_id#/#element_id#/action/#action#/", "group_photo_element_slide_show" => "group/#group_id#/photo/photo/#section_id#/#element_id#/slide_show/", "group_photofull_gallery" => "group/#group_id#/photo/gallery/#user_alias#/", "group_photofull_gallery_edit" => "group/#group_id#/photo/gallery/#user_alias#/action/#action#/", "group_photofull_section" => "group/#group_id#/photo/album/#user_alias#/#section_id#/", "group_photofull_section_edit" => "group/#group_id#/photo/album/#user_alias#/#section_id#/action/#action#/", "group_photofull_section_edit_icon" => "group/#group_id#/photo/album/#user_alias#/#section_id#/icon/action/#action#/", "group_photofull_element_upload" => "group/#group_id#/photo/photo/#user_alias#/#section_id#/action/upload/", "group_photofull_element" => "group/#group_id#/photo/photo/#user_alias#/#section_id#/#element_id#/", "group_photofull_element_edit" => "group/#group_id#/photo/photo/#user_alias#/#section_id#/#element_id#/action/#action#/", "group_photofull_element_slide_show" => "group/#group_id#/photo/photo/#user_alias#/#section_id#/#element_id#/slide_show/", "group_calendar" => "group/#group_id#/calendar/", "group_files" => "group/#group_id#/files/lib/#path#/", "group_files_short" => "folder/view/#section_id#/#element_id#/#element_name#", "group_files_section_edit" => "group/#group_id#/files/folder/edit/#section_id#/#action#/", "group_files_element" => "group/#group_id#/files/element/view/#element_id#/", "group_files_element_comment" => "group/#group_id#/files/element/comment/#topic_id#/#message_id#/", "group_files_element_edit" => "group/#group_id#/files/element/edit/#element_id#/#action#/", "group_files_element_file" => "", "group_files_element_history" => "group/#group_id#/files/element/history/#element_id#/", "group_files_element_history_get" => "group/#group_id#/files/element/historyget/#element_id#/#element_name#", "group_files_element_version" => "group/#group_id#/files/element/version/#action#/#element_id#/", "group_files_element_versions" => "group/#group_id#/files/element/versions/#element_id#/", "group_files_element_upload" => "group/#group_id#/files/element/upload/#section_id#/", "group_files_help" => "group/#group_id#/files/help/", "group_files_connector" => "group/#group_id#/files/connector/", "group_files_webdav_bizproc_history" => "group/#group_id#/files/bizproc/history/#element_id#/", "group_files_webdav_bizproc_history_get" => "group/#group_id#/files/bizproc/historyget/#element_id#/#id#/#element_name#", "group_files_webdav_bizproc_log" => "group/#group_id#/files/bizproc/log/#element_id#/#id#/", "group_files_webdav_bizproc_view" => "group/#group_id#/files/bizproc/bizproc/#element_id#/", "group_files_webdav_bizproc_workflow_admin" => "group/#group_id#/files/bizproc/admin/", "group_files_webdav_bizproc_workflow_edit" => "group/#group_id#/files/bizproc/edit/#id#/", "group_files_webdav_start_bizproc" => "group/#group_id#/files/bizproc/start/#element_id#/", "group_files_webdav_task_list" => "group/#group_id#/files/bizproc/task/list/", "group_files_webdav_task" => "group/#group_id#/files/bizproc/task/read/#id#/", "group_blog" => "group/#group_id#/blog/", "group_blog_post_edit" => "group/#group_id#/blog/edit/#post_id#/", "group_blog_rss" => "group/#group_id#/blog/rss/#type#/", "group_blog_post_rss" => "group/#group_id#/blog/rss/#type#/#post_id#/", "group_blog_draft" => "group/#group_id#/blog/draft/", "group_blog_moderation" => "group/#group_id#/blog/moderation/", "group_blog_post" => "group/#group_id#/blog/#post_id#/", "group_forum" => "group/#group_id#/forum/", "group_forum_topic" => "group/#group_id#/forum/#topic_id#/", "group_forum_topic_edit" => "group/#group_id#/forum/edit/#topic_id#/", "group_forum_message" => "group/#group_id#/forum/message/#topic_id#/#message_id#/", "group_forum_message_edit" => "group/#group_id#/forum/message/#action#/#topic_id#/#message_id#/", "group_tasks" => "group/#group_id#/tasks/", "group_tasks_task" => "group/#group_id#/tasks/task/#action#/#task_id#/", "group_tasks_view" => "group/#group_id#/tasks/view/#action#/#view_id#/", "group_tasks_report" => "group/#group_id#/tasks/report/", "group_tasks_report_construct" => "group/#group_id#/tasks/report/construct/#report_id#/#action#/", "group_tasks_report_view" => "group/#group_id#/tasks/report/view/#report_id#/", "group_log" => "group/#group_id#/log/", "group_log_rss" => "group/#group_id#/log/rss/?bx_hit_hash=#sign#&events=#events#", "group_log_rss_mask" => "group/#group_id#/log/rss/"); $diskEnabled = \Bitrix\Main\Config\Option::get('disk', 'successfully_converted', false) && CModule::includeModule('disk'); if ($diskEnabled) { $arDefaultUrlTemplates404["group_disk"] = "group/#group_id#/disk/path/#PATH#"; $arDefaultUrlTemplates404["group_disk_file"] = "group/#group_id#/disk/file/#FILE_PATH#"; $arDefaultUrlTemplates404["group_trashcan_list"] = "group/#group_id#/disk/trashcan/#TRASH_PATH#"; $arDefaultUrlTemplates404["group_trashcan_file_view"] = "group/#group_id#/disk/trash/file/#TRASH_FILE_PATH#"; $arDefaultUrlTemplates404["group_external_link_list"] = "group/#group_id#/disk/external"; $arDefaultUrlTemplates404["group_disk_bizproc_workflow_admin"] = "group/#group_id#/disk/bp/"; $arDefaultUrlTemplates404["group_disk_bizproc_workflow_edit"] = "group/#group_id#/disk/bp_edit/#ID#/"; $arDefaultUrlTemplates404["group_disk_start_bizproc"] = "group/#group_id#/disk/bp_start/#ELEMENT_ID#/"; $arDefaultUrlTemplates404["group_disk_task"] = "group/#group_id#/disk/bp_task/#ID#/"; $arDefaultUrlTemplates404["group_disk_task_list"] = "group/#group_id#/disk/bp_task_list/"; } $arDefaultUrlTemplatesN404 = array("index" => "", "group_reindex" => "page=group_reindex", "group_content_search" => "page=group_content_search&group_id=#group_id#", "group_create" => "page=group_create&user_id=#group_id#", "group" => "page=group&group_id=#group_id#", "group_edit" => "page=group_edit&group_id=#group_id#", "group_requests" => "page=group_requests&group_id=#group_id#", "group_requests_out" => "page=group_requests_out&group_id=#group_id#", "group_mods" => "page=group_mods&group_id=#group_id#", "group_users" => "page=group_users&group_id=#group_id#", "group_ban" => "page=group_ban&group_id=#group_id#", "group_delete" => "page=group_delete&group_id=#group_id#", "group_features" => "page=group_features&group_id=#group_id#", "group_subscribe" => "page=group_subscribe&group_id=#group_id#", "group_list" => "page=group_list", "group_search" => "page=group_search", "group_search_subject" => "page=group_search_subject&subject_id=#subject_id#", "user_leave_group" => "page=user_leave_group&group_id=#group_id#", "group_request_user" => "page=group_request_user&group_id=#group_id#&user_id=#user_id#", "user_request_group" => "page=user_request_group&group_id=#group_id#", "group_request_search" => "page=group_request_search&group_id=#group_id#", "group_photo" => "page=group_photo&group_id=#group_id#", "group_photo_gallery" => "page=group_photo_gallery&group_id=#group_id#", "group_photo_gallery_edit" => "page=group_photo_gallery&group_id=#group_id#&action=#action#", "group_photo_galleries" => "page=group_photo_galleries&group_id=#group_id#", "group_photo_section" => "page=group_photo_section&group_id=#group_id#§ion_id=#section_id#", "group_photo_section_edit" => "page=group_photo_section_edit&group_id=#group_id#§ion_id=#section_id#&action=#action#", "group_photo_section_edit_icon" => "page=group_photo_section_edit_icon&group_id=#group_id#§ion_id=#section_id#&action=#action#", "group_photo_element_upload" => "page=group_photo_element_upload&group_id=#group_id#§ion_id=#section_id#", "group_photo_element" => "page=group_photo_element&group_id=#group_id#§ion_id=#section_id#&element_id=#element_id#", "group_photo_element_edit" => "page=group_photo_element_edit&group_id=#group_id#§ion_id=#section_id#&element_id=#element_id#&action=#action#", "group_photo_element_slide_show" => "page=group_photo_element_slide_show&group_id=#group_id#§ion_id=#section_id#&element_id=#element_id#", "group_photofull_gallery" => "page=group_photofull_gallery&group_id=#group_id#&user_alias=#user_alias#", "group_photofull_gallery_edit" => "page=group_photofull_gallery_edit&group_id=#group_id#&user_alias=#user_alias#&action=#action#", "group_photofull_section" => "page=group_photofull_section&group_id=#group_id#&user_alias=#user_alias#§ion_id=#section_id#", "group_photofull_section_edit" => "page=group_photofull_section_edit&group_id=#group_id#&user_alias=#user_alias#§ion_id=#section_id#&action=#action#", "group_photofull_section_edit_icon" => "page=group_photofull_section_edit_icon&group_id=#group_id#&user_alias=#user_alias#§ion_id=#section_id#&action=#action#", "group_photofull_element_upload" => "page=group_photofull_element_upload&group_id=#group_id#&user_alias=#user_alias#§ion_id=#section_id#", "group_photofull_element" => "page=group_photofull_element&group_id=#group_id#&user_alias=#user_alias#§ion_id=#section_id#&element_id=#element_id#", "group_photofull_element_edit" => "page=group_photofull_element_edit&group_id=#group_id#&user_alias=#user_alias#§ion_id=#section_id#&element_id=#element_id#&action=#action#", "group_photofull_element_slide_show" => "page=group_photofull_element_slide_show&group_id=#group_id#&user_alias=#user_alias#§ion_id=#section_id#&element_id=#element_id#", "group_calendar" => "page=group_calendar&group_id=#group_id#", "message_to_group" => "page=message_to_group&group_id=#group_id#", "group_files" => "page=group_files&group_id=#group_id#&path=#path#", "group_files_short" => "page=group_files_short&group_id=#group_id#§ion_id=#section_id#&element_id=#element_id#&element_name=#element_name#", "group_files_section_edit" => "page=group_files_section_edit&group_id=#group_id#§ion_id=#section_id#&action=#action#", "group_files_element" => "page=group_files_element&group_id=#group_id#&element_id=#element_id#", "group_files_element_comment" => "page=group_files_element_comment&group_id=#group_id#&topic_id=#topic_id#&message_id=#message_id#", "group_files_element_edit" => "page=group_files_element_edit&group_id=#group_id#&element_id=#element_id#&action=#action#", "group_files_element_file" => "", "group_files_element_history" => "page=group_files_element_history&element_id=#element_id#", "group_files_element_history_get" => "page=group_files_element_history_get&element_id=#element_id#&element_name=#element_name#", "group_files_element_version" => "page=group_files_element_version&group_id=#group_id#&element_id=#element_id#&action=#action#", "group_files_element_versions" => "page=group_files_element_versions&group_id=#group_id#&element_id=#element_id#", "group_files_element_upload" => "page=group_files_element_upload&group_id=#group_id#§ion_id=#section_id#", "group_files_help" => "page=group_files_help&group_id=#group_id#", "group_files_connector" => "page=group_files_connector&group_id=#group_id#", "group_files_webdav_bizproc_history" => "page=group_files_webdav_bizproc_history&group_id=#group_id#&element_id=#element_id#", "group_files_webdav_bizproc_history_get" => "page=group_files_webdav_bizproc_history_get&group_id=#group_id#&element_id=#element_id#&element_name=#element_name#", "group_files_webdav_bizproc_log" => "page=group_files_webdav_bizproc_log&group_id=#group_id#&element_id=#element_id#&id=#id#", "group_files_webdav_bizproc_view" => "page=group_files_webdav_bizproc_view&group_id=#group_id#&element_id=#element_id#", "group_files_webdav_bizproc_workflow_admin" => "page=group_files_webdav_bizproc_workflow_admin&group_id=#group_id#", "group_files_webdav_bizproc_workflow_edit" => "page=group_files_webdav_bizproc_workflow_edit&group_id=#group_id#&id=#id#", "group_files_webdav_start_bizproc" => "page=group_files_webdav_start_bizproc&group_id=#group_id#&element_id=#element_id#", "group_files_webdav_task_list" => "page=group_files_webdav_task_list&group_id=#group_id#", "group_files_webdav_task" => "page=group_files_webdav_task&group_id=#group_id#&id=#id#", "group_blog" => "page=group_blog&group_id=#group_id#", "group_blog_post_edit" => "page=group_blog_post_edit&group_id=#group_id#&post_id=#post_id#", "group_blog_rss" => "page=group_blog_rss&group_id=#group_id#&type=#type#", "group_blog_post_rss" => "page=group_blog_post_rss&group_id=#group_id#&type=#type#&post_id=#post_id#", "group_blog_draft" => "page=group_blog_draft&group_id=#group_id#", "group_blog_moderation" => "page=group_blog_moderation&group_id=#group_id#", "group_blog_post" => "page=group_blog_post&group_id=#group_id#&post_id=#post_id#", "group_forum" => "page=group_forum&group_id=#group_id#", "group_forum_topic" => "page=group_forum_topic&group_id=#group_id#&topic_id=#topic_id#", "group_forum_topic_edit" => "page=group_forum_topic_edit&group_id=#group_id#&topic_id=#topic_id#", "group_forum_message" => "page=group_forum_message&group_id=#group_id#&topic_id=#topic_id#&message_id=#message_id#", "group_forum_message_edit" => "page=group_forum_message_edit&group_id=#group_id#&topic_id=#topic_id#&message_id=#message_id#&action=#action#", "group_tasks" => "page=group_tasks&group_id=#group_id#", "group_tasks_task" => "page=group_tasks_task&group_id=#group_id#&action=#action#&task_id=#task_id#", "group_tasks_view" => "page=group_tasks_view&group_id=#group_id#&action=#action#&view_id=#view_id#", "group_tasks_report" => "page=group_tasks_report&group_id=#group_id#", "group_tasks_report_construct" => "page=group_tasks_report_construct&group_id=#group_id#&action=#action#&report_id=#report_id#", "group_tasks_report_view" => "page=group_tasks_report_view&group_id=#group_id#&report_id=#report_id#", "group_log" => "page=group_log&group_id=#group_id#", "group_log_rss" => "page=group_log_rss&group_id=#group_id#&bx_hit_hash=#sign#&events=#events#"); $arDefaultVariableAliases404 = array(); $arDefaultVariableAliases = array(); $componentPage = "";
<input type="hidden" name="CAT_ROW_COUNTER" id="CAT_ROW_COUNTER" value="<?php echo $ind; ?> "> <input type="button" value="<?php echo GetMessage("C2IT_MORE"); ?> " OnClick="ClonePriceSections()"> </td> </tr> <script type="text/javascript"> arCatalogGroups = []; catalogGroupsInd = 0; </script> <?php if (CBXFeatures::IsFeatureEnabled('CatMultiPrice')) { $dbCatalogGroups = CCatalogGroup::GetList(array("SORT" => "ASC", "NAME" => "ASC", "ID" => "ASC"), array("!BASE" => "Y")); while ($arCatalogGroup = $dbCatalogGroups->Fetch()) { ?> <script type="text/javascript"> arCatalogGroups[catalogGroupsInd] = <?php echo $arCatalogGroup["ID"]; ?> ; catalogGroupsInd++; </script> <tr> <td valign="top" align="right"> <?php echo GetMessage("C2IT_PRICE_TYPE"); ?>
$strUseStoreControl = ''; $strSaveWithoutPrice = ''; $boolCatalogRead = false; $boolCatalogPrice = false; $boolCatalogPurchasInfo = false; $boolCatalogSet = false; $arProductTypeList = array(); $showCatalogWithOffers = false; 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('IBLIST_A_OFFERS'); } }
if ($arResult["IBLOCK"]["BIZPROC"] == "Y" && $arParams["CAN_EDIT_BIZPROC"]) { $arToolbar[] = array("TEXT" => GetMessage("CT_BLL_TOOLBAR_BIZPROC"), "TITLE" => GetMessage("CT_BLL_TOOLBAR_BIZPROC_TITLE"), "LINK" => $arResult["BIZPROC_WORKFLOW_ADMIN_URL"], "ICON" => "btn-list-bizproc"); } if ($arParams["IBLOCK_TYPE_ID"] == COption::GetOptionString("lists", "livefeed_iblock_type_id")) { $text = GetMessage("CT_BLL_TOOLBAR_PROCESS"); $title = GetMessage("CT_BLL_TOOLBAR_PROCESS_TITLE"); } else { $text = GetMessage("CT_BLL_TOOLBAR_LIST"); $title = GetMessage("CT_BLL_TOOLBAR_LIST_TITLE"); } $arToolbar[] = array("TEXT" => $text, "TITLE" => $title, "LINK" => $arResult["LIST_EDIT_URL"], "ICON" => "btn-edit-list"); } if ($arResult["CAN_READ"]) { $arToolbar[] = array("TEXT" => GetMessage("CT_BLL_EXPORT_EXCEL"), "TITLE" => GetMessage("CT_BLL_EXPORT_EXCEL_TITLE"), "LINK" => CHTTP::urlAddParams(strpos($APPLICATION->GetCurPageParam(), "?") == false ? $arResult["EXPORT_EXCEL_URL"] : $arResult["EXPORT_EXCEL_URL"] . substr($APPLICATION->GetCurPageParam(), strpos($APPLICATION->GetCurPageParam(), "?")), array("ncc" => "y")), "ICON" => "btn-list-excel"); } if (IsModuleInstalled('intranet') && CBXFeatures::IsFeatureEnabled('intranet_sharepoint')) { if ($arIcons = $APPLICATION->IncludeComponent('bitrix:sharepoint.link', '', array('IBLOCK_ID' => $arParams['IBLOCK_ID'], 'OUTPUT' => 'N'), null, array('HIDE_ICONS' => 'Y'))) { if (count($arIcons['LINKS']) > 0) { $arMenu = array(); foreach ($arIcons['LINKS'] as $link) { $arMenu[] = array('TEXT' => $link['TEXT'], 'ONCLICK' => $link['ONCLICK'], 'ICONCLASS' => $link['ICON']); } $arToolbar[] = array('TEXT' => 'SharePoint', 'ICON' => 'bx-sharepoint', 'MENU' => $arMenu); } } } if (count($arToolbar)) { $APPLICATION->IncludeComponent("bitrix:main.interface.toolbar", "", array("BUTTONS" => $arToolbar), $component, array("HIDE_ICONS" => "Y")); } $arActions = array(); if (!empty($arResult["ELEMENTS_CAN_DELETE"])) {
function GetFormatedUserName($USER_ID, $bEnableId = true) { $result = ""; $USER_ID = IntVal($USER_ID); if ($USER_ID > 0) { if (!isset($LOCAL_PAYED_USER_CACHE[$USER_ID]) || !is_array($LOCAL_PAYED_USER_CACHE[$USER_ID])) { $dbUser = CUser::GetByID($USER_ID); if ($arUser = $dbUser->Fetch()) { $LOCAL_PAYED_USER_CACHE[$USER_ID] = CUser::FormatName(CSite::GetNameFormat(false), array("NAME" => $arUser["NAME"], "LAST_NAME" => $arUser["LAST_NAME"], "SECOND_NAME" => $arUser["SECOND_NAME"], "LOGIN" => $arUser["LOGIN"]), true, true); } } if ($bEnableId) { $result .= '[<a href="/bitrix/admin/user_edit.php?ID=' . $USER_ID . '&lang=' . LANGUAGE_ID . '">' . $USER_ID . '</a>] '; } if (CBXFeatures::IsFeatureEnabled('SaleAccounts')) { $result .= '<a href="/bitrix/admin/sale_buyers_profile.php?USER_ID=' . $USER_ID . '&lang=' . LANGUAGE_ID . '">'; } else { $result .= '<a href="/bitrix/admin/user_edit.php?ID=' . $USER_ID . '&lang=' . LANGUAGE_ID . '">'; } $result .= $LOCAL_PAYED_USER_CACHE[$USER_ID]; $result .= '</a>'; } return $result; }
<a href="/bitrix/admin/settings.php?mid=catalog&lang=<?php echo LANGUAGE_ID; ?> "><?php echo GetMessage("C2IT_NO_USER_GROUPS2"); ?> </a>.</td> </tr> <?php } ?> </table> <br><b>1)</b> <?php echo GetMessage("C2IT_ZERO_HINT"); } if (CBXFeatures::IsFeatureEnabled('CatMultiStore')) { $tabControl1->BeginNextTab(); ?> <table border="0" cellspacing="0" cellpadding="0" width="100%" class="internal"> <tr class="heading"> <td><?php echo GetMessage("C2IT_STORE_NUMBER"); ?> </td> <td><?php echo GetMessage("C2IT_NAME"); ?> </td> <td><?php echo GetMessage("C2IT_STORE_ADDR"); ?>
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } IncludeModuleLangFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/intranet/public/workgroups/extranet/.left.menu_ext.php"); global $APPLICATION; // You can change this url template $strGroupSubjectLinkTemplate = COption::GetOptionString("socialnetwork", "subject_path_template", "/workgroups/group/search/#subject_id#/"); $strGroupLinkTemplate = COption::GetOptionString("socialnetwork", "group_path_template", "/workgroups/group/#group_id#/"); if (SITE_TEMPLATE_ID == "bitrix24") { if (CModule::IncludeModule("extranet") && CBXFeatures::IsFeatureEnabled('Workgroups') && CBXFeatures::IsFeatureEnabled('Extranet')) { global $USER; $USER_ID = $USER->GetID(); $arExSGGroup = array(); if (CModule::IncludeModule("socialnetwork")) { if (defined("BX_COMP_MANAGED_CACHE")) { global $CACHE_MANAGER; $CACHE_MANAGER->RegisterTag('sonet_user2group_U' . $USER_ID); } // get all groups from current site (if not extranet) if (SITE_ID != CExtranet::GetExtranetSiteID()) { $arGroupForCheck = array(); $dbGroups = CSocNetGroup::GetList(array(), array("SITE_ID" => SITE_ID), false, false, array('ID')); while ($arGroups = $dbGroups->GetNext()) { $arGroupForCheck[] = $arGroups["ID"]; } } if (!is_array($arGroupForCheck) || count($arGroupForCheck) > 0) { $arGroupFilterMy = array("USER_ID" => $USER_ID, "<=ROLE" => SONET_ROLES_USER, "GROUP_ACTIVE" => "Y", "!GROUP_CLOSED" => "Y", "GROUP_SITE_ID" => CExtranet::GetExtranetSiteID()); if (count($arGroupForCheck) > 0) {
public static function IsSocNet() { if (!isset(self::$bSocNet)) { self::$bSocNet = class_exists('CSocNetUserToGroup') && CBXFeatures::IsFeatureEnabled("Calendar") && self::IsIntranetEnabled(); } return self::$bSocNet; }
$intSelected = 0; } $arResult['JS_OFFERS'] = $arMatrix; $arResult['OFFERS_SELECTED'] = $intSelected; if ($arMatrix[$intSelected]['SLIDER_COUNT'] > 0) { $arResult['MORE_PHOTO'] = $arMatrix[$intSelected]['SLIDER']; $arResult['MORE_PHOTO_COUNT'] = $arMatrix[$intSelected]['SLIDER_COUNT']; } $arResult['OFFERS_IBLOCK'] = $arSKU['IBLOCK_ID']; } if ($arResult['MODULES']['catalog'] && $arResult['CATALOG']) { if ($arResult['CATALOG_TYPE'] == CCatalogProduct::TYPE_PRODUCT || $arResult['CATALOG_TYPE'] == CCatalogProduct::TYPE_SET) { CIBlockPriceTools::setRatioMinPrice($arResult, false); $arResult['MIN_BASIS_PRICE'] = $arResult['MIN_PRICE']; } if (CBXFeatures::IsFeatureEnabled('CatCompleteSet') && $arResult['CATALOG_TYPE'] == CCatalogProduct::TYPE_PRODUCT) { $rsSets = CCatalogProductSet::getList(array(), array('@OWNER_ID' => $arResult['ID'], '=SET_ID' => 0, '=TYPE' => CCatalogProductSet::TYPE_GROUP), false, false, array('ID', 'OWNER_ID')); if ($arSet = $rsSets->Fetch()) { $arResult['OFFER_GROUP'] = true; } } } if (!empty($arResult['DISPLAY_PROPERTIES'])) { foreach ($arResult['DISPLAY_PROPERTIES'] as $propKey => $arDispProp) { if ('F' == $arDispProp['PROPERTY_TYPE']) { unset($arResult['DISPLAY_PROPERTIES'][$propKey]); } } } $arResult['SKU_PROPS'] = $arSKUPropList; $arResult['DEFAULT_PICTURE'] = $arEmptyPreview;
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!CModule::IncludeModule("calendar")) { return; } $adv_mode = $arCurrentValues["ADVANCED_MODE_SETTINGS"] == 'Y'; $eventListMode = $arCurrentValues["EVENT_LIST_MODE"] == 'Y'; $bSocNet = CModule::IncludeModule("socialnetwork"); if ($bSocNet) { $bSocNet = class_exists('CSocNetUserToGroup') && CBXFeatures::IsFeatureEnabled("Calendar"); } $arTypes = array(); $types = CCalendarType::GetList(); if (is_array($types)) { foreach ($types as $type) { $arTypes[$type["XML_ID"]] = "[" . $type["XML_ID"] . "] " . $type["NAME"]; } } // * * * * * * * * * * * * Groups * * * * * * * * * * * * $arComponentParameters = array(); // $arComponentParameters["GROUPS"] = array( // "BASE_SETTINGS" => array("NAME" => GetMessage("EC_GROUP_BASE_SETTINGS"), "SORT" => "100") // ); //* * * * * * * * * * * Parameters * * * * * * * * * * * $arParams = array(); $arParams["CALENDAR_TYPE"] = array("PARENT" => "BASE", "NAME" => GetMessage("EC_TYPE"), "TYPE" => "LIST", "VALUES" => $arTypes); if (CCalendar::IsIntranetEnabled()) { $arParams["ALLOW_SUPERPOSE"] = array("PARENT" => "BASE", "NAME" => GetMessage("EC_P_ALLOW_SUPERPOSE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y");
$asset->addString('<link rel="stylesheet" type="text/css" media="print" href="' . SITE_TEMPLATE_PATH . '/print.css" />', false, \Bitrix\Main\Page\AssetLocation::AFTER_CSS); $asset->addString('<link rel="alternate stylesheet" type="text/css" media="screen,projection" href="' . SITE_TEMPLATE_PATH . '/print.css" title="print" />', false, \Bitrix\Main\Page\AssetLocation::AFTER_CSS); $asset->addString('<link rel="stylesheet" type="text/css" href="' . SITE_TEMPLATE_PATH . '/colors.css"/>', false, \Bitrix\Main\Page\AssetLocation::AFTER_CSS); $asset->addJs(SITE_TEMPLATE_PATH . '/script.js'); ?> <title><?php $APPLICATION->ShowTitle(); ?> </title> </head> <body class="<?php $APPLICATION->ShowProperty("BodyClass"); ?> "> <?php if (IsModuleInstalled("im") && CBXFeatures::IsFeatureEnabled('WebMessenger')) { $APPLICATION->IncludeComponent("bitrix:im.messenger", "", array("PATH_TO_SONET_EXTMAIL" => SITE_DIR . "company/personal/mail/")); } ?> <div id="page-wrapper"> <div id="panel"><?php $APPLICATION->ShowPanel(); ?> </div> <div id="page-inner"> <div id="site-selector"> <div id="site-selector-inner"> <div id="site-selector-menus">
<?php require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/include.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/prolog.php"; IncludeModuleLangFile(__FILE__); $saleModulePermissions = $APPLICATION->GetGroupRight("sale"); if ($saleModulePermissions == "D") { $APPLICATION->AuthForm(GetMessage("BUYER_PE_ACCESS_DENIED")); } if (!CBXFeatures::IsFeatureEnabled('SaleAccounts')) { require $DOCUMENT_ROOT . "/bitrix/modules/main/include/prolog_admin_after.php"; ShowError(GetMessage("SALE_FEATURE_NOT_ALLOW")); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php"; die; } ClearVars(); $ID = IntVal($_REQUEST["id"]); $arErrors = array(); if ($arProfile = CSaleOrderUserProps::GetByID($ID)) { $USER_ID = IntVal($arProfile["USER_ID"]); $PERSON_TYPE = IntVal($arProfile["PERSON_TYPE_ID"]); $profileName = $arProfile["NAME"]; } else { $arErrors[] = GetMessage("BUYER_PE_NO_PROFILE"); } /*****************************************************************************/ /**************************** SAVE PROFILE ***********************************/ /*****************************************************************************/ if ($REQUEST_METHOD == "POST" && $saleModulePermissions >= "U" && check_bitrix_sessid() && !empty($arProfile)) { $CODE_PROFILE_NAME = trim($_REQUEST["CODE_PROFILE_NAME"]);
static function GetUserGroups($userID = 0, $bGetFolders = true) { static $oCache = null; static $CACHE_PATH = "/webdav/sonet_user_groups/"; if (!CBXFeatures::IsFeatureEnabled("Workgroups")) { return array(); } $userID = intval($userID); if (intval($userID) <= 0) { $userID = $GLOBALS['USER']->GetID(); } //$currentUserGroups = CWebDavBase::CustomDataCache($CACHE_PATH, $userID); //if (!$currentUserGroups) //{ $currentUserGroups = array(); $db_res = CSocNetUserToGroup::GetList(array("GROUP_NAME" => "ASC"), array("USER_ID" => $userID), false, false, array("GROUP_ID", "GROUP_NAME", "GROUP_ACTIVE", "GROUP_CLOSED", "ROLE")); while ($res = $db_res->GetNext()) { if ($res['GROUP_ACTIVE'] == 'Y' && $res['GROUP_CLOSED'] == 'N' && $res['ROLE'] != SONET_ROLES_BAN && $res['ROLE'] != SONET_ROLES_REQUEST) { $currentUserGroups[$res["GROUP_ID"]] = $res; } } $arGroupID = array_keys($currentUserGroups); if (is_array($arGroupID) && sizeof($arGroupID) > 0) { $arFeatures = CSocNetFeatures::IsActiveFeature(SONET_ENTITY_GROUP, $arGroupID, 'files'); foreach ($arFeatures as $groupID => $enabled) { if (!$enabled) { unset($currentUserGroups[$groupID]); } } } if ($bGetFolders) { $groupIBlock = CWebDavIblock::LibOptions('group_files', false, SITE_ID); if ($groupIBlock && isset($groupIBlock['id']) && intval($groupIBlock['id']) > 0) { $arFilter = array("IBLOCK_ID" => intval($groupIBlock['id']), "SECTION_ID" => 0, "CHECK_PERMISSIONS" => "N"); $dbSection = CIBlockSection::GetList(array(), $arFilter, false, array('ID', 'SOCNET_GROUP_ID')); while ($arGroupSection = $dbSection->Fetch()) { if (isset($currentUserGroups[$arGroupSection['SOCNET_GROUP_ID']])) { $currentUserGroups[$arGroupSection['SOCNET_GROUP_ID']]['SECTION_ID'] = $arGroupSection['ID']; } } //CWebDavBase::CustomDataCache($CACHE_PATH, $userID, $currentUserGroups, 'wd_socnet, iblock_id_'.intval($groupIBlock['id'])); // do not save to cache if LibOptions('group_files') is empty } } //} return $currentUserGroups; }
function InitUserPerms($userID, $arGroup, $bCurrentUserIsAdmin) { global $arSocNetAllowedInitiatePerms; global $arSocNetAllowedSpamPerms; $arReturn = array(); $userID = IntVal($userID); $groupID = IntVal($arGroup["ID"]); $groupOwnerID = IntVal($arGroup["OWNER_ID"]); $groupInitiatePerms = Trim($arGroup["INITIATE_PERMS"]); $groupVisible = Trim($arGroup["VISIBLE"]); $groupOpened = Trim($arGroup["OPENED"]); $groupSpamPerms = Trim($arGroup["SPAM_PERMS"]); if ($groupID <= 0 || $groupOwnerID <= 0 || !in_array($groupInitiatePerms, $arSocNetAllowedInitiatePerms)) { return false; } $arReturn["Operations"] = array(); if (!in_array($groupSpamPerms, $arSocNetAllowedSpamPerms)) { $groupSpamPerms = "K"; } // UserRole - User role in group. False if user is not group member. // UserIsMember - True in user is group member. // UserIsOwner - True if user is group owner. // UserCanInitiate - True if user can invite friends to group. // UserCanViewGroup - True if user can view group. // UserCanAutoJoinGroup - True if user can join group automatically. // UserCanModifyGroup - True if user can modify group. // UserCanModerateGroup - True if user can moderate group. if ($userID <= 0) { $arReturn["UserRole"] = false; $arReturn["UserIsMember"] = false; $arReturn["UserIsOwner"] = false; $arReturn["UserCanInitiate"] = false; $arReturn["UserCanViewGroup"] = $groupVisible == "Y"; $arReturn["UserCanAutoJoinGroup"] = false; $arReturn["UserCanModifyGroup"] = false; $arReturn["UserCanModerateGroup"] = false; $arReturn["UserCanSpamGroup"] = false; $arReturn["InitiatedByType"] = false; $arReturn["Operations"]["viewsystemevents"] = false; } else { $arReturn["UserRole"] = CSocNetUserToGroup::GetUserRole($userID, $groupID); $arReturn["UserIsMember"] = $arReturn["UserRole"] && in_array($arReturn["UserRole"], array(SONET_ROLES_OWNER, SONET_ROLES_MODERATOR, SONET_ROLES_USER)); $arReturn["InitiatedByType"] = false; if ($arReturn["UserRole"] == SONET_ROLES_REQUEST) { $dbRelation = CSocNetUserToGroup::GetList(array(), array("USER_ID" => $userID, "GROUP_ID" => $groupID), false, false, array("INITIATED_BY_TYPE")); if ($arRelation = $dbRelation->Fetch()) { $arReturn["InitiatedByType"] = $arRelation["INITIATED_BY_TYPE"]; } } $arReturn["UserIsOwner"] = $userID == $groupOwnerID; if ($bCurrentUserIsAdmin) { $arReturn["UserCanInitiate"] = true; $arReturn["UserCanViewGroup"] = true; $arReturn["UserCanAutoJoinGroup"] = true; $arReturn["UserCanModifyGroup"] = true; $arReturn["UserCanModerateGroup"] = true; $arReturn["UserCanSpamGroup"] = true; $arReturn["Operations"]["viewsystemevents"] = true; } else { if ($arReturn["UserIsMember"]) { $arReturn["UserCanInitiate"] = $groupInitiatePerms == SONET_ROLES_OWNER && $arReturn["UserIsOwner"] || $groupInitiatePerms == SONET_ROLES_MODERATOR && in_array($arReturn["UserRole"], array(SONET_ROLES_OWNER, SONET_ROLES_MODERATOR)) || $groupInitiatePerms == SONET_ROLES_USER && $arReturn["UserIsMember"]; $arReturn["UserCanViewGroup"] = true; $arReturn["UserCanAutoJoinGroup"] = false; $arReturn["UserCanModifyGroup"] = $arReturn["UserIsOwner"]; $arReturn["UserCanModerateGroup"] = in_array($arReturn["UserRole"], array(SONET_ROLES_OWNER, SONET_ROLES_MODERATOR)); $arReturn["UserCanSpamGroup"] = $groupSpamPerms == SONET_ROLES_OWNER && $arReturn["UserIsOwner"] || $groupSpamPerms == SONET_ROLES_MODERATOR && in_array($arReturn["UserRole"], array(SONET_ROLES_OWNER, SONET_ROLES_MODERATOR)) || $groupSpamPerms == SONET_ROLES_USER && $arReturn["UserIsMember"] || $groupSpamPerms == SONET_ROLES_ALL; $arReturn["Operations"]["viewsystemevents"] = true; } else { $arReturn["UserCanInitiate"] = false; $arReturn["UserCanViewGroup"] = $groupVisible == "Y"; $arReturn["UserCanAutoJoinGroup"] = $arReturn["UserCanViewGroup"] && $groupOpened == "Y"; $arReturn["UserCanModifyGroup"] = false; $arReturn["UserCanModerateGroup"] = false; $arReturn["UserCanSpamGroup"] = $groupSpamPerms == SONET_ROLES_ALL; $arReturn["Operations"]["viewsystemevents"] = false; } } } if (CModule::IncludeModule('extranet') && CExtranet::IsExtranetSite()) { $arReturn["UserCanSpamGroup"] = true; } if (!CBXFeatures::IsFeatureEnabled("WebMessenger")) { $arReturn["UserCanSpamGroup"] = false; } return $arReturn; }
public static function AgentUpdate($_IBLOCK_ID = false) { if (CBXFeatures::IsFeatureEnabled('intranet_sharepoint')) { global $DB; $arCurrentRows = array(); $IBLOCK_ID = 0; $COUNTER = 0; $q = 0; while ($arRes = CIntranetSharepointLog::Next($_IBLOCK_ID)) { if ($IBLOCK_ID > 0 && $IBLOCK_ID != $arRes['IBLOCK_ID']) { if (self::UpdateNext($arCurrentRows)) { echo 1; if (++$COUNTER > BX_INTRANET_SP_LOG_COUNT) { break; } } echo 2; $arCurrentRows = array(); } $arCurrentRows[$arRes['ID']] = $arRes; $IBLOCK_ID = $arRes['IBLOCK_ID']; } if (count($arCurrentRows) > 0 && self::UpdateNext($arCurrentRows)) { $COUNTER++; } self::Log("Update", $COUNTER); return 'CIntranetSharepoint::AgentUpdate();'; } }
/** * <p>Функция обновляет параметры товара, относящиеся к товару как к таковому.</p> * * * * * @param int $ID Код товара. * * * * @param array $arFields Ассоциативный массив, ключами которого являются названия * параметров товара, а значениями - новые значения параметров. * Допустимые ключи: <br><br> ключи, независящие от типа товаров: <ul> <li> * <b>QUANTITY</b> - количество товара на складе;</li> <li> <b>QUANTITY_RESERVED</b> - * зарезервированное количество;</li> <li> <b>QUANTITY_TRACE</b> - флаг (Y/N/D)<b>*</b> * "включить количественный учет" (до версии 12.5.0 параметр назывался * "уменьшать ли количество при заказе");</li> </ul> <br> ключи для обычных * товаров: <ul> <li> <b>CAN_BUY_ZERO</b> - флаг (Y/N/D)<b>*</b> "разрешить покупку при * отсутствии товара";</li> <li> <b>NEGATIVE_AMOUNT_TRACE</b> - флаг (Y/N/D)<b>*</b> * "разрешить отрицательное количество товара";</li> <li> <b>SUBSCRIBE</b> - флаг * (Y/N/D)<b>*</b> "разрешить подписку при отсутствии товара"; <br><br> </li> <li> * <b>PURCHASING_PRICE</b> - закупочная цена;</li> <li> <b>PURCHASING_CURRENCY</b> - валюта * закупочной цены;<br><br> </li> <li> <b>WEIGHT</b> - вес единицы товара;<br><br> </li> <li> * <b>WIDTH</b> - ширина товара (в мм);</li> <li> <b>LENGTH</b> - длина товара (в мм);</li> * <li> <b>HEIGHT</b> - высота товара (в мм);</li> <li> <b>MEASURE</b> - ID единицы * измерения;<br><br> </li> <li> <b>BARCODE_MULTI</b> - (Y/N) определяет каждый ли * экземпляр товара имеет собственный штрихкод;</li> </ul> <br> ключи для * продажи контента: <ul> <li> <b>PRICE_TYPE</b> - тип цены (S - одноразовый платеж, * R - регулярные платежи, T - пробная подписка);</li> <li> <b>RECUR_SCHEME_TYPE</b> - * тип периода подписки ("H" - час, "D" - сутки, "W" - неделя, "M" - месяц, "Q" - * квартал, "S" - полугодие, "Y" - год);</li> <li> <b>RECUR_SCHEME_LENGTH</b> - длина * периода подписки;</li> <li> <b>TRIAL_PRICE_ID</b> - код товара, для которого * данный товар является пробным;</li> <li> <b>WITHOUT_ORDER</b> - флаг "Продление * подписки без оформления заказа".</li> </ul> * * * * @return bool <p>Возвращает <i>true</i> в случае успешного обновления параметров и * <i>false</i> в противном случае.</p> * * * <h4>Example</h4> * <pre> * Обновление зарезервированного количества товара * * * Cmodule::IncludeModule('catalog'); * $PRODUCT_ID = 51; // id товара * $arFields = array('QUANTITY_RESERVED' => 11);// зарезервированное количество * CCatalogProduct::Update($PRODUCT_ID, $arFields); * </pre> * * * @static * @link http://dev.1c-bitrix.ru/api_help/catalog/classes/ccatalogproduct/ccatalogproduct__update.bc9a623b.php * @author Bitrix */ public static function Update($ID, $arFields) { global $DB; $ID = (int) $ID; if ($ID <= 0) { return false; } if (array_key_exists('ID', $arFields)) { unset($arFields["ID"]); } foreach (GetModuleEvents("catalog", "OnBeforeProductUpdate", true) as $arEvent) { if (ExecuteModuleEventEx($arEvent, array($ID, &$arFields)) === false) { return false; } } if (!CCatalogProduct::CheckFields("UPDATE", $arFields, $ID)) { return false; } $strUpdate = $DB->PrepareUpdate("b_catalog_product", $arFields); $boolSubscribe = false; if (!empty($strUpdate)) { if (isset($arFields["QUANTITY"]) && $arFields["QUANTITY"] > 0) { if (!isset($arFields["OLD_QUANTITY"])) { $strQuery = 'select ID, QUANTITY from b_catalog_product where ID = ' . $ID; $rsProducts = $DB->Query($strQuery, false, "File: " . __FILE__ . "<br>Line: " . __LINE__); if ($arProduct = $rsProducts->Fetch()) { $arFields["OLD_QUANTITY"] = doubleval($arProduct['QUANTITY']); } } if (isset($arFields["OLD_QUANTITY"])) { $boolSubscribe = $arFields["OLD_QUANTITY"] <= 0; } } $strSql = "UPDATE b_catalog_product SET " . $strUpdate . " WHERE ID = " . $ID; $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__); if (CBXFeatures::IsFeatureEnabled('CatCompleteSet') && (isset($arFields['QUANTITY']) || isset($arFields['QUANTITY_TRACE']) || isset($arFields['CAN_BUY_ZERO']) || isset($arFields['WEIGHT']))) { CCatalogProductSet::recalculateSetsByProduct($ID); } if (isset(self::$arProductCache[$ID])) { unset(self::$arProductCache[$ID]); if (defined('CATALOG_GLOBAL_VARS') && 'Y' == CATALOG_GLOBAL_VARS) { global $CATALOG_PRODUCT_CACHE; $CATALOG_PRODUCT_CACHE = self::$arProductCache; } } } foreach (GetModuleEvents("catalog", "OnProductUpdate", true) as $arEvent) { ExecuteModuleEventEx($arEvent, array($ID, $arFields)); } //call subscribe if ($boolSubscribe && CModule::IncludeModule('sale')) { CSaleBasket::ProductSubscribe($ID, "catalog"); } return true; }
function ImportPrices($XML_PRICES_PARENT, $IBLOCK_ID, $IBLOCK_LID) { $price_sort = 0; $this->next_step["XML_PRICES_PARENT"] = $XML_PRICES_PARENT; $arLang = array(); foreach ($IBLOCK_LID as $site_id) { $rsSite = CSite::GetList($by = "sort", $order = "asc", array("ID" => $site_id)); while ($site = $rsSite->Fetch()) { $arLang[$site["LANGUAGE_ID"]] = $site["LANGUAGE_ID"]; } } $arPrices = array(); $rsPrice = CCatalogGroup::GetList(); while ($arPrice = $rsPrice->Fetch()) { $arPrices[$arPrice["ID"]] = $arPrice; } if (!CBXFeatures::IsFeatureEnabled('CatMultiPrice')) { $prices_limit = 1 - count($arPrices); } else { $prices_limit = null; } $arXMLPrices = $this->_xml_file->GetAllChildrenArray($XML_PRICES_PARENT); $uniqPriceById = array(); foreach ($arXMLPrices as $arXMLPrice) { $PRICE_ID = $arXMLPrice[$this->mess["IBLOCK_XML2_ID"]]; $PRICE_NAME = $arXMLPrice[$this->mess["IBLOCK_XML2_NAME"]]; if (array_key_exists($PRICE_ID, $uniqPriceById)) { return GetMessage("IBLOCK_XML2_PRICE_DUP_ERROR"); } else { $uniqPriceById[$PRICE_ID] = true; } $found_id = 0; //Check for price by XML_ID if (isset($PRICE_ID) && $PRICE_ID != "") { foreach ($arPrices as $i => $arPrice) { if ($PRICE_ID === $arPrice["XML_ID"]) { $found_id = $arPrice["ID"]; $arPrices[$i]["found"] = true; break; } } } //When lookup by it's name if (!$found_id) { foreach ($arPrices as $arPrice) { if ($PRICE_NAME === $arPrice["NAME"] && !isset($arPrice["found"])) { $found_id = $arPrice["ID"]; break; } } } //Add new price type if (!$found_id) { $price_sort += 100; $arPrice = array("NAME" => $PRICE_NAME, "XML_ID" => $PRICE_ID, "SORT" => $price_sort, "USER_LANG" => array(), "USER_GROUP" => array(2), "USER_GROUP_BUY" => array(2)); foreach ($arLang as $lang) { $arPrice["USER_LANG"][$lang] = $arXMLPrice[$this->mess["IBLOCK_XML2_NAME"]]; } if (!isset($prices_limit) || $prices_limit > 0) { CCatalogGroup::Add($arPrice); } elseif (isset($prices_limit)) { return GetMessage("IBLOCK_XML2_PRICE_SB_ADD_ERROR"); } } elseif (strlen($arPrices[$found_id]["XML_ID"]) <= 0 && strlen($PRICE_ID) >= 0) { CCatalogGroup::Update($found_id, array("XML_ID" => $PRICE_ID)); } elseif ($arPrices[$found_id]["NAME"] !== $PRICE_NAME) { CCatalogGroup::Update($found_id, array("NAME" => $PRICE_NAME)); } if (isset($prices_limit)) { $prices_limit--; } } return true; }
$arCurrentUser = $dbRes->GetNext(); $arCurrentUser['PHOTO'] = $arCurrentUser['PERSONAL_PHOTO'] > 0 ? CIntranetUtils::InitImage($arCurrentUser['PERSONAL_PHOTO'], 32, 0, BX_RESIZE_IMAGE_EXACT) : array(); $arManagers = CTimeMan::GetUserManagers($arRes['USER_ID']); if (!is_array($arManagers) || count($arManagers) <= 0) { $arManagers = array($arRes['USER_ID']); } $user_url = COption::GetOptionString('intranet', 'path_user', '/company/personal/user/#USER_ID#/', $_REQUEST['site_id']); $dbManagers = CUser::GetList($by = 'ID', $order = 'ASC', array('ID' => implode('|', $arManagers))); $arCurrentUserManagers = array(); while ($manager = $dbManagers->Fetch()) { $manager['PHOTO'] = $manager['PERSONAL_PHOTO'] > 0 ? CIntranetUtils::InitImage($manager['PERSONAL_PHOTO'], 32, 0, BX_RESIZE_IMAGE_EXACT) : array(); $arCurrentUserManagers[] = array('ID' => $manager['ID'], 'LOGIN' => $manager['LOGIN'], 'NAME' => CUser::FormatName(CSite::GetNameFormat(false), $manager, true, false), 'URL' => str_replace(array('#ID#', '#USER_ID#'), $manager['ID'], $user_url), 'WORK_POSITION' => $manager['WORK_POSITION'], 'PHOTO' => $manager['PHOTO']['CACHE']['src']); } $arRes['DATE_START'] = MakeTimeStamp($arRes['DATE_START']) - CTimeZone::GetOffset(); $arRes['DATE_FINISH'] = MakeTimeStamp($arRes['DATE_FINISH']) - CTimeZone::GetOffset(); $arInfo = array('INFO' => $arRes, 'DATE_TEXT' => FormatDate('j F Y', $arRes['DATE_START']), 'CALENDAR_ENABLED' => CBXFeatures::IsFeatureEnabled('Calendar'), 'TASKS_ENABLED' => CBXFeatures::IsFeatureEnabled('Tasks') && IsModuleInstalled('tasks')); $cur_info = $obUser->GetCurrentInfo(); if ($cur_info['ID'] == $ID) { $arInfo['STATE'] = $obUser->State(); $arInfo['EXPIRED_DATE'] = $obUser->GetExpiredRecommendedDate(); } else { $arInfo['STATE'] = 'CLOSED'; } $res = array('FROM' => array('ID' => $arCurrentUser['ID'], 'LOGIN' => $arCurrentUser['LOGIN'], 'NAME' => CUser::FormatName(CSite::GetNameFormat(false), $arCurrentUser, true, false), 'URL' => str_replace(array('#ID#', '#USER_ID#'), $arCurrentUser['ID'], $user_url), 'WORK_POSITION' => $arCurrentUser['WORK_POSITION'], 'PHOTO' => $arCurrentUser['PHOTO']['CACHE']['src']), 'TO' => array_values($arCurrentUserManagers), 'INFO' => $arInfo, 'REPORT' => '', 'CAN_EDIT' => $bCanEdit ? 'Y' : 'N', 'REPORTS' => array()); if (count($res['TO']) <= 0) { $res['TO'] = array($res['FROM']); } $arUserIDs = array(); $dbReports = CTimeManReport::GetList(array('ID' => 'ASC'), array('ENTRY_ID' => $arInfo['INFO']['ID'])); while ($arReport = $dbReports->Fetch()) { switch ($arReport['REPORT_TYPE']) {
$arResult['OFFERS'][$keyOffer]['SKU_SORT_'.$strOneCode] = $arMatrix[$keyOffer][$strOneCode]['SORT']; $arUsedFields[$strOneCode] = true; $arSortFields['SKU_SORT_'.$strOneCode] = SORT_NUMERIC; } else { unset($arMatrix[$keyOffer][$strOneCode]); } } } $arResult['OFFERS_PROP'] = $arUsedFields; $arResult['OFFERS_PROP_CODES'] = (!empty($arUsedFields) ? base64_encode(serialize(array_keys($arUsedFields))) : ''); \Bitrix\Main\Type\Collection::sortByColumn($arResult['OFFERS'], $arSortFields); if (!empty($arIDS) && CBXFeatures::IsFeatureEnabled('CatCompleteSet')) { $rsSets = CCatalogProductSet::getList( array(), array( '@OWNER_ID' => $arIDS, '=SET_ID' => 0, '=TYPE' => CCatalogProductSet::TYPE_GROUP ), false, false, array('ID', 'OWNER_ID') ); while ($arSet = $rsSets->Fetch()) { $arOfferSet[$arSet['OWNER_ID']] = true;
<? if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); /** @var CBitrixComponent $this */ /** @var array $arParams */ /** @var array $arResult */ /** @var string $componentPath */ /** @var string $componentName */ /** @var string $componentTemplate */ /** @global CDatabase $DB */ /** @global CUser $USER */ /** @global CMain $APPLICATION */ /** @global CCacheManager $CACHE_MANAGER */ global $CACHE_MANAGER; if (!CBXFeatures::IsFeatureEnabled('CatCompleteSet')) { return; } $arParams['IBLOCK_ID'] = isset($arParams['IBLOCK_ID']) ? (int)$arParams['IBLOCK_ID'] : 0; if ($arParams['IBLOCK_ID'] <= 0) return; if (!isset($arParams["BASKET_URL"])) $arParams["BASKET_URL"] = '/personal/cart/'; if ('' == trim($arParams["BASKET_URL"])) $arParams["BASKET_URL"] = '/personal/cart/'; if(!isset($arParams["CACHE_TIME"]))
if (array_key_exists("NAME_FORMATTED", $arCreatedByTmp) && strlen($arCreatedByTmp["NAME_FORMATTED"]) > 0) { $arSubscribe["CB_ALL"]["TITLE_1"] = str_replace(array("#TITLE#"), array(array_key_exists("~NAME_FORMATTED", $arCreatedByTmp) ? $arCreatedByTmp["~NAME_FORMATTED"] : $arCreatedByTmp["NAME_FORMATTED"]), GetMessage("SUBSCRIBE_CB_ALL_1")); $arSubscribe["CB_ALL"]["TITLE_2"] = str_replace(array("#TITLE#"), array(array_key_exists("~NAME_FORMATTED", $arCreatedByTmp) ? $arCreatedByTmp["~NAME_FORMATTED"] : $arCreatedByTmp["NAME_FORMATTED"]), GetMessage("SUBSCRIBE_CB_ALL_2")); } } else { if (array_key_exists("CB_EVENT", $arSubscribe)) { unset($arSubscribe["CB_EVENT"]); } if (array_key_exists("CB_ALL", $arSubscribe)) { unset($arSubscribe["CB_ALL"]); } } $arSubscribe["SITE_ID"] = array_key_exists($entity_type, $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"]) && array_key_exists("HAS_SITE_ID", $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]) && $GLOBALS["arSocNetAllowedSubscribeEntityTypesDesc"][$entity_type]["HAS_SITE_ID"] == "Y" && strlen($site_id) > 0 ? $site_id : false; $arResult["Subscription"] = $arSubscribe; $arResult["Transport"] = array(0 => array("Key" => "N", "Value" => GetMessage("SUBSCRIBE_TRANSPORT_NONE")), 1 => array("Key" => "M", "Value" => GetMessage("SUBSCRIBE_TRANSPORT_MAIL"))); if (CBXFeatures::IsFeatureEnabled("WebMessenger")) { $arResult["Transport"][] = array("Key" => "X", "Value" => GetMessage("SUBSCRIBE_TRANSPORT_XMPP")); } } elseif ($action == "set") { $arFields = false; if (in_array($ls, array("EVENT", "ALL"))) { $arFields = array("USER_ID" => $GLOBALS["USER"]->GetID(), "ENTITY_TYPE" => $entity_type, "ENTITY_ID" => $entity_id, "ENTITY_CB" => "N"); if ($ls == "EVENT") { $arEventID = CSocNetLogTools::FindFullSetByEventID($event_id); } else { $arEventID = array("all"); } } elseif (in_array($ls, array("CB_ALL"))) { $arFields = array("USER_ID" => $GLOBALS["USER"]->GetID(), "ENTITY_TYPE" => SONET_SUBSCRIBE_ENTITY_USER, "ENTITY_ID" => $cb_id, "ENTITY_CB" => "Y"); $arEventID = array("all"); }
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!CModule::IncludeModule("sale")) { ShowError(GetMessage("SALE_MODULE_NOT_INSTALL")); return; } if (!CBXFeatures::IsFeatureEnabled('SaleCCards')) { return; } if (!$USER->IsAuthorized()) { $APPLICATION->AuthForm(GetMessage("SALE_ACCESS_DENIED")); } $ID = IntVal($arParams["ID"]); $errorMessage = ""; $bVarsFromForm = false; $arParams["PATH_TO_LIST"] = Trim($arParams["PATH_TO_LIST"]); if (strlen($arParams["PATH_TO_LIST"]) <= 0) { $arParams["PATH_TO_LIST"] = htmlspecialcharsbx($APPLICATION->GetCurPage()); } $arParams["SET_TITLE"] = $arParams["SET_TITLE"] == "N" ? "N" : "Y"; if ($arParams["SET_TITLE"] == 'Y') { if ($ID > 0) { $APPLICATION->SetTitle(str_replace("#ID#", $ID, GetMessage("STPC_TITLE_UPDATE"))); } else { $APPLICATION->SetTitle(GetMessage("STPC_TITLE_ADD")); } } if (strlen($_POST["reset"]) > 0) {
############################################## # Bitrix: SiteManager # # Copyright (c) 2004 Bitrix # # http://www.bitrix.ru # # mailto:admin@bitrix.ru # ############################################## */ define("STOP_STATISTICS", true); require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php"; $saleModulePermissions = $APPLICATION->GetGroupRight("sale"); if ($saleModulePermissions == "D") { $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED")); } require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/img.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/include.php"; if (!CBXFeatures::IsFeatureEnabled('SaleReports')) { require $DOCUMENT_ROOT . "/bitrix/modules/main/include/prolog_admin_after.php"; ShowError(GetMessage("SALE_FEATURE_NOT_ALLOW")); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php"; die; } IncludeModuleLangFile(__FILE__); $width = intval($_GET["width"]); $max_width = COption::GetOptionInt("sale", "GRAPH_WEIGHT", 600); if ($width <= 0 || $width > $max_width) { $width = $max_width; } $height = intval($_GET["height"]); $max_height = COption::GetOptionInt("sale", "GRAPH_HEIGHT", 600); if ($height <= 0 || $height > $max_height) { $height = $max_height;
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } if (!CBXFeatures::IsFeatureEnabled('SaleAffiliate')) { return; } $arParams["REGISTER_PAGE"] = trim($arParams["REGISTER_PAGE"]); if (strlen($arParams["REGISTER_PAGE"]) <= 0) { $arParams["REGISTER_PAGE"] = "register.php"; } if (strlen($arParams["SET_TITLE"]) <= 0) { $arParams["SET_TITLE"] = "Y"; } if (CModule::IncludeModule("sale")) { if ($arParams["SET_TITLE"] == "Y") { $APPLICATION->SetTitle(GetMessage("SPCAS1_PROG_REPORT")); } if ($GLOBALS["USER"]->IsAuthorized()) { $dbAffiliate = CSaleAffiliate::GetList(array("TRANSACT_DATE" => "ASC"), array("USER_ID" => IntVal($GLOBALS["USER"]->GetID()), "SITE_ID" => SITE_ID), false, false, array("ID", "PLAN_ID", "ACTIVE", "PAID_SUM", "APPROVED_SUM", "PENDING_SUM", "LAST_CALCULATE")); if ($arAffiliate = $dbAffiliate->Fetch()) { $arResult = array(); if ($arAffiliate["ACTIVE"] == "Y") { $arResult["FIELDS"] = $arAffiliate; if (strlen($_REQUEST["del_filter"]) > 0) { DelFilter(array("filter_date_from", "filter_date_to")); } else { InitFilter(array("filter_date_from", "filter_date_to")); } $filter_date_from = $_REQUEST["filter_date_from"];
<input type="hidden" name="IS_CATALOG" id="IS_CATALOG_N" value="N"> <input type="checkbox" name="IS_CATALOG" id="IS_CATALOG_Y" value="Y"<?php if ('Y' == $str_IS_CATALOG) { echo " checked"; } if ('O' == $str_CATALOG_TYPE) { echo ' disabled="disabled"'; } ?> onclick="ib_checkFldActivity(0,'<?php echo $str_IS_CATALOG; ?> ');"> </td> </tr><?php if (CBXFeatures::IsFeatureEnabled('SaleRecurring')) { ?> <tr> <td width="40%"><label for="IS_CONTENT_Y"><?php echo GetMessage("IB_E_IS_CONTENT"); ?> </label></td> <td width="60%"> <input type="hidden" id="IS_CONTENT_N" name="SUBSCRIPTION" value="N"> <input type="checkbox" id="IS_CONTENT_Y" name="SUBSCRIPTION" value="Y"<?php if ('Y' == $str_SUBSCRIPTION) { echo " checked"; } ?> onclick="ib_checkFldActivity(1,'<?php echo $str_IS_CATALOG;