当前位置: 首页>>代码示例>>PHP>>正文


PHP CrmCheckPath函数代码示例

本文整理汇总了PHP中CrmCheckPath函数的典型用法代码示例。如果您正苦于以下问题:PHP CrmCheckPath函数的具体用法?PHP CrmCheckPath怎么用?PHP CrmCheckPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CrmCheckPath函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: parseParams

 protected function parseParams()
 {
     $this->arParams['PATH_TO_PRODUCT_LIST'] = CrmCheckPath('PATH_TO_PRODUCT_LIST', $this->arParams['PATH_TO_PRODUCT_LIST'], $this->getApp()->GetCurPage() . '?section_id=#section_id#');
     // prepare URI template
     $matches = array();
     $curParam = $this->getApp()->GetCurParam();
     $curParam = preg_replace('/(?<!\\w)list_section_id=\\d*(?=([^\\d]|$))/', 'list_section_id=#section_id#', $curParam);
     $curParam = preg_replace('/(^|&)tree=\\w*(?=(&|$))/', '', $curParam);
     $this->arParams['PAGE_URI_TEMPLATE'] = $this->arParams['PATH_TO_PRODUCT_LIST'] . (strlen($curParam) > 0 ? '?' . $curParam . '&tree=Y' : '?tree=Y');
     unset($curParam);
     // Catalog ID
     if (isset($this->arParams['CATALOG_ID'])) {
         $this->catalogId = intval($this->arParams['CATALOG_ID']);
     }
     if ($this->catalogId <= 0) {
         $this->catalogId = CCrmCatalog::GetDefaultID();
     }
     // Section ID
     if (isset($this->arParams['SECTION_ID'])) {
         $this->sectionId = intval($this->arParams['SECTION_ID']);
     }
     if ($this->sectionId < 0) {
         $this->sectionId = 0;
     }
     // JS events mode
     if (isset($this->arParams['JS_EVENTS_MODE']) && $this->arParams['JS_EVENTS_MODE'] === 'Y') {
         $this->jsEventsMode = true;
     }
     // JS events manager
     $this->jsEventsManagerId = isset($this->arParams['JS_EVENTS_MANAGER_ID']) ? strval($this->arParams['JS_EVENTS_MANAGER_ID']) : '';
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:32,代码来源:class.php

示例2: checkParameters

 /**
  * Additional parameters check, if we have parameters depend on modules included.
  * @return void
  */
 protected function checkParameters()
 {
     $this->arParams['PATH_TO_LOCATIONS_LIST'] = CrmCheckPath('PATH_TO_LOCATIONS_LIST', $this->arParams['PATH_TO_LOCATIONS_LIST'], '');
     $this->arParams['PATH_TO_LOCATIONS_ADD'] = CrmCheckPath('PATH_TO_LOCATIONS_ADD', $this->arParams['PATH_TO_LOCATIONS_ADD'], '?add');
     $this->arParams['PATH_TO_LOCATIONS_EDIT'] = CrmCheckPath('PATH_TO_LOCATIONS_EDIT', $this->arParams['PATH_TO_LOCATIONS_EDIT'], '?loc_id=#loc_id#&edit');
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:11,代码来源:class.php

示例3: ShowError

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule('crm')) {
    ShowError(GetMessage('CRM_MODULE_NOT_INSTALLED'));
    return;
}
if (!CModule::IncludeModule('sale')) {
    ShowError(GetMessage('CRM_SALE_MODULE_NOT_INSTALLED'));
    return;
}
global $USER, $APPLICATION;
$arParams['PATH_TO_TAX_LIST'] = CrmCheckPath('PATH_TO_TAX_LIST', $arParams['PATH_TO_TAX_LIST'], '');
$arParams['PATH_TO_TAX_SHOW'] = CrmCheckPath('PATH_TO_TAX_SHOW', $arParams['PATH_TO_TAX_SHOW'], '?tax_id=#tax_id#&show');
$arParams['PATH_TO_TAX_ADD'] = CrmCheckPath('PATH_TO_TAX_ADD', $arParams['PATH_TO_TAX_ADD'], '?add');
$arParams['PATH_TO_TAX_EDIT'] = CrmCheckPath('PATH_TO_TAX_EDIT', $arParams['PATH_TO_TAX_EDIT'], '?tax_id=#tax_id#&edit');
if (!isset($arParams['TYPE'])) {
    $arParams['TYPE'] = 'list';
}
$arResult['BUTTONS'] = array();
$taxID = isset($arParams['TAX_ID']) ? strval($arParams['TAX_ID']) : '';
$CrmPerms = new CCrmPerms($USER->GetID());
$taxAdd = $taxEdit = $taxDelete = $CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'WRITE');
$taxShow = $CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'READ');
$exists = intval($taxID > 0) && is_array(CCrmTax::GetByID($taxID));
if ($arParams['TYPE'] !== 'list') {
    $arResult['BUTTONS'][] = array('TEXT' => GetMessage('CRM_TAX_LIST'), 'TITLE' => GetMessage('CRM_TAX_LIST_TITLE'), 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_TAX_LIST'], array()), 'ICON' => 'btn-list');
}
if ($taxAdd) {
    $arResult['BUTTONS'][] = array('TEXT' => GetMessage('CRM_TAX_ADD'), 'TITLE' => GetMessage('CRM_TAX_ADD_TITLE'), 'LINK' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_TAX_ADD'], array()), 'ICON' => 'btn-new');
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例4: array

use Bitrix\Crm\EntityAddress;
CUtil::InitJSCore(array('ajax', 'tooltip'));
$arResult['EDITABLE_FIELDS'] = array();
$arResult['ELEMENT_ID'] = $arParams['ELEMENT_ID'] = isset($arParams['ELEMENT_ID']) ? intval($arParams['ELEMENT_ID']) : 0;
$arResult['CAN_EDIT'] = CCrmCompany::CheckUpdatePermission($arResult['ELEMENT_ID'], $CCrmCompany->cPerms);
$arParams['PATH_TO_COMPANY_LIST'] = CrmCheckPath('PATH_TO_COMPANY_LIST', $arParams['PATH_TO_COMPANY_LIST'], $APPLICATION->GetCurPage());
$arResult['PATH_TO_COMPANY_SHOW'] = $arParams['PATH_TO_COMPANY_SHOW'] = CrmCheckPath('PATH_TO_COMPANY_SHOW', $arParams['PATH_TO_COMPANY_SHOW'], $APPLICATION->GetCurPage() . '?company_id=#company_id#&show');
$arParams['PATH_TO_COMPANY_EDIT'] = CrmCheckPath('PATH_TO_COMPANY_EDIT', $arParams['PATH_TO_COMPANY_EDIT'], $APPLICATION->GetCurPage() . '?company_id=#company_id#&edit');
$arParams['PATH_TO_LEAD_SHOW'] = CrmCheckPath('PATH_TO_LEAD_SHOW', $arParams['PATH_TO_LEAD_SHOW'], $APPLICATION->GetCurPage() . '?lead_id=#lead_id#&show');
$arParams['PATH_TO_LEAD_EDIT'] = CrmCheckPath('PATH_TO_LEAD_EDIT', $arParams['PATH_TO_LEAD_EDIT'], $APPLICATION->GetCurPage() . '?lead_id=#lead_id#&edit');
$arParams['PATH_TO_LEAD_CONVERT'] = CrmCheckPath('PATH_TO_LEAD_CONVERT', $arParams['PATH_TO_LEAD_CONVERT'], $APPLICATION->GetCurPage() . '?lead_id=#lead_id#&convert');
$arParams['PATH_TO_CONTACT_SHOW'] = CrmCheckPath('PATH_TO_CONTACT_SHOW', $arParams['PATH_TO_CONTACT_SHOW'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&show');
$arParams['PATH_TO_CONTACT_EDIT'] = CrmCheckPath('PATH_TO_CONTACT_EDIT', $arParams['PATH_TO_CONTACT_EDIT'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&edit');
$arParams['PATH_TO_DEAL_SHOW'] = CrmCheckPath('PATH_TO_DEAL_SHOW', $arParams['PATH_TO_DEAL_SHOW'], $APPLICATION->GetCurPage() . '?deal_id=#deal_id#&show');
$arParams['PATH_TO_DEAL_EDIT'] = CrmCheckPath('PATH_TO_DEAL_EDIT', $arParams['PATH_TO_DEAL_EDIT'], $APPLICATION->GetCurPage() . '?deal_id=#deal_id#&edit');
$arParams['PATH_TO_USER_PROFILE'] = CrmCheckPath('PATH_TO_USER_PROFILE', $arParams['PATH_TO_USER_PROFILE'], '/company/personal/user/#user_id#/');
$arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), array("", ""), $arParams["NAME_TEMPLATE"]);
global $USER_FIELD_MANAGER;
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, CCrmCompany::$sUFEntityID);
$bEdit = false;
$arResult['ELEMENT_ID'] = $arParams['ELEMENT_ID'] = (int) $arParams['ELEMENT_ID'];
$obFields = CCrmCompany::GetListEx(array(), array('ID' => $arParams['ELEMENT_ID']));
$arFields = $obFields->GetNext();
if (!is_array($arFields)) {
    LocalRedirect(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_COMPANY_LIST'], array()));
}
$arFields['FM'] = array();
$dbResMultiFields = CCrmFieldMulti::GetList(array('ID' => 'asc'), array('ENTITY_ID' => 'COMPANY', 'ELEMENT_ID' => $arResult['ELEMENT_ID']));
while ($arMultiFields = $dbResMultiFields->Fetch()) {
    $arFields['FM'][$arMultiFields['TYPE_ID']][$arMultiFields['ID']] = array('VALUE' => $arMultiFields['VALUE'], 'VALUE_TYPE' => $arMultiFields['VALUE_TYPE']);
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例5: CrmCheckPath

    die;
}
if (!CModule::IncludeModule('crm')) {
    return;
}
$currentUserID = CCrmSecurityHelper::GetCurrentUserID();
$CrmPerms = CCrmPerms::GetCurrentUserPermissions();
if ($CrmPerms->HavePerm('CONTACT', BX_CRM_PERM_NONE)) {
    return;
}
$arParams['PATH_TO_CONTACT_LIST'] = CrmCheckPath('PATH_TO_CONTACT_LIST', $arParams['PATH_TO_CONTACT_LIST'], $APPLICATION->GetCurPage());
$arParams['PATH_TO_CONTACT_SHOW'] = CrmCheckPath('PATH_TO_CONTACT_SHOW', $arParams['PATH_TO_CONTACT_SHOW'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&show');
$arParams['PATH_TO_CONTACT_EDIT'] = CrmCheckPath('PATH_TO_CONTACT_EDIT', $arParams['PATH_TO_CONTACT_EDIT'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&edit');
$arParams['PATH_TO_CONTACT_IMPORT'] = CrmCheckPath('PATH_TO_CONTACT_IMPORT', $arParams['PATH_TO_CONTACT_IMPORT'], $APPLICATION->GetCurPage() . '?import');
$arParams['PATH_TO_DEAL_EDIT'] = CrmCheckPath('PATH_TO_DEAL_EDIT', $arParams['PATH_TO_DEAL_EDIT'], $APPLICATION->GetCurPage() . '?deal_id=#deal_id#&edit');
$arParams['PATH_TO_CONTACT_DEDUPE'] = CrmCheckPath('PATH_TO_CONTACT_DEDUPE', $arParams['PATH_TO_CONTACT_DEDUPE'], $APPLICATION->GetCurPage());
$arParams['ELEMENT_ID'] = isset($arParams['ELEMENT_ID']) ? intval($arParams['ELEMENT_ID']) : 0;
if (!isset($arParams['TYPE'])) {
    $arParams['TYPE'] = 'list';
}
if (isset($_REQUEST['copy'])) {
    $arParams['TYPE'] = 'copy';
}
$toolbarID = 'toolbar_contact_' . $arParams['TYPE'];
if ($arParams['ELEMENT_ID'] > 0) {
    $toolbarID .= '_' . $arParams['ELEMENT_ID'];
}
$arResult['TOOLBAR_ID'] = $toolbarID;
$arResult['BUTTONS'] = array();
if ($arParams['TYPE'] == 'list') {
    $bRead = !$CrmPerms->HavePerm('CONTACT', BX_CRM_PERM_NONE, 'READ');
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例6: CCrmContact

use Bitrix\Crm\Format\AddressSeparator;
use Bitrix\Crm\Format\ContactAddressFormatter;
$CCrmContact = new CCrmContact(false);
$CCrmBizProc = new CCrmBizProc('CONTACT');
$userID = CCrmSecurityHelper::GetCurrentUserID();
$isAdmin = CCrmPerms::IsAdmin();
$arResult['CURRENT_USER_ID'] = CCrmSecurityHelper::GetCurrentUserID();
$arParams['PATH_TO_CONTACT_LIST'] = CrmCheckPath('PATH_TO_CONTACT_LIST', $arParams['PATH_TO_CONTACT_LIST'], $APPLICATION->GetCurPage());
$arParams['PATH_TO_CONTACT_SHOW'] = CrmCheckPath('PATH_TO_CONTACT_SHOW', $arParams['PATH_TO_CONTACT_SHOW'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&show');
$arParams['PATH_TO_CONTACT_EDIT'] = CrmCheckPath('PATH_TO_CONTACT_EDIT', $arParams['PATH_TO_CONTACT_EDIT'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&edit');
$arParams['PATH_TO_COMPANY_SHOW'] = CrmCheckPath('PATH_TO_COMPANY_SHOW', $arParams['PATH_TO_COMPANY_SHOW'], $APPLICATION->GetCurPage() . '?company_id=#company_id#&show');
$arParams['PATH_TO_DEAL_EDIT'] = CrmCheckPath('PATH_TO_DEAL_EDIT', $arParams['PATH_TO_DEAL_EDIT'], $APPLICATION->GetCurPage() . '?deal_id=#deal_id#&edit');
$arParams['PATH_TO_QUOTE_EDIT'] = CrmCheckPath('PATH_TO_QUOTE_EDIT', $arParams['PATH_TO_QUOTE_EDIT'], $APPLICATION->GetCurPage() . '?quote_id=#quote_id#&edit');
$arParams['PATH_TO_INVOICE_EDIT'] = CrmCheckPath('PATH_TO_INVOICE_EDIT', $arParams['PATH_TO_INVOICE_EDIT'], $APPLICATION->GetCurPage() . '?invoice_id=#invoice_id#&edit');
$arParams['PATH_TO_USER_PROFILE'] = CrmCheckPath('PATH_TO_USER_PROFILE', $arParams['PATH_TO_USER_PROFILE'], '/company/personal/user/#user_id#/');
$arParams['PATH_TO_USER_BP'] = CrmCheckPath('PATH_TO_USER_BP', $arParams['PATH_TO_USER_BP'], '/company/personal/bizproc/');
$arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), array("", ""), $arParams["NAME_TEMPLATE"]);
$arResult['IS_AJAX_CALL'] = isset($_REQUEST['bxajaxid']) || isset($_REQUEST['AJAX_CALL']);
$arResult['SESSION_ID'] = bitrix_sessid();
CUtil::InitJSCore(array('ajax', 'tooltip'));
$arResult['GADGET'] = 'N';
if (isset($arParams['GADGET_ID']) && strlen($arParams['GADGET_ID']) > 0) {
    $arResult['GADGET'] = 'Y';
    $arResult['GADGET_ID'] = $arParams['GADGET_ID'];
}
$arFilter = $arSort = array();
$bInternal = false;
$arResult['FORM_ID'] = isset($arParams['FORM_ID']) ? $arParams['FORM_ID'] : '';
$arResult['TAB_ID'] = isset($arParams['TAB_ID']) ? $arParams['TAB_ID'] : '';
if (!empty($arParams['INTERNAL_FILTER']) || $arResult['GADGET'] == 'Y') {
    $bInternal = true;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例7: CCrmPerms

<?php

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule('crm')) {
    return;
}
$CrmPerms = new CCrmPerms($USER->GetID());
if ($CrmPerms->HavePerm('INVOICE', BX_CRM_PERM_NONE)) {
    return;
}
$arParams['PATH_TO_INVOICE_LIST'] = CrmCheckPath('PATH_TO_INVOICE_LIST', $arParams['PATH_TO_INVOICE_LIST'], $APPLICATION->GetCurPage());
$arParams['PATH_TO_INVOICE_SHOW'] = CrmCheckPath('PATH_TO_INVOICE_SHOW', $arParams['PATH_TO_INVOICE_SHOW'], $APPLICATION->GetCurPage() . '?invoice_id=#invoice_id#&show');
$arParams['PATH_TO_INVOICE_PAYMENT'] = CrmCheckPath('PATH_TO_INVOICE_PAYMENT', $arParams['PATH_TO_INVOICE_PAYMENT'], $APPLICATION->GetCurPage() . '?invoice_id=#invoice_id#&payment');
$arParams['PATH_TO_INVOICE_EDIT'] = CrmCheckPath('PATH_TO_INVOICE_EDIT', $arParams['PATH_TO_INVOICE_EDIT'], $APPLICATION->GetCurPage() . '?invoice_id=#invoice_id#&edit');
if (!isset($arParams['TYPE'])) {
    $arParams['TYPE'] = 'list';
}
if (isset($_REQUEST['copy'])) {
    $arParams['TYPE'] = 'copy';
}
$arResult['TYPE'] = $arParams['TYPE'];
$arResult['BUTTONS'] = array();
$arFields = array();
$arParams['ELEMENT_ID'] = intval($arParams['ELEMENT_ID']);
if ($arParams['TYPE'] == 'list') {
    $bRead = !$CrmPerms->HavePerm('INVOICE', BX_CRM_PERM_NONE, 'READ');
    $bExport = !$CrmPerms->HavePerm('INVOICE', BX_CRM_PERM_NONE, 'EXPORT');
    $bImport = !$CrmPerms->HavePerm('INVOICE', BX_CRM_PERM_NONE, 'IMPORT');
    $bAdd = !$CrmPerms->HavePerm('INVOICE', BX_CRM_PERM_NONE, 'ADD');
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例8: ShowError

}
if (!CModule::IncludeModule('crm')) {
    ShowError(GetMessage('CRM_MODULE_NOT_INSTALLED'));
    return;
}
if (!CModule::IncludeModule('iblock')) {
    ShowError(GetMessage('IBLOCK_MODULE_NOT_INSTALLED'));
    return;
}
global $USER, $APPLICATION;
$arResult['LIST_SECTION_ID'] = isset($_REQUEST['list_section_id']) ? intval($_REQUEST['list_section_id']) : (isset($arParams['SECTION_ID']) ? intval($arParams['SECTION_ID']) : 0);
$arParams['PATH_TO_PRODUCT_LIST'] = CrmCheckPath('PATH_TO_PRODUCT_LIST', $arParams['PATH_TO_PRODUCT_LIST'], '?#section_id#');
$arParams['PATH_TO_PRODUCT_SHOW'] = CrmCheckPath('PATH_TO_PRODUCT_SHOW', $arParams['PATH_TO_PRODUCT_SHOW'], '?product_id=#product_id#&show');
$arParams['PATH_TO_PRODUCT_EDIT'] = CrmCheckPath('PATH_TO_PRODUCT_EDIT', $arParams['PATH_TO_PRODUCT_EDIT'], '?product_id=#product_id#&edit');
$arParams['PATH_TO_PRODUCT_IMPORT'] = CrmCheckPath('PATH_TO_PRODUCT_IMPORT', $arParams['PATH_TO_PRODUCT_IMPORT'], $APPLICATION->GetCurPage() . '?import');
$arParams['PATH_TO_SECTION_LIST'] = CrmCheckPath('PATH_TO_SECTION_LIST', $arParams['PATH_TO_SECTION_LIST'], '?#section_id#&sections');
if (!isset($arParams['TYPE'])) {
    $arParams['TYPE'] = 'list';
}
$arResult['BUTTONS'] = array();
$sectionID = isset($arParams['SECTION_ID']) ? intval($arParams['SECTION_ID']) : 0;
$productID = isset($arParams['PRODUCT_ID']) ? intval($arParams['PRODUCT_ID']) : 0;
$CrmPerms = new CCrmPerms($USER->GetID());
$productAdd = $sectionAdd = $productEdit = $productDelete = $bImport = $CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'WRITE');
$productShow = $sectionShow = $CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'READ');
$exists = $productID > 0 && CCrmProduct::Exists($productID);
if ($arParams['TYPE'] === 'sections') {
    $arSection = false;
    if ($sectionShow && $sectionID > 0) {
        $rsSection = CIBlockSection::GetList(array(), array('ID' => $sectionID, 'GLOBAL_ACTIVE' => 'Y', 'CHECK_PERMISSIONS' => 'N'), false, array('ID', 'IBLOCK_SECTION_ID'));
        $arSection = $rsSection->Fetch();
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例9: CrmCheckPath

<?php

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!CModule::IncludeModule('crm')) {
    return false;
}
$arGadgetParams['PATH_TO_CONTACT_SHOW'] = CrmCheckPath('PATH_TO_CONTACT_SHOW', $arGadgetParams['PATH_TO_CONTACT_SHOW'], '/crm/contact/show/#contact_id#/');
if (!is_array($arGadgetParams) || !array_key_exists('CONTACT_COUNT', $arGadgetParams) || $arGadgetParams['CONTACT_COUNT'] <= 0) {
    $arGadgetParams['CONTACT_COUNT'] = 5;
}
$arFilter = array();
$arSort = array();
if (!empty($arGadgetParams['SORT']) && !empty($arGadgetParams['SORT_BY'])) {
    $arSort = array($arGadgetParams['SORT'] => $arGadgetParams['SORT_BY']);
}
if (!empty($arGadgetParams['TYPE_ID'])) {
    $arFilter['TYPE_ID'] = $arGadgetParams['TYPE_ID'];
}
if (!empty($arGadgetParams['ONLY_MY']) && $arGadgetParams['ONLY_MY'] == 'Y') {
    $arFilter['ASSIGNED_BY_ID'] = $GLOBALS['USER']->GetID();
}
/*if ($bCrm)
{*/
$APPLICATION->IncludeComponent('bitrix:crm.contact.list', 'gadget', array('PATH_TO_CONTACT_SHOW' => $arGadgetParams['PATH_TO_CONTACT_SHOW'], 'SET_TITLE' => 'N', 'GADGET_ID' => str_replace('@', '_', $id), 'CONTACT_COUNT' => $arGadgetParams['CONTACT_COUNT'], 'INTERNAL_FILTER' => $arFilter, 'INTERNAL_SORT' => $arSort), false, array('HIDE_ICONS' => 'Y'));
/*}
else
	echo GetMessage('GD_CRM_FEATURE_INACTIVE');*/
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:29,代码来源:index.php

示例10: CCrmPerms

{
	ShowError(GetMessage('CRM_SALE_MODULE_NOT_INSTALLED'));
	return;
}*/
global $USER, $APPLICATION;
$CrmPerms = new CCrmPerms($USER->GetID());
if (!$CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'READ')) {
    ShowError(GetMessage('CRM_PERMISSION_DENIED'));
    return;
}
/** @global CDatabase $DB */
global $DB;
$arResult['CAN_DELETE'] = $arResult['CAN_EDIT'] = $CrmPerms->HavePerm('CONFIG', BX_CRM_PERM_CONFIG, 'WRITE');
$arParams['PATH_TO_PRODUCTPROPS_LIST'] = CrmCheckPath('PATH_TO_PRODUCTPROPS_LIST', $arParams['PATH_TO_PRODUCTPROPS_LIST'], '');
$arParams['PATH_TO_PRODUCTPROPS_ADD'] = CrmCheckPath('PATH_TO_PRODUCTPROPS_ADD', $arParams['PATH_TO_PRODUCTPROPS_ADD'], '?add');
$arParams['PATH_TO_PRODUCTPROPS_EDIT'] = CrmCheckPath('PATH_TO_PRODUCTPROPS_EDIT', $arParams['PATH_TO_PRODUCTPROPS_EDIT'], '?prop_id=#prop_id#&edit');
$arResult['GRID_ID'] = 'CRM_PRODUCTPROPS_LIST';
$arResult['FORM_ID'] = isset($arParams['FORM_ID']) ? $arParams['FORM_ID'] : '';
$arResult['TAB_ID'] = isset($arParams['TAB_ID']) ? $arParams['TAB_ID'] : '';
$arPropType = array('' => GetMessage('CRM_PRODUCT_PROP_IBLOCK_ALL'), 'S' => GetMessage('CRM_PRODUCT_PROP_IBLOCK_PROP_S'), 'N' => GetMessage('CRM_PRODUCT_PROP_IBLOCK_PROP_N'), 'L' => GetMessage('CRM_PRODUCT_PROP_IBLOCK_PROP_L'), 'F' => GetMessage('CRM_PRODUCT_PROP_IBLOCK_PROP_F'), 'E' => GetMessage('CRM_PRODUCT_PROP_IBLOCK_PROP_E'));
$arUserTypeList = CCrmProductPropsHelper::GetPropsTypesByOperations(false, 'edit');
\Bitrix\Main\Type\Collection::sortByColumn($arUserTypeList, array('DESCRIPTION' => SORT_STRING));
foreach ($arUserTypeList as $arUserType) {
    $arPropType[$arUserType['PROPERTY_TYPE'] . ':' . $arUserType['USER_TYPE']] = $arUserType['DESCRIPTION'];
}
$arResult['HEADERS'] = array(array('id' => 'ID', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_ID'), 'sort' => 'id', 'align' => 'right', 'default' => true, 'editable' => false), array('id' => 'NAME', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_NAME'), 'sort' => 'name', 'default' => true, 'editable' => true), array('id' => 'PROPERTY_TYPE', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_PROPERTY_TYPE'), 'default' => true, 'editable' => false, 'type' => 'list'), array('id' => 'SORT', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_SORT'), 'sort' => 'sort', 'align' => 'right', 'default' => true, 'editable' => true), array('id' => 'ACTIVE', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_ACTIVE'), 'sort' => 'active', 'align' => 'center', 'default' => true, 'editable' => true, 'type' => 'checkbox'), array('id' => 'IS_REQUIRED', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_IS_REQUIRED'), 'align' => 'center', 'default' => true, 'editable' => true, 'type' => 'checkbox'), array('id' => 'MULTIPLE', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_MULTIPLE'), 'align' => 'center', 'default' => true, 'editable' => true, 'type' => 'checkbox'), array('id' => 'XML_ID', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_XML_ID'), 'editable' => true));
$arResult['FILTER_PRESETS'] = array();
$arResult['FILTER'] = array(array('id' => 'NAME', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_NAME'), 'default' => true), array('id' => 'ACTIVE', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_ACTIVE'), 'type' => 'list', 'items' => array('' => GetMessage('CRM_PRODUCT_PROP_IBLOCK_ALL'), 'Y' => GetMessage('MAIN_YES'), 'N' => GetMessage('MAIN_NO'))), array('id' => 'IS_REQUIRED', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_IS_REQUIRED'), 'type' => 'list', 'items' => array('' => GetMessage('CRM_PRODUCT_PROP_IBLOCK_ALL'), 'Y' => GetMessage('MAIN_YES'), 'N' => GetMessage('MAIN_NO'))), array('id' => 'MULTIPLE', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_MULTIPLE'), 'type' => 'list', 'items' => array('' => GetMessage('CRM_PRODUCT_PROP_IBLOCK_ALL'), 'Y' => GetMessage('MAIN_YES'), 'N' => GetMessage('MAIN_NO'))), array('id' => 'XML_ID', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_XML_ID')), array('id' => 'PROPERTY_TYPE', 'name' => GetMessage('CRM_PRODUCT_PROP_PL_PROPERTY_TYPE'), 'type' => 'list', 'items' => $arPropType));
$CGridOptions = new CCrmGridOptions($arResult['GRID_ID']);
$arFilter = $CGridOptions->GetFilter($arResult['FILTER']);
$arStrFilters = array('NAME', 'CODE');
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例11: CCrmPerms

    return;
}
global $APPLICATION;
$CCrmPerms = new CCrmPerms($USER->GetID());
if (!$USER->IsAuthorized() || $CCrmPerms->HavePerm('DEAL', BX_CRM_PERM_NONE)) {
    return;
}
$arResult = array();
$_GET['USER_ID'] = preg_replace('/^(CONTACT|COMPANY|LEAD|DEAL)_/i' . BX_UTF_PCRE_MODIFIER, '', $_GET['USER_ID']);
$iDealId = (int) $_GET['USER_ID'];
if ($iDealId > 0) {
    __IncludeLang(dirname(__FILE__) . '/lang/' . LANGUAGE_ID . '/' . basename(__FILE__));
    $arParams['PATH_TO_DEAL_SHOW'] = CrmCheckPath('PATH_TO_DEAL_SHOW', $arParams['PATH_TO_DEAL_SHOW'], $APPLICATION->GetCurPage() . '?deal_id=#deal_id#&show');
    $arParams['PATH_TO_DEAL_EDIT'] = CrmCheckPath('PATH_TO_DEAL_EDIT', $arParams['PATH_TO_DEAL_EDIT'], $APPLICATION->GetCurPage() . '?deal_id=#deal_id#&edit');
    $arParams['PATH_TO_CONTACT_SHOW'] = CrmCheckPath('PATH_TO_CONTACT_SHOW', $arParams['PATH_TO_CONTACT_SHOW'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&show');
    $arParams['PATH_TO_COMPANY_SHOW'] = CrmCheckPath('PATH_TO_COMPANY_SHOW', $arParams['PATH_TO_COMPANY_SHOW'], $APPLICATION->GetCurPage() . '?company_id=#company_id#&show');
    $arResult['STAGE_LIST'] = CCrmStatus::GetStatusListEx('DEAL_STAGE');
    $obRes = CCrmDeal::GetList(array(), array('ID' => $iDealId));
    $arDeal = $obRes->Fetch();
    if ($arDeal == false) {
        return;
    }
    $res = CCrmFieldMulti::GetList(array('ID' => 'asc'), array('ENTITY_ID' => 'DEAL', 'ELEMENT_ID' => $iDealId));
    while ($ar = $res->Fetch()) {
        if (empty($arDeal[$ar['COMPLEX_ID']])) {
            $arDeal[$ar['COMPLEX_ID']] = CCrmFieldMulti::GetTemplateByComplex($ar['COMPLEX_ID'], $ar['VALUE']);
        }
    }
    $arDeal['PATH_TO_DEAL_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_DEAL_SHOW'], array('deal_id' => $iDealId));
    $arDeal['PATH_TO_DEAL_EDIT'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_DEAL_EDIT'], array('deal_id' => $iDealId));
    $arDeal['PATH_TO_CONTACT_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_CONTACT_SHOW'], array('contact_id' => $arDeal['CONTACT_ID']));
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:card.ajax.php

示例12: unset

            unset($file);
        }
    }
}
global $USER_FIELD_MANAGER;
$CCrmFieldMulti = new CCrmFieldMulti();
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, CCrmLead::$sUFEntityID);
$addressLabels = EntityAddress::getShortLabels();
$arResult['HEADERS'] = array(array('id' => 'ID', 'name' => 'ID'), array('id' => 'TITLE', 'name' => GetMessage('CRM_COLUMN_TITLE')), array('id' => 'NAME', 'name' => GetMessage('CRM_COLUMN_NAME')), array('id' => 'LAST_NAME', 'name' => GetMessage('CRM_COLUMN_LAST_NAME')), array('id' => 'SECOND_NAME', 'name' => GetMessage('CRM_COLUMN_SECOND_NAME')), array('id' => 'FULL_NAME', 'name' => GetMessage('CRM_COLUMN_FULL_NAME')), array('id' => 'BIRTHDATE', 'name' => GetMessage('CRM_COLUMN_BIRTHDATE')), array('id' => 'FULL_ADDRESS', 'name' => EntityAddress::getFullAddressLabel()), array('id' => 'ADDRESS', 'name' => $addressLabels['ADDRESS']), array('id' => 'ADDRESS_2', 'name' => $addressLabels['ADDRESS_2']), array('id' => 'ADDRESS_CITY', 'name' => $addressLabels['CITY']), array('id' => 'ADDRESS_REGION', 'name' => $addressLabels['REGION']), array('id' => 'ADDRESS_PROVINCE', 'name' => $addressLabels['PROVINCE']), array('id' => 'ADDRESS_POSTAL_CODE', 'name' => $addressLabels['POSTAL_CODE']), array('id' => 'ADDRESS_COUNTRY', 'name' => $addressLabels['COUNTRY']));
$CCrmFieldMulti->ListAddHeaders($arResult['HEADERS']);
$arResult['HEADERS'] = array_merge($arResult['HEADERS'], array(array('id' => 'COMPANY_TITLE', 'name' => GetMessage('CRM_COLUMN_COMPANY_TITLE')), array('id' => 'POST', 'name' => GetMessage('CRM_COLUMN_POST')), array('id' => 'COMMENTS', 'name' => GetMessage('CRM_COLUMN_COMMENTS')), array('id' => 'STATUS_ID', 'name' => GetMessage('CRM_COLUMN_STATUS')), array('id' => 'STATUS_DESCRIPTION', 'name' => GetMessage('CRM_COLUMN_STATUS_DESCRIPTION')), array('id' => 'PRODUCT_ID', 'name' => GetMessage('CRM_COLUMN_PRODUCT_ID')), array('id' => 'PRODUCT_PRICE', 'name' => GetMessage('CRM_COLUMN_PRODUCT_PRICE')), array('id' => 'PRODUCT_QUANTITY', 'name' => GetMessage('CRM_COLUMN_PRODUCT_QUANTITY')), array('id' => 'OPPORTUNITY', 'name' => GetMessage('CRM_COLUMN_OPPORTUNITY')), array('id' => 'CURRENCY_ID', 'name' => GetMessage('CRM_COLUMN_CURRENCY_ID')), array('id' => 'SOURCE_ID', 'name' => GetMessage('CRM_COLUMN_SOURCE')), array('id' => 'SOURCE_DESCRIPTION', 'name' => GetMessage('CRM_COLUMN_SOURCE_DESCRIPTION')), array('id' => 'OPENED', 'name' => GetMessage('CRM_COLUMN_OPENED')), array('id' => 'ASSIGNED_BY_ID', 'name' => GetMessage('CRM_COLUMN_ASSIGNED_BY_ID'))));
$CCrmUserType->ListAddHeaders($arResult['HEADERS'], true);
$arRequireFields = array();
$arRequireFields['TITLE'] = GetMessage('CRM_COLUMN_TITLE');
$arParams['PATH_TO_LEAD_LIST'] = CrmCheckPath('PATH_TO_LEAD_LIST', $arParams['PATH_TO_LEAD_LIST'], $APPLICATION->GetCurPage());
$arParams['PATH_TO_LEAD_IMPORT'] = CrmCheckPath('PATH_TO_LEAD_IMPORT', $arParams['PATH_TO_LEAD_IMPORT'], $APPLICATION->GetCurPage() . '?import');
$userNameFormats = \Bitrix\Crm\Format\PersonNameFormatter::getAllDescriptions();
//Download sample
$filename = $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components/bitrix/crm.lead.import/sample.csv';
if (isset($_REQUEST['getSample']) && $_REQUEST['getSample'] == 'csv') {
    $APPLICATION->RestartBuffer();
    Header("Content-Type: application/force-download");
    Header("Content-Type: application/octet-stream");
    Header("Content-Type: application/download");
    Header("Content-Disposition: attachment;filename=lead.csv");
    Header("Content-Transfer-Encoding: binary");
    // add UTF-8 BOM marker
    if (defined('BX_UTF') && BX_UTF) {
        echo chr(239) . chr(187) . chr(191);
    }
    $statusList = CCrmStatus::GetStatusListEx('STATUS');
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例13: CCrmQuote

    return;
}
CModule::IncludeModule('fileman');
$CCrmQuote = new CCrmQuote();
if ($CCrmQuote->cPerms->HavePerm('QUOTE', BX_CRM_PERM_NONE, 'WRITE') && $CCrmQuote->cPerms->HavePerm('QUOTE', BX_CRM_PERM_NONE, 'ADD')) {
    ShowError(GetMessage('CRM_PERMISSION_DENIED'));
    return;
}
$arParams['PATH_TO_QUOTE_LIST'] = CrmCheckPath('PATH_TO_QUOTE_LIST', $arParams['PATH_TO_QUOTE_LIST'], $APPLICATION->GetCurPage());
$arParams['PATH_TO_QUOTE_SHOW'] = CrmCheckPath('PATH_TO_QUOTE_SHOW', $arParams['PATH_TO_QUOTE_SHOW'], $APPLICATION->GetCurPage() . '?quote_id=#quote_id#&show');
$arParams['PATH_TO_QUOTE_EDIT'] = CrmCheckPath('PATH_TO_QUOTE_EDIT', $arParams['PATH_TO_QUOTE_EDIT'], $APPLICATION->GetCurPage() . '?quote_id=#quote_id#&edit');
$arParams['PATH_TO_USER_PROFILE'] = CrmCheckPath('PATH_TO_USER_PROFILE', $arParams['PATH_TO_USER_PROFILE'], '/company/personal/user/#user_id#/');
$arParams['PATH_TO_CONTACT_SHOW'] = CrmCheckPath('PATH_TO_CONTACT_SHOW', $arParams['PATH_TO_CONTACT_SHOW'], $APPLICATION->GetCurPage() . '?contact_id=#contact_id#&show');
$arParams['PATH_TO_COMPANY_SHOW'] = CrmCheckPath('PATH_TO_COMPANY_SHOW', $arParams['PATH_TO_COMPANY_SHOW'], $APPLICATION->GetCurPage() . '?company_id=#company_id#&show');
$arParams['PATH_TO_PRODUCT_EDIT'] = CrmCheckPath('PATH_TO_PRODUCT_EDIT', $arParams['PATH_TO_PRODUCT_EDIT'], $APPLICATION->GetCurPage() . '?product_id=#product_id#&edit');
$arParams['PATH_TO_PRODUCT_SHOW'] = CrmCheckPath('PATH_TO_PRODUCT_SHOW', $arParams['PATH_TO_PRODUCT_SHOW'], $APPLICATION->GetCurPage() . '?product_id=#product_id#&show');
$arParams['NAME_TEMPLATE'] = empty($arParams['NAME_TEMPLATE']) ? CSite::GetNameFormat(false) : str_replace(array("#NOBR#", "#/NOBR#"), array("", ""), $arParams["NAME_TEMPLATE"]);
$arResult['PREFIX'] = isset($arParams['~PREFIX']) ? $arParams['~PREFIX'] : 'crm_quote_edit';
$bInternal = false;
if (isset($arParams['INTERNAL_FILTER']) && !empty($arParams['INTERNAL_FILTER'])) {
    $bInternal = true;
}
$arResult['INTERNAL'] = $bInternal;
global $USER_FIELD_MANAGER, $DB, $USER;
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, CCrmQuote::$sUFEntityID);
$bEdit = false;
$bCopy = false;
$bVarsFromForm = false;
$arParams['ELEMENT_ID'] = (int) $arParams['ELEMENT_ID'];
if (!empty($arParams['ELEMENT_ID'])) {
    $bEdit = true;
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


注:本文中的CrmCheckPath函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。