static function getRightsLinks($arPage) { global $arParams, $APPLICATION; if (!is_array($arPage)) { $arPage = array($arPage); } $arLinks = array(); $arParams['ELEMENT_NAME'] = htmlspecialcharsback($arParams['ELEMENT_NAME']); $arParams['ELEMENT_NAME'] = urlencode($arParams['ELEMENT_NAME']); if (in_array('categories', $arPage)) { return array(); } if (in_array('article', $arPage) && !in_array('add', $arPage)) { $arLinks['article'] = array('NAME' => GetMessage('PAGE_ARTICLE'), 'TITLE' => GetMessage('PAGE_ARTICLE_TITLE'), 'CURRENT' => in_array('article', $arPage), 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_POST'], array('wiki_name' => $arParams['ELEMENT_NAME'], 'group_id' => CWikiSocnet::$iSocNetId)), 'ID' => 'article', 'TYPE' => 'page', 'IS_RED' => in_array('add', $arPage) ? 'Y' : 'N'); } if (self::IsWriteable() && ((!in_array('history', $arPage) || in_array('history_diff', $arPage)) && (!in_array('add', $arPage) && !in_array('edit', $arPage) && !in_array('delete', $arPage) && !in_array('rename', $arPage)))) { if (IsModuleInstalled('bizproc')) { $arLinks['history'] = array('NAME' => GetMessage('PAGE_HISTORY'), 'TITLE' => GetMessage('PAGE_HISTORY_TITLE'), 'CURRENT' => in_array('history', $arPage), 'LINK' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_HISTORY'], array('wiki_name' => $arParams['ELEMENT_NAME'], 'group_id' => CWikiSocnet::$iSocNetId)), $arParams['IN_COMPLEX'] == 'Y' && $arParams['SEF_MODE'] == 'N' ? array($arParams['OPER_VAR'] => 'history') : array()), 'ID' => 'history', 'TYPE' => 'page', 'IS_RED' => 'N'); } } if ($arParams['USE_REVIEW'] == 'Y') { $arLinks['discussion'] = array('NAME' => GetMessage('PAGE_DISCUSSION'), 'TITLE' => GetMessage('PAGE_DISCUSSION_TITLE'), 'CURRENT' => in_array('discussion', $arPage), 'LINK' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_DISCUSSION'], array('wiki_name' => $arParams['ELEMENT_NAME'], 'group_id' => CWikiSocnet::$iSocNetId)), $arParams['IN_COMPLEX'] == 'Y' && $arParams['SEF_MODE'] == 'N' ? array($arParams['OPER_VAR'] => 'discussion') : array()), 'ID' => 'discussion', 'TYPE' => 'page', 'IS_RED' => 'N'); } if (self::IsWriteable() && (!in_array('history', $arPage) && !in_array('history_diff', $arPage))) { $arLinks['add'] = array('NAME' => GetMessage('PAGE_ADD'), 'TITLE' => GetMessage('PAGE_ADD_TITLE'), 'CURRENT' => in_array('add', $arPage), 'LINK' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_POST_EDIT'], array('wiki_name' => GetMessage('WIKI_NEW_PAGE_TITLE'), 'group_id' => CWikiSocnet::$iSocNetId)), array($arParams['OPER_VAR'] => 'add')), 'ID' => 'add', 'TYPE' => 'edit', 'IS_RED' => in_array('add', $arPage) ? 'Y' : 'N'); if (!in_array('add', $arPage)) { $arLinks['edit'] = array('NAME' => GetMessage('PAGE_EDIT'), 'TITLE' => GetMessage('PAGE_EDIT_TITLE'), 'CURRENT' => in_array('edit', $arPage), 'LINK' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_POST_EDIT'], array('wiki_name' => $arParams['ELEMENT_NAME'], 'group_id' => CWikiSocnet::$iSocNetId)), $arParams['IN_COMPLEX'] == 'Y' && $arParams['SEF_MODE'] == 'N' ? array($arParams['OPER_VAR'] => 'edit') : array()), 'ID' => 'edit', 'TYPE' => 'edit', 'IS_RED' => in_array('add', $arPage) ? 'Y' : 'N'); $url = $APPLICATION->GetPopupLink(array('URL' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_POST_EDIT'], array('wiki_name' => urlencode($arParams['ELEMENT_NAME']), 'group_id' => CWikiSocnet::$iSocNetId)), array($arParams['OPER_VAR'] => 'rename')), 'PARAMS' => array('width' => 400, 'height' => 150, 'resizable' => false))); $arLinks['rename'] = array('NAME' => GetMessage('WIKI_PAGE_RENAME'), 'TITLE' => GetMessage('WIKI_PAGE_RENAME_TITLE'), 'CURRENT' => in_array('rename', $arPage), 'LINK' => 'javascript:' . $url, 'ID' => 'rename', 'TYPE' => 'page'); if (self::IsDeleteable()) { $url = $APPLICATION->GetPopupLink(array('URL' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_POST_EDIT'], array('wiki_name' => $arParams['ELEMENT_ID'], 'group_id' => CWikiSocnet::$iSocNetId)), array($arParams['OPER_VAR'] => 'delete')), 'PARAMS' => array('width' => 400, 'height' => 150, 'resizable' => false))); $arLinks['delete'] = array('NAME' => GetMessage('PAGE_DELETE'), 'TITLE' => GetMessage('PAGE_DELETE_TITLE'), 'CURRENT' => in_array('delete', $arPage), 'LINK' => 'javascript:' . $url, 'ID' => 'delete', 'TYPE' => 'edit', 'IS_RED' => 'N'); } } /** $arLinks['access'] = array( 'NAME' => GetMessage('PAGE_ACCESS'), 'TITLE' => GetMessage('PAGE_ACCESS_TITLE'), 'CURRENT' => in_array('access', $arPage), 'LINK' => CHTTP::urlAddParams( CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_POST_EDIT'], array( 'wiki_name' => $arParams['ELEMENT_NAME'], 'group_id' => CWikiSocnet::$iSocNetId ) ), array($arParams['OPER_VAR'] => 'access') ), 'ID' => 'access', 'TYPE' => 'edit', 'IS_RED' => 'N' ); **/ } return $arLinks; }
/** * Returns URL to backup webservice * * @param array[string]string $arParams * @return string * */ protected function getActionURL($arParams = array()) { $arParams["license"] = md5(LICENSE_KEY); $arParams["lang"] = LANGUAGE_ID; foreach ($this->addParams as $key => $value) { $arParams[$key] = $value; } $url = COption::GetOptionString("bitrixcloud", "backup_policy_url"); $url = CHTTP::urlAddParams($url, $arParams, array("encode" => true)) . $this->addStr; return $url; }
/** * Returns URL to backup webservice * * @param array[string]string $arParams * @return string * */ protected function getActionURL($arParams = array()) { $arParams["license"] = md5(LICENSE_KEY); $arParams["spd"] = $this->spd; $arParams["lang"] = LANGUAGE_ID; $arParams["file_name"] = $this->file_name; $arParams["check_word"] = $this->check_word; $url = COption::GetOptionString("bitrixcloud", "backup_policy_url"); $url = CHTTP::urlAddParams($url, $arParams, array("encode" => true)); return $url; }
/** * Returns URL to backup webservice * * @param array[string]string $arParams * @return string * */ protected function getActionURL($arParams = array()) { $arParams["license"] = md5(LICENSE_KEY); $arParams["spd"] = CUpdateClient::getSpd(); foreach ($this->addParams as $key => $value) { $arParams[$key] = $value; } $url = COption::GetOptionString("bitrixcloud", "monitoring_policy_url"); $url = CHTTP::urlAddParams($url, $arParams, array("encode" => true)) . $this->addStr; return $url; }
/** * Returns URL to update policy * * @param array[string]string $arParams * @return string * */ protected function getActionURL($arParams = array()) { $arErrors = array(); $domainTmp = CBXPunycode::ToASCII($this->domain, $arErrors); if (strlen($domainTmp) > 0) { $domain = $domainTmp; } else { $domain = $this->domain; } $arParams["license"] = md5(LICENSE_KEY); $arParams["domain"] = $domain; $url = COption::GetOptionString("bitrixcloud", "cdn_policy_url"); $url = CHTTP::urlAddParams($url, $arParams, array("encode" => true)); return $url; }
function hrefHtml() { $result = ''; $params = array(); $key = ''; $argNum = func_num_args(); for ($i = 0; $i < $argNum; $i++) { if ($i == 0) { $result = func_get_arg($i); } elseif ($i % 2) { $key = func_get_arg($i); } else { $params[$key] = func_get_arg($i); } } $result = CHTTP::urlAddParams($result, $params, array("encode" => true)); return htmlspecialcharsbx($result); }
foreach ($arItem["VALUES"] as $key => $ar) { $arInputNames[$ar["CONTROL_NAME"]] = true; } } $arInputNames["set_filter"] = true; $arInputNames["del_filter"] = true; $arSkip = array("AUTH_FORM" => true, "TYPE" => true, "USER_LOGIN" => true, "USER_CHECKWORD" => true, "USER_PASSWORD" => true, "USER_CONFIRM_PASSWORD" => true, "USER_EMAIL" => true, "captcha_word" => true, "captcha_sid" => true, "login" => true, "Login" => true, "backurl" => true, "ajax" => true, "mode" => true, "bxajaxid" => true, "AJAX_CALL" => true); $arResult["FORM_ACTION"] = $clearURL; $arResult["HIDDEN"] = array(); foreach (array_merge($_GET, $_POST) as $key => $value) { if (!isset($arInputNames[$key]) && !isset($arSkip[$key]) && !is_array($value)) { $arResult["HIDDEN"][] = array("CONTROL_ID" => htmlspecialcharsbx($key), "CONTROL_NAME" => htmlspecialcharsbx($key), "HTML_VALUE" => htmlspecialcharsbx($value)); } } if ($arParams["XML_EXPORT"] === "Y" && $arResult["SECTION"] && $arResult["SECTION"]["RIGHT_MARGIN"] - $arResult["SECTION"]["LEFT_MARGIN"] === 1) { $exportUrl = CHTTP::urlAddParams($clearURL, array("mode" => "xml")); $APPLICATION->AddHeadString('<meta property="ya:interaction" content="XML_FORM" />'); $APPLICATION->AddHeadString('<meta property="ya:interaction:url" content="' . CHTTP::urn2uri($exportUrl) . '" />'); } if ($arParams["XML_EXPORT"] === "Y" && $_REQUEST["mode"] === "xml") { $this->setFrameMode(false); ob_start(); $this->IncludeComponentTemplate("xml"); $xml = ob_get_contents(); $APPLICATION->RestartBuffer(); while (ob_end_clean()) { } header("Content-Type: text/xml; charset=utf-8"); echo $APPLICATION->convertCharset($xml, LANG_CHARSET, "utf-8"); require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_after.php"; die;
?> "> <?php $tabControl->End(); ?> </div> <?php echo BeginNote(); ?> <?php echo Loc::getMessage('SALE_SLI_HEAVY_DUTY_NOTICE'); ?> <br /><br /> <?php echo Loc::getMessage('SALE_SLI_HEAVY_DUTY_HOST_NOTICE'); ?> <?php echo EndNote(); ?> <script> BX.locationImport = new BX.Sale.component.location.import(<?php echo CUtil::PhpToJSObject(array('url' => CHTTP::urlAddParams($arResult['URLS']['IMPORT_AJAX'], array('lang' => LANGUAGE_ID)), 'pageUrl' => $arResult['URLS']['IMPORT'], 'scope' => 'location-import', 'ajaxFlag' => 'AJAX_CALL', 'importId' => rand(99, 999), 'firstImport' => !!$arResult['FIRST_IMPORT'], 'statistics' => array('TOTAL' => array('CNT' => isset($arResult['STATISTICS']['TOTAL']) ? intval($arResult['STATISTICS']['TOTAL']['CNT']) : 0)), 'messages' => array('start' => Loc::getMessage('SALE_SLI_START'), 'stop' => Loc::getMessage('SALE_SLI_STOP'), 'stopping' => Loc::getMessage('SALE_SLI_STOPPING'), 'selectItems' => Loc::getMessage('SALE_SLI_CHECK_ITEMS_AND_PROCEED', array('#START#' => Loc::getMessage('SALE_SLI_START'))), 'uploadFile' => Loc::getMessage('SALE_SLI_UPLOAD_FILE_AND_PROCEED', array('#START#' => Loc::getMessage('SALE_SLI_START'))), 'error_occured' => Loc::getMessage('SALE_SLI_ERROR'), 'confirm_delete' => Loc::getMessage('SALE_SLI_DELETE_ALL_CONFIRM'), 'confirm_delete_relic' => Loc::getMessage('SALE_SLI_DELETE_ALL_CONFIRM_RELIC'), 'stage_DOWNLOAD_FILES' => Loc::getMessage('SALE_SLI_STAGE_DOWNLOAD_FILES'), 'stage_REBALANCE_WALK_TREE' => Loc::getMessage('SALE_SLI_STAGE_REBALANCE'), 'stage_REBALANCE_CLEANUP_TEMP_TABLE' => Loc::getMessage('SALE_SLI_STAGE_CLEANUP_TEMP_TABLE'), 'stage_RESTORE_INDEXES' => Loc::getMessage('SALE_SLI_STAGE_RESTORE_INDEXES'), 'stage_DELETE_ALL' => Loc::getMessage('SALE_SLI_STAGE_DELETE_ALL'), 'stage_PROCESS_FILES' => Loc::getMessage('SALE_SLI_STAGE_PROCESS_FILES'), 'stage_INTEGRITY_PRESERVE' => Loc::getMessage('SALE_SLI_STAGE_INTEGRITY_PRESERVE'), 'stage_COMPLETE' => Loc::getMessage('SALE_SLI_STAGE_COMPLETE'), 'stage_INTERRUPTED' => Loc::getMessage('SALE_SLI_STAGE_INTERRUPTED'), 'stage_INTERRUPTING' => Loc::getMessage('SALE_SLI_STAGE_INTERRUPTING'), 'stage_COMPLETE_REMOVE_ALL' => Loc::getMessage('SALE_SLI_COMPLETE_REMOVE_ALL'), 'stage_DROP_INDEXES' => Loc::getMessage('SALE_SLI_DROP_INDEXES'))), false, false, true); ?> ); </script> <?php }
$arResult["ELEMENTS"][$intKey] = $arItem["ID"]; $arElementLink[$arItem['ID']] =& $arResult["ITEMS"][$intKey]; $intKey++; } $arResult['MODULES'] = $arResultModules; $navComponentParameters = array(); if ($arParams["PAGER_BASE_LINK_ENABLE"] === "Y") { $pagerBaseLink = trim($arParams["PAGER_BASE_LINK"]); if ($pagerBaseLink === "") { $pagerBaseLink = $arResult["SECTION_PAGE_URL"]; } if ($pagerParameters && isset($pagerParameters["BASE_LINK"])) { $pagerBaseLink = $pagerParameters["BASE_LINK"]; unset($pagerParameters["BASE_LINK"]); } $navComponentParameters["BASE_LINK"] = CHTTP::urlAddParams($pagerBaseLink, $pagerParameters, array("encode" => true)); } $arResult["NAV_STRING"] = $rsElements->GetPageNavStringEx($navComponentObject, $arParams["PAGER_TITLE"], $arParams["PAGER_TEMPLATE"], $arParams["PAGER_SHOW_ALWAYS"], $this, $navComponentParameters); $arResult["NAV_CACHED_DATA"] = null; $arResult["NAV_RESULT"] = $rsElements; if (isset($arItem)) { unset($arItem); } if (!empty($arResult["ELEMENTS"]) && ($bGetProperties || $bCatalog && $boolNeedCatalogCache)) { $arPropFilter = array('ID' => $arResult["ELEMENTS"], 'IBLOCK_ID' => $arParams['IBLOCK_ID']); CIBlockElement::GetPropertyValuesArray($arElementLink, $arParams["IBLOCK_ID"], $arPropFilter); foreach ($arResult["ITEMS"] as &$arItem) { if ($bCatalog && $boolNeedCatalogCache) { CCatalogDiscount::SetProductPropertiesCache($arItem['ID'], $arItem["PROPERTIES"]); } if ($bGetProperties) {
foreach ($arFmList as $elementId => $arFM) { foreach ($arFM as $complexId => $arComplexName) { $arResult['CONTACT'][$elementId][$complexId] = implode(', ', $arComplexName); } } // checkig access for operation $arContactAttr = CCrmPerms::GetEntityAttr('CONTACT', $arResult['CONTACT_ID']); foreach ($arResult['CONTACT_ID'] as $iContactId) { $arResult['CONTACT'][$iContactId]['EDIT'] = $CCrmPerms->CheckEnityAccess('CONTACT', 'WRITE', $arContactAttr[$iContactId]); $arResult['CONTACT'][$iContactId]['DELETE'] = $CCrmPerms->CheckEnityAccess('CONTACT', 'DELETE', $arContactAttr[$iContactId]); $arResult['CONTACT'][$iContactId]['BIZPROC_LIST'] = array(); foreach ($arBPData as $arBP) { if (!CBPDocument::CanUserOperateDocument(CBPCanUserOperateOperation::StartWorkflow, $userID, array('crm', 'CCrmDocumentContact', 'CONTACT_' . $arResult['CONTACT'][$iContactId]['ID']), array('UserGroups' => $CCrmBizProc->arCurrentUserGroups, 'DocumentStates' => $arDocumentStates, 'WorkflowTemplateId' => $arBP['ID'], 'CreatedBy' => $arResult['CONTACT'][$iContactId]['ASSIGNED_BY'], 'UserIsAdmin' => $isAdmin, 'CRMEntityAttr' => $arContactAttr[$iContactId]))) { continue; } $arBP['PATH_TO_BIZPROC_START'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_CONTACT_SHOW'], array('contact_id' => $arResult['CONTACT'][$iContactId]['ID'])), array('workflow_template_id' => $arBP['ID'], 'bizproc_start' => 1, 'sessid' => $arResult['SESSION_ID'], 'CRM_CONTACT_SHOW_V12_active_tab' => 'tab_bizproc', 'back_url' => $arParams['PATH_TO_CONTACT_LIST'])); $arResult['CONTACT'][$iContactId]['BIZPROC_LIST'][] = $arBP; } } } if (!$isInExportMode) { $arResult['NEED_FOR_REBUILD_DUP_INDEX'] = false; $arResult['NEED_FOR_REBUILD_CONTACT_ATTRS'] = false; if (!$bInternal && CCrmPerms::IsAdmin()) { if (COption::GetOptionString('crm', '~CRM_REBUILD_CONTACT_DUP_INDEX', 'N') === 'Y') { $arResult['NEED_FOR_REBUILD_DUP_INDEX'] = true; } if (COption::GetOptionString('crm', '~CRM_REBUILD_CONTACT_ATTR', 'N') === 'Y') { $arResult['PATH_TO_PRM_LIST'] = CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_perm_list')); $arResult['NEED_FOR_REBUILD_CONTACT_ATTRS'] = true; }
", className : (window.bRefreshed !== undefined && window.bRefreshed ? "lenta-sort-item lenta-sort-item-selected" : "lenta-sort-item<?php echo !$arResult["PresetFilterActive"] ? " lenta-sort-item-selected" : ""; ?> "), href : "<?php echo CUtil::JSEscape($GLOBALS["APPLICATION"]->GetCurPageParam("preset_filter_id=clearall", array_merge($arResult["PageParamsToClear"], array("preset_filter_id")))); ?> " }, <?php $buttonName = false; if (is_array($arResult["PresetFilters"])) { foreach ($arResult["PresetFilters"] as $preset_filter_id => $arPresetFilter) { $href = $actionUrl !== "" ? $actionUrl : $GLOBALS["APPLICATION"]->GetCurPage(); $href = CHTTP::urlAddParams(CHTTP::urlDeleteParams($href, array_merge($arResult["PageParamsToClear"], array("preset_filter_id"))), array("preset_filter_id" => $preset_filter_id)); if ($arResult["PresetFilterActive"] == $preset_filter_id) { $buttonName = $arPresetFilter["NAME"]; } ?> { text : "<?php echo $arPresetFilter["NAME"]; ?> ", className : (window.bRefreshed !== undefined && window.bRefreshed ? "lenta-sort-item" : "lenta-sort-item<?php echo $arResult["PresetFilterActive"] == $preset_filter_id ? " lenta-sort-item-selected" : ""; ?> "), href : "<?php echo CUtil::JSEscape($href);
$entityTypeName = isset($params['ENTITY_TYPE_NAME']) ? strtoupper($params['ENTITY_TYPE_NAME']) : ''; if ($entityTypeName === '') { die; } $entityTypeID = CCrmOwnerType::ResolveID($entityTypeName); if ($entityTypeID === CCrmOwnerType::Undefined) { die; } $entityID = isset($params['ENTITY_ID']) ? $params['ENTITY_ID'] : 0; if ($entityID <= 0) { die; } $userPermissions = CCrmPerms::GetCurrentUserPermissions(); if (!CCrmAuthorizationHelper::CheckReadPermission($entityTypeName, $entityID, $userPermissions)) { die; } $formID = isset($params['FORM_ID']) ? $params['FORM_ID'] : ''; $pathToUserProfile = isset($params['PATH_TO_USER_PROFILE']) ? $params['PATH_TO_USER_PROFILE'] : ''; $postFormUri = isset($params['POST_FORM_URI']) ? $params['POST_FORM_URI'] : ''; if ($postFormUri !== '') { $tabKey = $formID !== '' ? "{$formID}_active_tab" : 'active_tab'; $tabID = isset($params['TAB_ID']) ? $params['TAB_ID'] : ''; $postFormUri = CHTTP::urlAddParams($postFormUri, array($tabKey => $tabID)); } $actionUri = isset($params['ACTION_URI']) ? $params['ACTION_URI'] : ''; global $APPLICATION; Header('Content-Type: text/html; charset=' . LANG_CHARSET); $APPLICATION->ShowAjaxHead(); $APPLICATION->IncludeComponent('bitrix:crm.entity.livefeed', '', array('DATE_TIME_FORMAT' => LANGUAGE_ID == 'en' ? "j F Y g:i a" : (LANGUAGE_ID == 'de' ? "j. F Y, G:i" : "j F Y G:i"), 'CAN_EDIT' => CCrmAuthorizationHelper::CheckUpdatePermission($entityTypeName, $entityID, $userPermissions), 'ENTITY_TYPE_ID' => $entityTypeID, 'ENTITY_ID' => $entityID, 'POST_FORM_URI' => $postFormUri, 'ACTION_URI' => $actionUri, 'FORM_ID' => $formID, 'PATH_TO_USER_PROFILE' => $pathToUserProfile), null, array('HIDE_ICONS' => 'Y')); require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/epilog_after.php'; die;
if ($arParams['TYPE'] == 'edit' && $bRead && !empty($arParams['ELEMENT_ID'])) { $arResult['BUTTONS'][] = array('TEXT' => GetMessage('INVOICE_SHOW'), 'TITLE' => GetMessage('INVOICE_SHOW_TITLE'), 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_SHOW'], array('invoice_id' => $arParams['ELEMENT_ID'])), 'ICON' => 'btn-view'); } if (($arParams['TYPE'] == 'edit' || $arParams['TYPE'] == 'show') && $bAdd && !empty($arParams['ELEMENT_ID']) && !isset($_REQUEST['copy'])) { $arResult['BUTTONS'][] = array('TEXT' => GetMessage('INVOICE_COPY'), 'TITLE' => GetMessage('INVOICE_COPY_TITLE'), 'LINK' => CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_EDIT'], array('invoice_id' => $arParams['ELEMENT_ID'])), array('copy' => 1)), 'ICON' => 'btn-copy'); } $qty = count($arResult['BUTTONS']); if (!empty($arResult['BUTTONS']) && $arParams['TYPE'] == 'edit' && empty($arParams['ELEMENT_ID'])) { $arResult['BUTTONS'][] = array('SEPARATOR' => true); } elseif ($arParams['TYPE'] == 'show' && $qty > 1) { $arResult['BUTTONS'][] = array('NEWBAR' => true); } elseif ($qty >= 3) { $arResult['BUTTONS'][] = array('NEWBAR' => true); } if (($arParams['TYPE'] == 'edit' || $arParams['TYPE'] == 'show') && $bDelete && !empty($arParams['ELEMENT_ID'])) { $arResult['BUTTONS'][] = array('TEXT' => GetMessage('INVOICE_DELETE'), 'TITLE' => GetMessage('INVOICE_DELETE_TITLE'), 'LINK' => "javascript:invoice_delete('" . GetMessage('INVOICE_DELETE_DLG_TITLE') . "', '" . GetMessage('INVOICE_DELETE_DLG_MESSAGE') . "', '" . GetMessage('INVOICE_DELETE_DLG_BTNTITLE') . "', '" . CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_EDIT'], array('invoice_id' => $arParams['ELEMENT_ID'])), array('delete' => '', 'sessid' => bitrix_sessid())) . "')", 'ICON' => 'btn-delete'); } // if ($bAdd) // { // $arResult['BUTTONS'][] = array( // 'TEXT' => GetMessage('INVOICE_ADD'), // 'TITLE' => GetMessage('INVOICE_ADD_TITLE'), // 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_EDIT'], // array( // 'invoice_id' => 0 // ) // ), // 'ICON' => 'btn-new' // ); // } $this->IncludeComponentTemplate();
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } $dir = trim(preg_replace("'[\\\\/]+'", "/", dirname(__FILE__) . "/")); __IncludeLang($dir . "lang/" . LANGUAGE_ID . "/bizproc_workflow_admin.php"); $APPLICATION->IncludeComponent("bitrix:lists.element.navchain", ".default", array("IBLOCK_TYPE_ID" => $arParams["IBLOCK_TYPE_ID"], "IBLOCK_ID" => $arResult["VARIABLES"]["list_id"], "LISTS_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["lists"], "LIST_URL" => $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["list"], "ADD_NAVCHAIN_SECTIONS" => "N", "ADD_NAVCHAIN_ELEMENT" => "N", "CACHE_TYPE" => $arParams["CACHE_TYPE"], "CACHE_TIME" => $arParams["CACHE_TIME"]), $component, array("HIDE_ICONS" => "Y")); $APPLICATION->IncludeComponent("bitrix:main.interface.toolbar", "", array("BUTTONS" => array(array("TEXT" => GetMessage("CT_BL_STATE_BIZPROC"), "TITLE" => GetMessage("CT_BL_STATE_BIZPROC_TITLE"), "LINK" => CHTTP::urlAddParams(str_replace(array("#list_id#", "#ID#"), array($arResult["VARIABLES"]["list_id"], 0), $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["bizproc_workflow_edit"]), array("init" => "statemachine")), "ICON" => "btn-new"), array("TEXT" => GetMessage("CT_BL_SEQ_BIZPROC"), "TITLE" => GetMessage("CT_BL_SEQ_BIZPROC_TITLE"), "LINK" => str_replace(array("#list_id#", "#ID#"), array($arResult["VARIABLES"]["list_id"], 0), $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["bizproc_workflow_edit"]), "ICON" => "btn-new"))), $component, array("HIDE_ICONS" => "Y")); $APPLICATION->IncludeComponent("bitrix:bizproc.workflow.list", ".default", array("MODULE_ID" => "iblock", "ENTITY" => "CIBlockDocument", "DOCUMENT_ID" => "iblock_" . $arResult["VARIABLES"]["list_id"], "EDIT_URL" => str_replace(array("#list_id#"), array($arResult["VARIABLES"]["list_id"]), $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["bizproc_workflow_edit"]), "SET_TITLE" => "Y", "EDIT_VARS_URL" => str_replace(array("#list_id#"), array($arResult["VARIABLES"]["list_id"]), $arResult["FOLDER"] . $arResult["URL_TEMPLATES"]["bizproc_workflow_vars"]), "TARGET_MODULE_ID" => "lists"), $component, array("HIDE_ICONS" => "Y"));
} $arDocumentStates = null; CBPDocument::AddDocumentToHistory(BizProcDocument::getDocumentComplexId($arParams["IBLOCK_TYPE_ID"], $arResult["ELEMENT_ID"]), $arElement["NAME"], $GLOBALS["USER"]->GetID()); } } if (!$strError) { //Successfull update //And go to proper page if (isset($_POST["save"])) { LocalRedirect($arResult["~LIST_SECTION_URL"]); } elseif ($lists_perm < CListPermissions::CAN_READ && !CIBlockElementRights::UserHasRightTo($arResult["IBLOCK_ID"], $arResult["ELEMENT_ID"], "element_read")) { LocalRedirect($arResult["~LIST_SECTION_URL"]); } else { $url = CHTTP::urlAddParams(str_replace(array("#list_id#", "#section_id#", "#element_id#", "#group_id#"), array($arResult["IBLOCK_ID"], intval($_POST["IBLOCK_SECTION_ID"]), $arResult["ELEMENT_ID"], $arParams["SOCNET_GROUP_ID"]), $arParams["~LIST_ELEMENT_URL"]), array($tab_name => $_POST[$tab_name]), array("skip_empty" => true, "encode" => true)); if (isset($_GET["list_section_id"]) && strlen($_GET["list_section_id"]) == 0) { $url = CHTTP::urlAddParams($url, array("list_section_id" => "")); } LocalRedirect($url); } } else { ShowError($strError); $bVarsFromForm = true; } } else { //Go to list section page LocalRedirect($arResult["~LIST_SECTION_URL"]); } } $arResult["ELEMENT_URL"] = str_replace(array("#list_id#", "#section_id#", "#element_id#", "#group_id#"), array($arResult["IBLOCK_ID"], intval($arParams["~SECTION_ID"]), $arResult["ELEMENT_ID"], $arParams["SOCNET_GROUP_ID"]), $arParams["LIST_ELEMENT_URL"]); $data = array(); if ($bVarsFromForm) {
$aActions[] = array("TEXT" => GetMessage("CC_BLL_ELEMENT_ACTION_MENU_RUNNING_BP"), "MENU" => $listProcesses); } } } if (!$arResult["IS_SOCNET_GROUP_CLOSED"] && ($lists_perm >= CListPermissions::CAN_WRITE || CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $data["~ID"], "element_delete"))) { $aActions[] = array("SEPARATOR" => true); $aActions[] = array("ICONCLASS" => "delete", "TEXT" => GetMessage("CC_BLL_ELEMENT_ACTION_MENU_DELETE"), "ONCLICK" => "bxGrid_" . $arResult["GRID_ID"] . ".DeleteItem('" . $data["ID"] . "', '" . GetMessage("CC_BLL_ELEMENT_ACTION_MENU_DELETE_CONF") . "')"); $arResult["ELEMENTS_CAN_DELETE"][] = $data["ID"]; } $arResult["ELEMENTS_ROWS"][] = array("id" => $data["ID"], "data" => $data, "actions" => $aActions, "columns" => $aCols); } if (!$arResult["CAN_READ"] && $check) { $arResult["CAN_READ"] = true; } $rsElements->bShowAll = false; $arResult["NAV_OBJECT"] = $rsElements; $arResult["SORT"] = $grid_sort["sort"]; $arResult["LIST_NEW_ELEMENT_URL"] = str_replace(array("#list_id#", "#section_id#", "#element_id#", "#group_id#"), array($arIBlock["ID"], intval($arResult["SECTION_ID"]), 0, $arParams["SOCNET_GROUP_ID"]), $arParams["LIST_ELEMENT_URL"]); if ($arResult["ANY_SECTION"]) { $arResult["LIST_NEW_ELEMENT_URL"] = CHTTP::urlAddParams($arResult["LIST_NEW_ELEMENT_URL"], array("list_section_id" => "")); } if ($arParams["IBLOCK_TYPE_ID"] == COption::GetOptionString("lists", "livefeed_iblock_type_id")) { $APPLICATION->SetTitle(GetMessage("CC_BLL_TITLE_PROCESS", array("#NAME#" => $arResult["IBLOCK"]["NAME"]))); } else { $APPLICATION->SetTitle(GetMessage("CC_BLL_TITLE", array("#NAME#" => $arResult["IBLOCK"]["NAME"]))); } $APPLICATION->AddChainItem($arResult["IBLOCK"]["NAME"], 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" => ""))); foreach ($arResult["SECTION_PATH"] as $arPath) { $APPLICATION->AddChainItem($arPath["NAME"], $arPath["URL"]); } $this->IncludeComponentTemplate();
} if(!empty($arResult["CATEGORIES"])) { $arResult["CATEGORIES"]["all"] = array( "TITLE" => "", "ITEMS" => array() ); $params = array( "q" => $arResult["alt_query"]? $arResult["alt_query"]: $arResult["query"], ); $url = CHTTP::urlAddParams( str_replace("#SITE_DIR#", SITE_DIR, $arParams["PAGE"]) ,$params ,array("encode"=>true) ); $arResult["CATEGORIES"]["all"]["ITEMS"][] = array( "NAME" => GetMessage("CC_BST_ALL_RESULTS"), "URL" => $url, ); /* if($arResult["alt_query"] != "") { $params = array( "q" => $arResult["query"], "spell" => 1, ); $url = CHTTP::urlAddParams(
<?php if (!Defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } $converter = CBXPunycode::GetConverter(); $arData = array(); if ($arResult["DOMAIN"] == "") { $arItems = array(); foreach ($arResult["DOMAINS_NAMES"] as $domainName) { $domLink = CHTTP::urlAddParams($arResult["CURRENT_PAGE"], array("domain" => urlencode($domainName))); $arItems[] = array("TYPE" => "CUSTOM", "HTML_DATA" => '<ul>' . '<li id="li_id_' . $domainName . '">' . '<a href="javascript:void(0);">' . htmlspecialcharsEx($converter->Decode($domainName)) . '</a>' . '</li>' . '</ul>' . '<script type="text/javascript">' . 'BX.ready(function(){ bcPush.makeFastButton("li_id_' . $domainName . '", "' . $domLink . '");});' . '</script>'); } if (empty($arItems)) { $arItems = array(array("TYPE" => "TEXT_RO", "VALUE" => GetMessage("BCMMP_NO_DOMAINS"))); } $arData[] = array("TYPE" => "BLOCK", "TITLE" => GetMessage("BCMMP_DOMAINS_TITLE"), "DATA" => $arItems); } else { $arData[] = array("TYPE" => "BLOCK", "TITLE" => htmlspecialcharsbx($converter->Decode($arResult["DOMAIN"])), "DATA" => array(array("TITLE" => GetMessage("BCMMP_PUSH_RECIEVE"), "VALUE" => $arResult["OPTIONS"]["SUBSCRIBE"], "TYPE" => "2_RADIO_BUTTONS", "NAME" => "SUBSCRIBE", "BUTT_Y" => array("TITLE" => GetMessage("BCMMP_ON")), "BUTT_N" => array("TITLE" => GetMessage("BCMMP_OFF"))))); } $APPLICATION->IncludeComponent('bitrix:mobileapp.edit', '.default', array("HEAD" => GetMessage("BCMMP_TITLE2"), "DATA" => $arData), false); ?> <script type="text/javascript"> app.setPageTitle({title: "<?php echo GetMessage('BCMMP_TITLE'); ?> "}); BX.message({
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"]); $arResult["LIST_EDIT_URL"] = htmlspecialcharsbx($arResult["~LIST_EDIT_URL"]); $arResult["~LIST_FIELDS_URL"] = str_replace(array("#list_id#", "#group_id#"), array($arResult["IBLOCK_ID"], $arParams["SOCNET_GROUP_ID"]), $arParams["~LIST_FIELDS_URL"]); $arResult["LIST_FIELDS_URL"] = htmlspecialcharsbx($arResult["~LIST_FIELDS_URL"]); $arResult["~LIST_FIELD_EDIT_URL"] = str_replace(array("#list_id#", "#field_id#", "#group_id#"), array($arResult["IBLOCK_ID"], "0", $arParams["SOCNET_GROUP_ID"]), $arParams["~LIST_FIELD_EDIT_URL"]); $arResult["LIST_FIELD_EDIT_URL"] = htmlspecialcharsbx($arResult["~LIST_FIELD_EDIT_URL"]); //Form submitted if ($_SERVER["REQUEST_METHOD"] == "POST" && check_bitrix_sessid() && isset($_POST["action_button_" . $arResult["GRID_ID"]])) { $obList = new CList($arIBlock["ID"]); if ($_POST["action_button_" . $arResult["GRID_ID"]] == "delete" && isset($_POST["ID"]) && is_array($_POST["ID"])) { foreach ($_POST["ID"] as $ID) { $obList->DeleteField($ID); } //Clear components cache
$arResult["FILTER_URL"] = htmlspecialcharsbx(CHTTP::urlAddParams($clearURL, $paramsToAdd, array( "skip_empty" => true, "encode" => true, ))); if (isset($_GET["bxajaxid"])) { $arResult["COMPONENT_CONTAINER_ID"] = htmlspecialcharsbx("comp_".$_GET["bxajaxid"]); if ($arParams["INSTANT_RELOAD"]) $arResult["INSTANT_RELOAD"] = true; } $arResult["FILTER_AJAX_URL"] = htmlspecialcharsbx(CHTTP::urlAddParams($clearURL, $paramsToAdd + array( "AJAX_CALL" => "Y", "bxajaxid" => $_GET["bxajaxid"], ), array( "skip_empty" => true, "encode" => true, ))); } $arInputNames = array(); foreach($arResult["ITEMS"] as $PID => $arItem) { foreach($arItem["VALUES"] as $key => $ar) $arInputNames[$ar["CONTROL_NAME"]] = true; } $arInputNames["set_filter"]=true; $arInputNames["del_filter"]=true; $arSkip = array(
} if (!CModule::IncludeModule('sale')) { ShowError(GetMessage("SMPL_SALE_NOT_INSTALLED")); return; } if (!CModule::IncludeModule('mobileapp')) { ShowError("SMPL_MOBILEAPP_NOT_INSTALLED"); return; } if (!CModule::IncludeModule('iblock')) { ShowError("SMPL_IBLOCK_NOT_INSTALLED"); return; } $arResult = array("CURRENT_PAGE_PARAMS" => $APPLICATION->GetCurPageParam(), "AJAX_URL" => $componentPath . "/ajax.php"); $arResult["STORE_PAGE"] = CHTTP::urlAddParams($arResult["CURRENT_PAGE_PARAMS"], array("set_store" => 'Y'), array("encode" => true)); $arResult["BARCODE_PAGE"] = CHTTP::urlAddParams($arResult["CURRENT_PAGE_PARAMS"], array("set_barcode" => 'Y'), array("encode" => true)); if (isset($_REQUEST["product_id"])) { $arResult["PRODUCT_ID"]; } if (isset($_REQUEST["set_store"])) { $templatePage = 'store'; } elseif (isset($_REQUEST["set_barcode"])) { $templatePage = 'barcode'; } else { $templatePage = 'template'; } $bXmlId = COption::GetOptionString("sale", "show_order_product_xml_id", "N"); $rsSites = CSite::GetList($by = "id", $order = "asc", array("ACTIVE" => "Y", "DEF" => "Y")); $arSite = $rsSites->Fetch(); $LID = $arSite["ID"]; $arResult["LID"] = $LID;
$arHp = array('diffid' => $arHistoryFirst['ID'], 'oldid' => $arHistory['ID']); if ($arParams['IN_COMPLEX'] == 'Y' && $arParams['SEF_MODE'] == 'N') { $arHp[$arParams['OPER_VAR']] = 'history_diff'; } $arHistory['CUR_LINK'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_HISTORY_DIFF'], array('wiki_name' => urlencode($arParams['ELEMENT_NAME']), 'group_id' => CWikiSocnet::$iSocNetId)), $arHp); } if (CWikiUtils::IsDeleteable()) { $arHp = array('oldid' => $arHistory['ID'], 'sessid' => bitrix_sessid(), 'delete' => 1); if ($arParams['IN_COMPLEX'] == 'Y' && $arParams['SEF_MODE'] == 'N') { $arHp[$arParams['OPER_VAR']] = 'history'; } $arHistory['DELETE_LINK'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_HISTORY'], array('wiki_name' => urlencode($arParams['ELEMENT_NAME']), 'group_id' => CWikiSocnet::$iSocNetId)), $arHp); } $arHistory['MODIFIED'] = FormatDateFromDB($arHistory['MODIFIED']); $arResult['HISTORY'][] = $arHistory; $iPrev = count($arResult['HISTORY']) - 2; if (isset($arResult['HISTORY'][$iPrev])) { $arHp = array('diffid' => $arResult['HISTORY'][$iPrev]['ID'], 'oldid' => $arHistory['ID']); if ($arParams['IN_COMPLEX'] == 'Y' && $arParams['SEF_MODE'] == 'N') { $arHp[$arParams['OPER_VAR']] = 'history_diff'; } $arResult['HISTORY'][$iPrev]['PREV_LINK'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_HISTORY_DIFF'], array('wiki_name' => urlencode($arParams['ELEMENT_NAME']), 'group_id' => CWikiSocnet::$iSocNetId)), $arHp); } } $CACHE_MANAGER->StartTagCache($this->GetCachePath()); $CACHE_MANAGER->RegisterTag('wiki_' . $arParams['ELEMENT_ID']); $CACHE_MANAGER->EndTagCache(); $this->IncludeComponentTemplate(); } include_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components/bitrix/wiki/include/nav.php'; unset($GLOBALS['arParams']);
private function QueryOrderData($arFilter, $arOptions = null) { if (!is_array($arOptions)) { $arOptions = array(); } $requestMethod = isset($arOptions["REQUEST_METHOD"]) && is_string($arOptions["REQUEST_METHOD"]) ? strtoupper($arOptions["REQUEST_METHOD"]) : ""; if ($requestMethod === "") { $requestMethod = "GET"; } $siteUrl = !empty($_SERVER["HTTP_HOST"]) ? ($GLOBALS["APPLICATION"]->IsHTTPS() ? "https" : "http") . "://" . $_SERVER["HTTP_HOST"] : ""; if ($requestMethod === "GET") { if ($siteUrl !== "") { $arFilter["CRM_SITE_URL"] = $siteUrl; } $request = array("METHOD" => "GET", "PATH" => CHTTP::urlAddParams($this->path, $arFilter), "HEADERS" => array()); } else { $request = array("METHOD" => "POST", "PATH" => $this->path, "HEADERS" => array(), "BODY" => array()); foreach ($arFilter as $key => $val) { $request["BODY"][$key] = $val; } if ($siteUrl !== "") { $request["BODY"]["CRM_SITE_URL"] = $siteUrl; } } $response = $this->proxy->Send($request); if (is_array($response) && isset($response["BODY"])) { return $response["BODY"]; } $errors = array(); foreach ($this->proxy->GetErrors() as $error) { $errors[] = sprintf("[%s] %s", $error[0], $error[1]); } $status = implode(" ", $errors); $this->AddError("GD1", $status); CCrmExternalSale::Update($this->externalSaleId, array("LAST_STATUS" => $status)); return null; }
function fReplaceUrl($arCatalog, $urlCurrent) { $urlCurrentDefault = $urlCurrent; foreach ($arCatalog as $key => $submenu) { $arUrlAdd = array("set_filter" => "Y"); $url = $submenu["url"]; $urlParse = parse_url($url); $arUrlTag = explode("&", $urlParse["query"]); foreach ($arUrlTag as $tag) { $tmp = explode("=", $tag); if ($tmp[0] == "IBLOCK_ID" || $tmp[0] == "find_section_section") { if ($tmp[0] == "find_section_section") { $tmp[0] = "filter_section"; } $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; }
public function End() { echo ' </div> </div> </td> </tr> </table> </div>'; $sRowIds = $sVisRowsIds = ""; if(is_array($this->popup)) { foreach($this->popup as $key=>$item) if($item !== null) $sRowIds .= ($sRowIds <> ""? ",":"").'"'.CUtil::JSEscape($key).'"'; $aRows = explode(",", $this->arOptFlt["rows"]); if(is_array($aRows)) foreach($aRows as $row) if(trim($row) <> "") $sVisRowsIds .= ($sVisRowsIds <> ""? ",":"").'"'.CUtil::JSEscape(trim($row)).'":true'; } $this->PrintSaveOptionsDIV(); $this->GetParamsFromCookie(); $openedTabUri = false; $openedTabSes = $filteredTab = null; if(isset($_REQUEST["adm_filter_applied"]) && !empty($_REQUEST["adm_filter_applied"])) { $openedTabUri = $_REQUEST["adm_filter_applied"]; } else { $openedTabSes = $_SESSION[self::SESS_PARAMS_NAME][$this->id]["activeTabId"]; $filteredTab = $_SESSION[self::SESS_PARAMS_NAME][$this->id]["filteredId"]; } echo ' <script type="text/javascript"> var '.$this->id.' = {}; BX.ready(function(){ '.$this->id.' = new BX.AdminFilter("'.$this->id.'", ['.$sRowIds.']); '.$this->id.'.state.init = true; '.$this->id.'.state.folded = '.($this->arOptFlt["styleFolded"] == "Y" ? "true" : "false").'; '.$this->id.'.InitFilter({'.$sVisRowsIds.'}); '.$this->id.'.oOptions = '.CUtil::PhpToJsObject($this->arItems).'; '.$this->id.'.popupItems = '.CUtil::PhpToJsObject($this->popup).'; '.$this->id.'.InitFirst(); '.$this->id.'.url = "'.CUtil::AddSlashes($this->url).'"; '.$this->id.'.table_id = "'.CUtil::AddSlashes($this->tableId).'"; '.$this->id.'.presetsDeleted = ['.$this->arOptFlt["presetsDeletedJS"].'];'; if($filteredTab != null || $openedTabUri != false) { $tabToInit = ($openedTabUri ? $openedTabUri : $filteredTab); echo ' '.$this->id.'.InitFilteredTab("'.CUtil::JSEscape(htmlspecialcharsbx($tabToInit)).'");'; } if($openedTabSes != null || $openedTabUri != false) echo ' var openedFTab = '.$this->id.'.InitOpenedTab("'.CUtil::JSEscape(htmlspecialcharsbx($openedTabUri)).'", "'.CUtil::JSEscape(htmlspecialcharsbx($openedTabSes)).'");'; echo ' '.$this->id.'.state.init = false; BX("adm-filter-tab-wrap-'.$this->id.'").style.display = "block";'; //making filter tabs draggable if($this->url) { $registerUrl = CHTTP::urlDeleteParams($this->url, array("adm_filter_applied", "adm_filter_preset")); foreach($this->arItems as $filter_id => $filter) { $arParamsAdd = array("adm_filter_applied"=>$filter_id); if(isset($filter["PRESET_ID"])) $arParamsAdd["adm_filter_preset"] = $filter["PRESET_ID"]; $filterUrl = CHTTP::urlAddParams($registerUrl, $arParamsAdd, array("encode","skip_empty")); echo " BX.adminMenu.registerItem('adm-filter-tab-".$this->id.'-'.$filter_id."', {URL:'".$filterUrl."', TITLE: true});"; } } echo ' } ); </script>'; $hkInst = CHotKeys::getInstance(); $Execs = $hkInst->GetCodeByClassName("CAdminFilter"); echo $hkInst->PrintJSExecs($Execs); }
var oDivIDText = document.getElementById("edit-post-text"); if(type == "html") { var oDivIDFlag = document.getElementById("editor_loaded"); oDivIDText.style.display = "none"; if(oDivIDHtml) oDivIDHtml.style.display = "block"; //load editor if(oDivIDFlag.value == "N") { var show = BX.showWait(oDivIDHtml); var request = new JCHttpRequest; var options_url = "<?php echo CHTTP::urlAddParams($arResult['PATH_TO_POST_EDIT'], array('load_editor' => 'Y')); ?> "; var sParam = ""; request.Action = function (content) { oDivIDHtml.innerHTML = content; BX.closeWait(oDivIDHtml, show); if(window.pLEditorWiki) oDivIDFlag.value = "Y"; } request.Post(options_url, sParam); } else
public static function SetMeetingParams($userId, $eventId, $arFields) { global $DB; $eventId = intVal($eventId); $userId = intVal($userId); // Check $arFields if (!in_array($arFields['ACCESSIBILITY'], array('busy', 'quest', 'free', 'absent'))) { $arFields['ACCESSIBILITY'] = 'busy'; } $arReminders = array(); if ($arFields['REMIND'] && is_array($arFields['REMIND'])) { foreach ($arFields['REMIND'] as $remind) { if (in_array($remind['type'], array('min', 'hour', 'day'))) { $arReminders[] = array('type' => $remind['type'], 'count' => floatVal($remind['count'])); } } } $arFields['REMIND'] = count($arReminders) > 0 ? serialize($arReminders) : ''; // Reminding options $Event = CCalendarEvent::GetById($eventId); if (!$Event) { return false; } $path = CCalendar::GetPath($arFields['CAL_TYPE']); $path = CHTTP::urlDeleteParams($path, array("action", "sessid", "bx_event_calendar_request", "EVENT_ID")); $viewPath = CHTTP::urlAddParams($path, array('EVENT_ID' => $eventId)); $remAgentParams = array('eventId' => $eventId, 'userId' => $userId, 'viewPath' => $viewPath, 'calendarType' => $Event["CAL_TYPE"], 'ownerId' => $Event["OWNER_ID"]); // 1. clean reminders CCalendar::RemoveAgent($remAgentParams); // 2. Set new reminders foreach ($arReminders as $reminder) { $delta = intVal($reminder['count']) * 60; //Minute if ($reminder['type'] == 'hour') { $delta = $delta * 60; } elseif ($reminder['type'] == 'day') { $delta = $delta * 60 * 24; } //Day if ($Event['DT_FROM_TS'] - $delta >= time() - 60 * 5) { // Inaccuracy - 5 min CCalendar::AddAgent(CCalendar::Date($Event['DT_FROM_TS'] - $delta), $remAgentParams); } } // Select meeting info about event $res = CCalendarEvent::GetList(array('arFilter' => array("ID" => $eventId, "DELETED" => "N"), 'parseRecursion' => false)); if ($Event = $res[0]) { if ($Event['IS_MEETING']) { // Try to find this user into attendees for this event $strSql = "SELECT * FROM b_calendar_attendees WHERE USER_KEY={$userId} AND EVENT_ID={$eventId}"; $dbAtt = $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__); if ($att = $dbAtt->Fetch()) { //Set params $strSql = "UPDATE b_calendar_attendees SET " . $DB->PrepareUpdate("b_calendar_attendees", $arFields) . " WHERE EVENT_ID=" . $eventId . " AND USER_KEY=" . $userId; $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__); } } } CCalendar::ClearCache('attendees_list'); return true; }
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { die; } $dir = trim(preg_replace("'[\\\\/]+'", "/", dirname(__FILE__) . "/")); __IncludeLang($dir . "lang/" . LANGUAGE_ID . "/group_bizproc_workflow_admin.php"); $pageId = "group_group_lists"; include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/bitrix/socialnetwork_group/templates/.default/util_group_menu.php"; include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/bitrix/socialnetwork_group/templates/.default/util_group_profile.php"; $APPLICATION->IncludeComponent("bitrix:lists.element.navchain", ".default", array("IBLOCK_TYPE_ID" => COption::GetOptionString("lists", "socnet_iblock_type_id"), "SOCNET_GROUP_ID" => $arResult["VARIABLES"]["group_id"], "PATH_TO_GROUP" => $arResult["PATH_TO_GROUP"], "ADD_NAVCHAIN_GROUP" => "Y", "LISTS_URL" => $arResult["PATH_TO_GROUP_LISTS"], "IBLOCK_ID" => $arResult["VARIABLES"]["list_id"], "ADD_NAVCHAIN_LIST" => "Y", "LIST_URL" => $arResult["PATH_TO_GROUP_LIST_VIEW"], "ADD_NAVCHAIN_SECTIONS" => "N", "ADD_NAVCHAIN_ELEMENT" => "N"), $component); $APPLICATION->IncludeComponent("bitrix:main.interface.toolbar", "", array("BUTTONS" => array(array("TEXT" => GetMessage("CT_BL_STATE_BIZPROC"), "TITLE" => GetMessage("CT_BL_STATE_BIZPROC_TITLE"), "LINK" => CHTTP::urlAddParams(str_replace(array("#list_id#", "#group_id#", "#ID#", "#id#"), array($arResult["VARIABLES"]["list_id"], $arResult["VARIABLES"]["group_id"], 0, 0), $arResult["PATH_TO_GROUP_BIZPROC_WORKFLOW_EDIT"]), array("init" => "statemachine")), "ICON" => "btn-new"), array("TEXT" => GetMessage("CT_BL_SEQ_BIZPROC"), "TITLE" => GetMessage("CT_BL_SEQ_BIZPROC_TITLE"), "LINK" => str_replace(array("#list_id#", "#group_id#", "#ID#", "#id#"), array($arResult["VARIABLES"]["list_id"], $arResult["VARIABLES"]["group_id"], 0, 0), $arResult["PATH_TO_GROUP_BIZPROC_WORKFLOW_EDIT"]), "ICON" => "btn-new"), array("SEPARATOR" => "Y"), array("TEXT" => htmlspecialcharsbx(CIBlock::GetArrayByID($arResult["VARIABLES"]["list_id"], "ELEMENTS_NAME")), "TITLE" => GetMessage("CT_BL_ELEMENTS_TITLE"), "LINK" => str_replace(array("#list_id#", "#group_id#", "#section_id#"), array($arResult["VARIABLES"]["list_id"], $arResult["VARIABLES"]["group_id"], 0), $arResult["PATH_TO_GROUP_LIST_VIEW"])))), $component, array("HIDE_ICONS" => "Y")); $APPLICATION->IncludeComponent("bitrix:bizproc.workflow.list", ".default", array("MODULE_ID" => "iblock", "ENTITY" => "CIBlockDocument", "DOCUMENT_ID" => "iblock_" . $arResult["VARIABLES"]["list_id"], "EDIT_URL" => str_replace(array("#list_id#", "#group_id#"), array($arResult["VARIABLES"]["list_id"], $arResult["VARIABLES"]["group_id"]), $arResult["PATH_TO_GROUP_BIZPROC_WORKFLOW_EDIT"]), "SET_TITLE" => "Y"), $component, array("HIDE_ICONS" => "Y"));
} } } // obtain a list of pictures page $arResult['IMAGES'] = array(); if (!empty($arResult['ELEMENT']['IMAGES'])) { foreach ($arResult['ELEMENT']['IMAGES'] as $_imgID) { $rsFile = CFile::GetByID($_imgID); $arFile = $rsFile->Fetch(); $aImg = array(); $aImg['ID'] = $_imgID; $aImg['ORIGINAL_NAME'] = $arFile['ORIGINAL_NAME']; $aImg['FILE_SHOW'] = CFile::ShowImage($_imgID, 100, 100, "id=\"{$_imgID}\" border=\"0\" style=\"cursor:pointer;\" onclick=\"doInsert('[File:" . CUtil::JSEscape(htmlspecialcharsbx($arFile['ORIGINAL_NAME'])) . "]','',false, '{$_imgID}')\" title='" . GetMessage('WIKI_IMAGE_INSERT') . "'"); $arResult['IMAGES'][] = $aImg; } } include_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components/bitrix/wiki/include/nav.php'; $arResult['PATH_TO_POST_EDIT'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_POST_EDIT'], array('wiki_name' => urlencode($arParams['ELEMENT_NAME']), 'group_id' => CWikiSocnet::$iSocNetId)), $arParams['IN_COMPLEX'] == 'Y' && $arParams['SEF_MODE'] == 'N' ? array($arParams['OPER_VAR'] => $arResult['WIKI_oper']) : array()); $arResult['~PATH_TO_POST_EDIT'] = urldecode($arResult['PATH_TO_POST_EDIT']); //because it can change the page name, and hence the path for the parameter "Action" in tag "Form" if (strpos(POST_FORM_ACTION_URI, 'SEF_APPLICATION_CUR_PAGE_URL=') !== false) { $arResult['PATH_TO_POST_EDIT_SUBMIT'] = CHTTP::urlAddParams(CHTTP::urlDeleteParams(POST_FORM_ACTION_URI, array('SEF_APPLICATION_CUR_PAGE_URL')), array('SEF_APPLICATION_CUR_PAGE_URL' => urlencode($arResult['~PATH_TO_POST_EDIT']))); } else { $arResult['PATH_TO_POST_EDIT_SUBMIT'] = $arResult['PATH_TO_POST_EDIT']; } $sCatName = ''; $arResult["IS_CATEGORY_PAGE"] = CWikiUtils::IsCategoryPage($arResult['ELEMENT']['NAME_LOCALIZE'], $sCatName); } } $this->IncludeComponentTemplate(); unset($GLOBALS['arParams']);
$arToolbar[] = array("SEPARATOR" => true); } 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")); }