本文整理汇总了PHP中CCrmStatus::GetStatusListEx方法的典型用法代码示例。如果您正苦于以下问题:PHP CCrmStatus::GetStatusListEx方法的具体用法?PHP CCrmStatus::GetStatusListEx怎么用?PHP CCrmStatus::GetStatusListEx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCrmStatus
的用法示例。
在下文中一共展示了CCrmStatus::GetStatusListEx方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetDocumentFields
public static function GetDocumentFields($documentType)
{
$arDocumentID = self::GetDocumentInfo($documentType . '_0');
if (empty($arDocumentID)) {
throw new CBPArgumentNullException('documentId');
}
__IncludeLang($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/components/bitrix/crm.' . strtolower($arDocumentID['TYPE']) . '.edit/lang/' . LANGUAGE_ID . '/component.php');
$printableFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_TEXT') . ')';
$emailFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_EMAIL') . ')';
$arResult = array('ID' => array('Name' => GetMessage('CRM_FIELD_ID'), 'Type' => 'int', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'TITLE' => array('Name' => GetMessage('CRM_FIELD_TITLE_DEAL'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true), 'OPPORTUNITY' => array('Name' => GetMessage('CRM_FIELD_OPPORTUNITY'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'CURRENCY_ID' => array('Name' => GetMessage('CRM_FIELD_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'OPPORTUNITY_ACCOUNT' => array('Name' => GetMessage('CRM_FIELD_OPPORTUNITY_ACCOUNT'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ACCOUNT_CURRENCY_ID' => array('Name' => GetMessage('CRM_FIELD_ACCOUNT_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'PROBABILITY' => array('Name' => GetMessage('CRM_FIELD_PROBABILITY'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ASSIGNED_BY_EMAIL' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $emailFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'STAGE_ID' => array('Name' => GetMessage('CRM_FIELD_STAGE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('DEAL_STAGE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'STAGE_ID_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_STAGE_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'CLOSED' => array('Name' => GetMessage('CRM_FIELD_CLOSED'), 'Type' => 'bool', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'TYPE_ID' => array('Name' => GetMessage('CRM_FIELD_TYPE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('DEAL_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'COMMENTS' => array('Name' => GetMessage('CRM_FIELD_COMMENTS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'BEGINDATE' => array('Name' => GetMessage('CRM_FIELD_BEGINDATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'CLOSEDATE' => array('Name' => GetMessage('CRM_FIELD_CLOSEDATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EVENT_DATE' => array('Name' => GetMessage('CRM_FIELD_EVENT_DATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EVENT_ID' => array('Name' => GetMessage('CRM_FIELD_EVENT_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('EVENT_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EVENT_DESCRIPTION' => array('Name' => GetMessage('CRM_FIELD_EVENT_DESCRIPTION'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), "OPENED" => array("Name" => GetMessage("CRM_FIELD_OPENED"), "Type" => "bool", "Filterable" => true, "Editable" => true, "Required" => false), "LEAD_ID" => array("Name" => GetMessage("CRM_FIELD_LEAD_ID"), "Type" => "int", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGINATOR_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGINATOR_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGIN_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGIN_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "CONTACT_ID" => array("Name" => GetMessage("CRM_FIELD_CONTACT_ID"), "Type" => "UF:crm", "Options" => array('CONTACT' => 'Y'), "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => false), "COMPANY_ID" => array("Name" => GetMessage("CRM_FIELD_COMPANY_ID"), "Type" => "UF:crm", "Options" => array('COMPANY' => 'Y'), "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => false), "DATE_CREATE" => array("Name" => GetMessage("CRM_DEAL_EDIT_FIELD_DATE_CREATE"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false), "DATE_MODIFY" => array("Name" => GetMessage("CRM_DEAL_EDIT_FIELD_DATE_MODIFY"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false));
global $USER_FIELD_MANAGER;
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, 'CRM_DEAL');
$CCrmUserType->AddBPFields($arResult, array('PRINTABLE_SUFFIX' => GetMessage("CRM_FIELD_BP_TEXT")));
return $arResult;
}
示例2: GetDocumentFields
public static function GetDocumentFields($documentType)
{
$arDocumentID = self::GetDocumentInfo($documentType . '_0');
if (empty($arDocumentID)) {
throw new CBPArgumentNullException('documentId');
}
__IncludeLang($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/components/bitrix/crm.' . strtolower($arDocumentID['TYPE']) . '.edit/lang/' . LANGUAGE_ID . '/component.php');
$printableFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_TEXT') . ')';
$emailFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_EMAIL') . ')';
$arResult = array('ID' => array('Name' => GetMessage('CRM_FIELD_ID'), 'Type' => 'int', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'TITLE' => array('Name' => GetMessage('CRM_FIELD_TITLE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true), 'COMPANY_TYPE' => array('Name' => GetMessage('CRM_FIELD_COMPANY_TYPE'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('COMPANY_TYPE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'INDUSTRY' => array('Name' => GetMessage('CRM_FIELD_INDUSTRY'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('INDUSTRY'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EMPLOYEES' => array('Name' => GetMessage('CRM_FIELD_EMPLOYEES'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('EMPLOYEES'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'REVENUE' => array('Name' => GetMessage('CRM_FIELD_REVENUE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'CURRENCY_ID' => array('Name' => GetMessage('CRM_FIELD_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ASSIGNED_BY_EMAIL' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $emailFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'COMMENTS' => array('Name' => GetMessage('CRM_FIELD_COMMENTS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'EMAIL' => array('Name' => GetMessage('CRM_FIELD_EMAIL'), 'Type' => 'email', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'PHONE' => array('Name' => GetMessage('CRM_FIELD_PHONE'), 'Type' => 'phone', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'WEB' => array('Name' => GetMessage('CRM_FIELD_WEB'), 'Type' => 'web', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'IM' => array('Name' => GetMessage('CRM_FIELD_MESSENGER'), 'Type' => 'im', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS' => array('Name' => GetMessage('CRM_FIELD_ADDRESS'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_LEGAL' => array('Name' => GetMessage('CRM_FIELD_ADDRESS_LEGAL'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'BANKING_DETAILS' => array('Name' => GetMessage('CRM_FIELD_BANKING_DETAILS'), 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), "OPENED" => array("Name" => GetMessage("CRM_FIELD_OPENED"), "Type" => "bool", "Filterable" => true, "Editable" => true, "Required" => false), "LEAD_ID" => array("Name" => GetMessage("CRM_FIELD_LEAD_ID"), "Type" => "int", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGINATOR_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGINATOR_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "ORIGIN_ID" => array("Name" => GetMessage("CRM_FIELD_ORIGIN_ID"), "Type" => "string", "Filterable" => true, "Editable" => true, "Required" => false), "CONTACT_ID" => array("Name" => GetMessage("CRM_FIELD_CONTACT_ID"), "Type" => "UF:crm", "Options" => array('CONTACT' => 'Y'), "Filterable" => true, "Editable" => true, "Required" => false, "Multiple" => false), "DATE_CREATE" => array("Name" => GetMessage("CRM_COMPANY_EDIT_FIELD_DATE_CREATE"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false), "DATE_MODIFY" => array("Name" => GetMessage("CRM_COMPANY_EDIT_FIELD_DATE_MODIFY"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false));
$ar = CCrmFieldMulti::GetEntityTypeList();
foreach ($ar as $typeId => $arFields) {
$arResult[$typeId . '_PRINTABLE'] = array('Name' => GetMessage("CRM_FIELD_MULTI_" . $typeId) . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
foreach ($arFields as $valueType => $valueName) {
$arResult[$typeId . '_' . $valueType] = array('Name' => $valueName, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
$arResult[$typeId . '_' . $valueType . '_PRINTABLE'] = array('Name' => $valueName . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
}
}
global $USER_FIELD_MANAGER;
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, 'CRM_COMPANY');
$CCrmUserType->AddBPFields($arResult, array('PRINTABLE_SUFFIX' => GetMessage("CRM_FIELD_BP_TEXT")));
return $arResult;
}
示例3: GetDocumentFields
public static function GetDocumentFields($documentType)
{
$arDocumentID = self::GetDocumentInfo($documentType . '_0');
if (empty($arDocumentID)) {
throw new CBPArgumentNullException('documentId');
}
__IncludeLang($_SERVER['DOCUMENT_ROOT'] . BX_ROOT . '/components/bitrix/crm.' . strtolower($arDocumentID['TYPE']) . '.edit/lang/' . LANGUAGE_ID . '/component.php');
$addressLabels = Bitrix\Crm\EntityAddress::getShortLabels();
$printableFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_TEXT') . ')';
$emailFieldNameSuffix = ' (' . GetMessage('CRM_FIELD_BP_EMAIL') . ')';
$arResult = array('ID' => array('Name' => GetMessage('CRM_FIELD_ID'), 'Type' => 'int', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'TITLE' => array('Name' => GetMessage('CRM_FIELD_TITLE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => true), 'STATUS_ID' => array('Name' => GetMessage('CRM_FIELD_STATUS_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('STATUS'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'STATUS_ID_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_STATUS_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'STATUS_DESCRIPTION' => array('Name' => GetMessage('CRM_FIELD_STATUS_DESCRIPTION'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'OPPORTUNITY' => array('Name' => GetMessage('CRM_FIELD_OPPORTUNITY'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'CURRENCY_ID' => array('Name' => GetMessage('CRM_FIELD_CURRENCY_ID'), 'Type' => 'select', 'Options' => CCrmCurrencyHelper::PrepareListItems(), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ASSIGNED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ASSIGNED_BY_EMAIL' => array('Name' => GetMessage('CRM_FIELD_ASSIGNED_BY_ID') . $emailFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'CREATED_BY_ID' => array('Name' => GetMessage('CRM_FIELD_CREATED_BY_ID'), 'Type' => 'user', 'Filterable' => true, 'Editable' => false, 'Required' => false), 'CREATED_BY_PRINTABLE' => array('Name' => GetMessage('CRM_FIELD_CREATED_BY_ID') . $printableFieldNameSuffix, 'Type' => 'string', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'COMMENTS' => array('Name' => GetMessage('CRM_FIELD_COMMENTS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), 'NAME' => array('Name' => GetMessage('CRM_FIELD_NAME'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'LAST_NAME' => array('Name' => GetMessage('CRM_FIELD_LAST_NAME'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'SECOND_NAME' => array('Name' => GetMessage('CRM_FIELD_SECOND_NAME'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'BIRTHDATE' => array('Name' => GetMessage('CRM_LEAD_EDIT_FIELD_BIRTHDATE'), 'Type' => 'datetime', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'EMAIL' => array('Name' => GetMessage('CRM_FIELD_EMAIL'), 'Type' => 'email', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'PHONE' => array('Name' => GetMessage('CRM_FIELD_PHONE'), 'Type' => 'phone', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'WEB' => array('Name' => GetMessage('CRM_FIELD_WEB'), 'Type' => 'web', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'IM' => array('Name' => GetMessage('CRM_FIELD_MESSENGER'), 'Type' => 'im', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'COMPANY_TITLE' => array('Name' => GetMessage('CRM_FIELD_COMPANY_TITLE'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'POST' => array('Name' => GetMessage('CRM_FIELD_POST'), 'Type' => 'string', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'FULL_ADDRESS' => array('Name' => GetMessage('CRM_FIELD_ADDRESS'), 'Type' => 'text', 'Filterable' => false, 'Editable' => false, 'Required' => false), 'ADDRESS' => array('Name' => $addressLabels['ADDRESS'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_2' => array('Name' => $addressLabels['ADDRESS_2'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_CITY' => array('Name' => $addressLabels['CITY'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_POSTAL_CODE' => array('Name' => $addressLabels['POSTAL_CODE'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_REGION' => array('Name' => $addressLabels['REGION'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_PROVINCE' => array('Name' => $addressLabels['PROVINCE'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'ADDRESS_COUNTRY' => array('Name' => $addressLabels['COUNTRY'], 'Type' => 'text', 'Filterable' => true, 'Editable' => true, 'Required' => false), 'SOURCE_ID' => array('Name' => GetMessage('CRM_FIELD_SOURCE_ID'), 'Type' => 'select', 'Options' => CCrmStatus::GetStatusListEx('SOURCE'), 'Filterable' => true, 'Editable' => true, 'Required' => false), 'SOURCE_DESCRIPTION' => array('Name' => GetMessage('CRM_FIELD_SOURCE_DESCRIPTION'), 'Type' => 'text', 'Filterable' => false, 'Editable' => true, 'Required' => false), "DATE_CREATE" => array("Name" => GetMessage("CRM_LEAD_EDIT_FIELD_DATE_CREATE"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false), "DATE_MODIFY" => array("Name" => GetMessage("CRM_LEAD_EDIT_FIELD_DATE_MODIFY"), "Type" => "datetime", "Filterable" => true, "Editable" => false, "Required" => false));
$ar = CCrmFieldMulti::GetEntityTypeList();
foreach ($ar as $typeId => $arFields) {
$arResult[$typeId . '_PRINTABLE'] = array('Name' => GetMessage('CRM_FIELD_MULTI_' . $typeId) . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
foreach ($arFields as $valueType => $valueName) {
$arResult[$typeId . '_' . $valueType] = array('Name' => $valueName, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
$arResult[$typeId . '_' . $valueType . '_PRINTABLE'] = array('Name' => $valueName . $printableFieldNameSuffix, 'Type' => 'string', "Filterable" => true, "Editable" => false, "Required" => false);
}
}
global $USER_FIELD_MANAGER;
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, 'CRM_LEAD');
$CCrmUserType->AddBPFields($arResult, array('PRINTABLE_SUFFIX' => GetMessage("CRM_FIELD_BP_TEXT")));
return $arResult;
}
示例4: _GetSourceList
private static function _GetSourceList()
{
$ar = CCrmStatus::GetStatusListEx('SOURCE');
$list = array();
foreach ($ar as $key => $value) {
$list[] = array('ID' => $key, 'NAME' => $value);
}
return $list;
}
示例5: strtolower
$sExportType = '';
if (!empty($_REQUEST['type'])) {
$sExportType = strtolower(trim($_REQUEST['type']));
if (!in_array($sExportType, array('csv', 'excel'))) {
$sExportType = '';
}
}
if (!empty($sExportType) && $CCrmPerms->HavePerm('QUOTE', BX_CRM_PERM_NONE, 'EXPORT')) {
ShowError(GetMessage('CRM_PERMISSION_DENIED'));
return;
}
$isInExportMode = $sExportType !== '';
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, CCrmQuote::$sUFEntityID);
$arResult['GRID_ID'] = 'CRM_QUOTE_LIST_V12' . ($bInternal && !empty($arParams['GRID_ID_SUFFIX']) ? '_' . $arParams['GRID_ID_SUFFIX'] : '');
/*$arResult['TYPE_LIST'] = CCrmStatus::GetStatusListEx('QUOTE_TYPE');*/
$arResult['STATUS_LIST'] = CCrmStatus::GetStatusListEx('QUOTE_STATUS');
/*$arResult['STATE_LIST'] = CCrmStatus::GetStatusListEx('QUOTE_STATE');*/
// Please, uncomment if required
//$arResult['CURRENCY_LIST'] = CCrmCurrencyHelper::PrepareListItems();
/*$arResult['EVENT_LIST'] = CCrmStatus::GetStatusListEx('EVENT_TYPE');*/
$arResult['CLOSED_LIST'] = array('Y' => GetMessage('MAIN_YES'), 'N' => GetMessage('MAIN_NO'));
$arResult['FILTER'] = array();
$arResult['FILTER2LOGIC'] = array();
$arResult['FILTER_PRESETS'] = array();
$arResult['PERMS']['ADD'] = !$CCrmPerms->HavePerm('QUOTE', BX_CRM_PERM_NONE, 'ADD');
$arResult['PERMS']['WRITE'] = !$CCrmPerms->HavePerm('QUOTE', BX_CRM_PERM_NONE, 'WRITE');
$arResult['PERMS']['DELETE'] = !$CCrmPerms->HavePerm('QUOTE', BX_CRM_PERM_NONE, 'DELETE');
$arResult['AJAX_MODE'] = isset($arParams['AJAX_MODE']) ? $arParams['AJAX_MODE'] : ($arResult['INTERNAL'] ? 'N' : 'Y');
$arResult['AJAX_ID'] = isset($arParams['AJAX_ID']) ? $arParams['AJAX_ID'] : '';
$arResult['AJAX_OPTION_JUMP'] = isset($arParams['AJAX_OPTION_JUMP']) ? $arParams['AJAX_OPTION_JUMP'] : 'N';
$arResult['AJAX_OPTION_HISTORY'] = isset($arParams['AJAX_OPTION_HISTORY']) ? $arParams['AJAX_OPTION_HISTORY'] : 'N';
示例6: while
while ($arRes = $obRes->Fetch()) {
$arRes['SID'] = $arResult['PREFIX'] == 'Y' ? 'D_' . $arRes['ID'] : $arRes['ID'];
if (isset($arResult['SELECTED'][$arRes['SID']])) {
unset($arResult['SELECTED'][$arRes['SID']]);
$sSelected = 'Y';
} else {
$sSelected = 'N';
}
$clientTitle = !empty($arRes['COMPANY_TITLE']) ? $arRes['COMPANY_TITLE'] : '';
$clientTitle .= ($clientTitle !== '' && !empty($arRes['CONTACT_FULL_NAME']) ? ', ' : '') . $arRes['CONTACT_FULL_NAME'];
$ar[] = array('title' => str_replace(array(';', ','), ' ', $arRes['TITLE']), 'desc' => $clientTitle, 'id' => $arRes['SID'], 'url' => CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_deal_show'), array('deal_id' => $arRes['ID'])), 'type' => 'deal', 'selected' => $sSelected);
}
$arResult['ELEMENT'] = array_merge($ar, $arResult['ELEMENT']);
}
if ($arSettings['QUOTE'] == 'Y' && isset($arSelected['QUOTE']) && !empty($arSelected['QUOTE'])) {
$arQuoteStageList = CCrmStatus::GetStatusListEx('QUOTE_STAGE');
$arSelect = array('ID', 'TITLE', 'STAGE_ID', 'COMPANY_TITLE', 'CONTACT_FULL_NAME');
$ar = array();
$obRes = CCrmQuote::GetList(array('ID' => 'DESC'), array('ID' => $arSelected['QUOTE']), false, false, $arSelect);
while ($arRes = $obRes->Fetch()) {
$arRes['SID'] = $arResult['PREFIX'] == 'Y' ? 'D_' . $arRes['ID'] : $arRes['ID'];
if (isset($arResult['SELECTED'][$arRes['SID']])) {
unset($arResult['SELECTED'][$arRes['SID']]);
$sSelected = 'Y';
} else {
$sSelected = 'N';
}
$clientTitle = !empty($arRes['COMPANY_TITLE']) ? $arRes['COMPANY_TITLE'] : '';
$clientTitle .= ($clientTitle !== '' && !empty($arRes['CONTACT_FULL_NAME']) ? ', ' : '') . $arRes['CONTACT_FULL_NAME'];
$ar[] = array('title' => str_replace(array(';', ','), ' ', $arRes['TITLE']), 'desc' => $clientTitle, 'id' => $arRes['SID'], 'url' => CComponentEngine::MakePathFromTemplate(COption::GetOptionString('crm', 'path_to_quote_show'), array('quote_id' => $arRes['ID'])), 'type' => 'quote', 'selected' => $sSelected);
}
示例7: CCrmPerms
return;
}
global $APPLICATION;
$CCrmPerms = new CCrmPerms($USER->GetID());
if (!$USER->IsAuthorized() || $CCrmPerms->HavePerm('COMPANY', BX_CRM_PERM_NONE)) {
return;
}
$arResult = array();
$_GET['USER_ID'] = preg_replace('/^(CONTACT|COMPANY|LEAD|DEAL)_/i' . BX_UTF_PCRE_MODIFIER, '', $_GET['USER_ID']);
$iCompanyId = (int) $_GET['USER_ID'];
if ($iCompanyId > 0) {
__IncludeLang(dirname(__FILE__) . '/lang/' . LANGUAGE_ID . '/' . basename(__FILE__));
$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');
$arResult['COMPANY_TYPE_LIST'] = CCrmStatus::GetStatusListEx('COMPANY_TYPE');
$arResult['EMPLOYEES_LIST'] = CCrmStatus::GetStatusListEx('EMPLOYEES');
$obRes = CCrmCompany::GetList(array(), array('ID' => $iCompanyId));
$arCompany = $obRes->Fetch();
if ($arCompany == false) {
return;
}
$res = CCrmFieldMulti::GetList(array('ID' => 'asc'), array('ENTITY_ID' => 'COMPANY', 'ELEMENT_ID' => $iCompanyId));
while ($ar = $res->Fetch()) {
if (empty($arCompany[$ar['COMPLEX_ID']])) {
$arCompany[$ar['COMPLEX_ID']] = CCrmFieldMulti::GetTemplateByComplex($ar['COMPLEX_ID'], $ar['VALUE']);
}
}
$arCompany['PATH_TO_COMPANY_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_COMPANY_SHOW'], array('company_id' => $iCompanyId));
$arCompany['PATH_TO_COMPANY_EDIT'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_COMPANY_EDIT'], array('company_id' => $iCompanyId));
$strCard = '
<div class="bx-user-info-data-cont-video bx-user-info-fields" id="bx_user_info_data_cont_1">
示例8: PrepareEmployees
private static function PrepareEmployees()
{
return self::$EMPLOYEES !== null ? self::$EMPLOYEES : (self::$EMPLOYEES = CCrmStatus::GetStatusListEx('EMPLOYEES'));
}
示例9: array
<?php
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
die;
}
if (!CModule::IncludeModule('crm')) {
return;
}
$arParameters = array('PARAMETERS' => array(), 'USER_PARAMETERS' => array('TYPE_ID' => array('NAME' => GetMessage('GD_CRM_COLUMN_COMPANY_TYPE'), 'TYPE' => 'LIST', 'VALUES' => array('' => '') + CCrmStatus::GetStatusListEx('COMPANY_TYPE'), 'MULTIPLE' => 'Y', 'DEFAULT' => array()), 'ONLY_MY' => array('NAME' => GetMessage('GD_CRM_ONLY_MY'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'), 'SORT' => array('NAME' => GetMessage('GD_CRM_SORT'), 'TYPE' => 'LIST', 'VALUES' => array('DATE_CREATE' => GetMessage('GD_CRM_COLUMN_DATE_CREATE'), 'DATE_MODIFY' => GetMessage('GD_CRM_COLUMN_DATE_MODIFY'), 'STAGE_ID' => GetMessage('GD_CRM_COLUMN_COMPANY_TYPE')), 'DEFAULT' => 'DATE_CREATE'), 'SORT_BY' => array('NAME' => GetMessage('GD_CRM_SORT_BY'), 'TYPE' => 'LIST', 'VALUES' => array('ASC' => GetMessage('GD_CRM_SORT_ASC'), 'DESC' => GetMessage('GD_CRM_SORT_DESC')), 'DEFAULT' => 'DESC'), 'COMPANY_COUNT' => array('NAME' => GetMessage('GD_CRM_COMPANY_LIST_COMPANY_COUNT'), 'TYPE' => 'STRING', 'DEFAULT' => 5)));
示例10: intval
$arFields['~ASSIGNED_BY_FORMATTED_NAME'] = intval($arFields['~ASSIGNED_BY_ID']) > 0 ? CUser::FormatName($fullNameFormat, array('LOGIN' => $arFields['~ASSIGNED_BY_LOGIN'], 'NAME' => $arFields['~ASSIGNED_BY_NAME'], 'LAST_NAME' => $arFields['~ASSIGNED_BY_LAST_NAME'], 'SECOND_NAME' => $arFields['~ASSIGNED_BY_SECOND_NAME']), true, false) : GetMessage('RESPONSIBLE_NOT_ASSIGNED');
$arFields['ASSIGNED_BY_FORMATTED_NAME'] = htmlspecialcharsbx($arFields['~ASSIGNED_BY_FORMATTED_NAME']);
$arFields['~CREATED_BY_FORMATTED_NAME'] = CUser::FormatName($fullNameFormat, array('LOGIN' => $arFields['~CREATED_BY_LOGIN'], 'NAME' => $arFields['~CREATED_BY_NAME'], 'LAST_NAME' => $arFields['~CREATED_BY_LAST_NAME'], 'SECOND_NAME' => $arFields['~CREATED_BY_SECOND_NAME']), true, false);
$arFields['CREATED_BY_FORMATTED_NAME'] = htmlspecialcharsbx($arFields['~CREATED_BY_FORMATTED_NAME']);
$arFields['PATH_TO_USER_CREATOR'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_USER_PROFILE'], array('user_id' => $arFields['ASSIGNED_BY']));
$arFields['~MODIFY_BY_FORMATTED_NAME'] = CUser::FormatName($fullNameFormat, array('LOGIN' => $arFields['~MODIFY_BY_LOGIN'], 'NAME' => $arFields['~MODIFY_BY_NAME'], 'LAST_NAME' => $arFields['~MODIFY_BY_LAST_NAME'], 'SECOND_NAME' => $arFields['~MODIFY_BY_SECOND_NAME']), true, false);
$arFields['MODIFY_BY_FORMATTED_NAME'] = htmlspecialcharsbx($arFields['~MODIFY_BY_FORMATTED_NAME']);
$arFields['PATH_TO_USER_MODIFIER'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_USER_PROFILE'], array('user_id' => $arFields['MODIFY_BY']));
$arResult['ELEMENT'] = $arFields;
unset($arFields);
$arResult['FORM_ID'] = 'CRM_COMPANY_SHOW_V12';
$arResult['GRID_ID'] = 'CRM_COMPANY_LIST_V12';
$arResult['BACK_URL'] = $arParams['PATH_TO_COMPANY_LIST'];
$arResult['COMPANY_TYPE_LIST'] = CCrmStatus::GetStatusListEx('COMPANY_TYPE');
$arResult['EMPLOYEES_LIST'] = CCrmStatus::GetStatusListEx('EMPLOYEES');
$arResult['INDUSTRY_LIST'] = CCrmStatus::GetStatusListEx('INDUSTRY');
$enableInstantEdit = $arResult['ENABLE_INSTANT_EDIT'] = $arResult['CAN_EDIT'];
$readOnlyMode = !$enableInstantEdit;
$arResult['FIELDS'] = array();
$arResult['FIELDS']['tab_1'][] = array('id' => 'section_company_info', 'name' => GetMessage('CRM_SECTION_COMPANY_INFO'), 'type' => 'section', 'isTactile' => true);
// TITLE -->
// TITLE is displayed in sidebar. The field is added for COMPATIBILITY ONLY
if ($enableInstantEdit) {
$arResult['EDITABLE_FIELDS'][] = 'TITLE';
}
$arResult['FIELDS']['tab_1'][] = array('id' => 'TITLE', 'name' => GetMessage('CRM_FIELD_TITLE'), 'params' => array('size' => 50), 'value' => isset($arResult['ELEMENT']['~TITLE']) ? $arResult['ELEMENT']['~TITLE'] : '', 'type' => 'label', 'isTactile' => true);
// <-- TITLE
// ASSIGNED_BY_ID is displayed in sidebar. The field is added for COMPATIBILITY ONLY
if ($enableInstantEdit) {
$arResult['EDITABLE_FIELDS'][] = 'ASSIGNED_BY_ID';
}
示例11: showField
//.........这里部分代码省略.........
$strUser .= '<img src="' . $arFileTmp['src'] . '" alt=""/>';
}
}
$strUser .= '</div>';
if (strlen($this->params["PATH_TO_USER"]) > 0) {
$strUser .= '<a class="crm-detail-info-resp-name" target="_blank" href="' . str_replace(array("#user_id#", "#USER_ID#"), intval($arField["VALUE"]), $this->params["PATH_TO_USER"]) . '">' . CUser::FormatName(CSite::GetNameFormat(), $arUser, true, false) . '</a>';
} else {
$strUser .= '<span class="crm-detail-info-resp-name">' . CUser::FormatName(CSite::GetNameFormat(), $arUser, true, false) . '</span>';
}
if (strlen($arUser["WORK_POSITION"]) > 0) {
$strUser .= '<span class="crm-detail-info-resp-descr">' . $arUser["WORK_POSITION"] . '</span>';
}
$strResult .= '<span class="crm-detail-info-resp">' . $strUser . '</span>';
$strResult .= "#cell_end#";
$strResult .= "#row_end#";
}
}
break;
case "COMPANY_ID":
if (intval($arField["VALUE"]) > 0) {
$strResult .= "#row_begin#";
$strResult .= "#cell_begin_left#";
$strResult .= $arField["TITLE"] . ":";
$strResult .= "#cell_end#";
$strResult .= "#cell_begin_right#";
$strResult .= '<span class="crm-feed-info-text-padding">';
$strResult .= CCrmViewHelper::PrepareEntityBaloonHtml(array('ENTITY_TYPE_ID' => CCrmOwnerType::Company, 'ENTITY_ID' => $arField["VALUE"], 'PREFIX' => "", 'CLASS_NAME' => '', 'CHECK_PERMISSIONS' => 'N'));
$strResult .= '</span>';
$strResult .= "#cell_end#";
$strResult .= "#row_end#";
}
break;
case "COMPANY_TYPE":
$infos = CCrmStatus::GetStatusListEx('COMPANY_TYPE');
if (!empty($arField["VALUE"]) && array_key_exists($arField["VALUE"], $infos)) {
$strResult .= "#row_begin#";
$strResult .= "#cell_begin_left#";
$strResult .= $arField["TITLE"] . ":";
$strResult .= "#cell_end#";
$strResult .= "#cell_begin_right#";
$strResult .= '<span class="crm-feed-info-text-padding">';
$strResult .= $infos[$arField["VALUE"]];
$strResult .= '</span>';
$strResult .= "#cell_end#";
$strResult .= "#row_end#";
}
break;
case "CONTACT_ID":
if (intval($arField["VALUE"]) > 0) {
$strResult .= "#row_begin#";
$strResult .= "#cell_begin_left#";
$strResult .= $arField["TITLE"] . ":";
$strResult .= "#cell_end#";
$strResult .= "#cell_begin_right#";
$strResult .= '<div class="crm-feed-client-block">';
$strResult .= '<span class="feed-com-avatar crm-feed-user-avatar">';
$dbRes = CCrmContact::GetListEx(array(), array('=ID' => $arField["VALUE"], 'CHECK_PERMISSIONS' => 'N'), false, false, array('PHOTO'));
if (($arRes = $dbRes->Fetch()) && intval($arRes["PHOTO"]) > 0) {
$arFileTmp = CFile::ResizeImageGet($arRes["PHOTO"], array('width' => 39, 'height' => 39), BX_RESIZE_IMAGE_EXACT, false);
if (is_array($arFileTmp) && isset($arFileTmp["src"])) {
$strResult .= '<img width="39" height="39" src="' . $arFileTmp['src'] . '" alt="">';
}
}
$strResult .= '</span>';
$strResult .= CCrmViewHelper::PrepareEntityBaloonHtml(array('ENTITY_TYPE_ID' => CCrmOwnerType::Contact, 'ENTITY_ID' => $arField["VALUE"], 'PREFIX' => "", 'CLASS_NAME' => '', 'CHECK_PERMISSIONS' => 'N'));
$strResult .= '</div>';
示例12: ShowError
$sExportType = '';
}
}
if (!empty($sExportType) && $CCrmPerms->HavePerm('DEAL', BX_CRM_PERM_NONE, 'EXPORT')) {
ShowError(GetMessage('CRM_PERMISSION_DENIED'));
return;
}
$isInExportMode = $sExportType !== '';
$CCrmUserType = new CCrmUserType($USER_FIELD_MANAGER, CCrmDeal::$sUFEntityID);
$arResult['GRID_ID'] = 'CRM_DEAL_LIST_V12' . ($bInternal && !empty($arParams['GRID_ID_SUFFIX']) ? '_' . $arParams['GRID_ID_SUFFIX'] : '');
$arResult['TYPE_LIST'] = CCrmStatus::GetStatusListEx('DEAL_TYPE');
$arResult['STAGE_LIST'] = CCrmStatus::GetStatusListEx('DEAL_STAGE');
/*$arResult['STATE_LIST'] = CCrmStatus::GetStatusListEx('DEAL_STATE');*/
// Please, uncomment if required
//$arResult['CURRENCY_LIST'] = CCrmCurrencyHelper::PrepareListItems();
$arResult['EVENT_LIST'] = CCrmStatus::GetStatusListEx('EVENT_TYPE');
$arResult['CLOSED_LIST'] = array('Y' => GetMessage('MAIN_YES'), 'N' => GetMessage('MAIN_NO'));
$arResult['FILTER'] = array();
$arResult['FILTER2LOGIC'] = array();
$arResult['FILTER_PRESETS'] = array();
$arResult['PERMS']['ADD'] = !$CCrmPerms->HavePerm('DEAL', BX_CRM_PERM_NONE, 'ADD');
$arResult['PERMS']['WRITE'] = !$CCrmPerms->HavePerm('DEAL', BX_CRM_PERM_NONE, 'WRITE');
$arResult['PERMS']['DELETE'] = !$CCrmPerms->HavePerm('DEAL', BX_CRM_PERM_NONE, 'DELETE');
$arResult['AJAX_MODE'] = isset($arParams['AJAX_MODE']) ? $arParams['AJAX_MODE'] : ($arResult['INTERNAL'] ? 'N' : 'Y');
$arResult['AJAX_ID'] = isset($arParams['AJAX_ID']) ? $arParams['AJAX_ID'] : '';
$arResult['AJAX_OPTION_JUMP'] = isset($arParams['AJAX_OPTION_JUMP']) ? $arParams['AJAX_OPTION_JUMP'] : 'N';
$arResult['AJAX_OPTION_HISTORY'] = isset($arParams['AJAX_OPTION_HISTORY']) ? $arParams['AJAX_OPTION_HISTORY'] : 'N';
$arExternalSales = $arResult['EXTERNAL_SALES'] = CCrmExternalSaleHelper::PrepareListItems();
if (!$bInternal) {
$arResult['FILTER2LOGIC'] = array('TITLE', 'COMMENTS');
ob_start();
示例13: isset
$multi = isset($_REQUEST['MULTI']) && $_REQUEST['MULTI'] == 'Y' ? true : false;
$arFilter = array();
if (is_numeric($search)) {
$arFilter['ID'] = (int) $search;
} else {
if (preg_match('/(.*)\\[(\\d+?)\\]/i' . BX_UTF_PCRE_MODIFIER, $search, $arMatches)) {
$arFilter['ID'] = (int) $arMatches[2];
$arFilter['%FULL_NAME'] = trim($arMatches[1]);
$arFilter['LOGIC'] = 'OR';
} else {
$arFilter['%FULL_NAME'] = trim($search);
$arFilter['%COMPANY_TITLE'] = trim($search);
$arFilter['LOGIC'] = 'OR';
}
}
$arContactTypeList = CCrmStatus::GetStatusListEx('CONTACT_TYPE');
$arSelect = array('ID', 'NAME', 'SECOND_NAME', 'LAST_NAME', 'COMPANY_TITLE', 'PHOTO', 'TYPE_ID');
$arOrder = array('LAST_NAME' => 'ASC', 'NAME' => 'ASC');
$arData = array();
$obRes = CCrmContact::GetList($arOrder, $arFilter, $arSelect, $nPageTop);
$arFiles = array();
$i = 0;
$contactIndex = array();
$contactTypes = CCrmStatus::GetStatusList('CONTACT_TYPE');
while ($arRes = $obRes->Fetch()) {
$photoID = intval($arRes['PHOTO']);
if ($photoID > 0 && !isset($arFiles[$photoID])) {
$arFiles[$photoID] = CFile::ResizeImageGet($photoID, array('width' => 25, 'height' => 25), BX_RESIZE_IMAGE_EXACT);
}
// advanced info
$advancedInfo = array();
示例14: array
}
if ($arParams['ROLE_ID'] <= 0) {
$arResult['ROLE']['ID'] = 0;
$arResult['ROLE']['NAME'] = '';
}
$arResult['ROLE_PERMS'] = array();
}
if ($arParams['ROLE_ID'] > 0 && !$bVarsFromForm) {
$arResult['~ROLE_PERMS'] = CCrmRole::GetRolePerms($arParams['ROLE_ID']);
}
if (!$bVarsFromForm) {
$arResult['ROLE_PERMS'] = $arResult['~ROLE_PERMS'];
}
$arResult['ENTITY'] = array('CONTACT' => GetMessage('CRM_ENTITY_TYPE_CONTACT'), 'COMPANY' => GetMessage('CRM_ENTITY_TYPE_COMPANY'), 'DEAL' => GetMessage('CRM_ENTITY_TYPE_DEAL'), 'LEAD' => GetMessage('CRM_ENTITY_TYPE_LEAD'), 'QUOTE' => GetMessage('CRM_ENTITY_TYPE_QUOTE'), 'INVOICE' => GetMessage('CRM_ENTITY_TYPE_INVOICE'));
$arPerms = array('READ', 'ADD', 'WRITE', 'DELETE', 'EXPORT', 'IMPORT');
$arResult['ENTITY_FIELDS'] = array('DEAL' => array('STAGE_ID' => CCrmStatus::GetStatusListEx('DEAL_STAGE')), 'LEAD' => array('STATUS_ID' => CCrmStatus::GetStatusListEx('STATUS')));
$arResult['ROLE_PERM']['LEAD'] = $arResult['ROLE_PERM']['DEAL'] = $arResult['ROLE_PERM']['QUOTE'] = $arResult['ROLE_PERM']['INVOICE'] = $arResult['ROLE_PERM']['COMPANY'] = $arResult['ROLE_PERM']['CONTACT'] = array(BX_CRM_PERM_NONE => GetMessage('CRM_PERMS_TYPE_' . BX_CRM_PERM_NONE), BX_CRM_PERM_SELF => GetMessage('CRM_PERMS_TYPE_' . BX_CRM_PERM_SELF), BX_CRM_PERM_DEPARTMENT => GetMessage('CRM_PERMS_TYPE_' . BX_CRM_PERM_DEPARTMENT), BX_CRM_PERM_SUBDEPARTMENT => GetMessage('CRM_PERMS_TYPE_' . BX_CRM_PERM_SUBDEPARTMENT), BX_CRM_PERM_OPEN => GetMessage('CRM_PERMS_TYPE_' . BX_CRM_PERM_OPEN), BX_CRM_PERM_ALL => GetMessage('CRM_PERMS_TYPE_' . BX_CRM_PERM_ALL));
unset($arResult['ROLE_PERM']['INVOICE'][BX_CRM_PERM_OPEN]);
$arResult['PATH_TO_ROLE_DELETE'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_ROLE_EDIT'], array('role_id' => $arResult['ROLE']['ID'])), array('delete' => '1', 'sessid' => bitrix_sessid()));
foreach ($arPerms as $perm) {
foreach ($arResult['ENTITY'] as $entityType => $entityName) {
if (isset($arResult['ENTITY_FIELDS'][$entityType])) {
foreach ($arResult['ENTITY_FIELDS'][$entityType] as $fieldID => $arFieldValue) {
foreach ($arFieldValue as $fieldValueID => $fieldValue) {
if (!isset($arResult['ROLE_PERMS'][$entityType][$perm][$fieldID][$fieldValueID]) || $arResult['ROLE_PERMS'][$entityType][$perm][$fieldID][$fieldValueID] == '-') {
$arResult['ROLE_PERMS'][$entityType][$perm][$fieldID][$fieldValueID] = $arResult['ROLE_PERMS'][$entityType][$perm]['-'];
}
}
}
}
}
示例15: CCrmPerms
return;
}
global $APPLICATION;
$CCrmPerms = new CCrmPerms($USER->GetID());
if (!$USER->IsAuthorized() || $CCrmPerms->HavePerm('CONTACT', BX_CRM_PERM_NONE)) {
return;
}
$arResult = array();
$_GET['USER_ID'] = preg_replace('/^(CONTACT|COMPANY|LEAD|DEAL)_/i' . BX_UTF_PCRE_MODIFIER, '', $_GET['USER_ID']);
$iContactId = (int) $_GET['USER_ID'];
if ($iContactId > 0) {
__IncludeLang(dirname(__FILE__) . '/lang/' . LANGUAGE_ID . '/' . basename(__FILE__));
$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');
$arResult['TYPE_LIST'] = CCrmStatus::GetStatusListEx('CONTACT_TYPE');
$obRes = CCrmContact::GetList(array(), array('ID' => $iContactId));
$arContact = $obRes->Fetch();
if ($arContact == false) {
return;
}
$res = CCrmFieldMulti::GetList(array('ID' => 'asc'), array('ENTITY_ID' => 'CONTACT', 'ELEMENT_ID' => $iContactId));
while ($ar = $res->Fetch()) {
if (empty($arContact[$ar['COMPLEX_ID']])) {
$arContact[$ar['COMPLEX_ID']] = CCrmFieldMulti::GetTemplateByComplex($ar['COMPLEX_ID'], $ar['VALUE']);
}
}
$arContact['PATH_TO_CONTACT_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_CONTACT_SHOW'], array('contact_id' => $iContactId));
$arContact['PATH_TO_CONTACT_EDIT'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_CONTACT_EDIT'], array('contact_id' => $iContactId));
$arContact['PATH_TO_COMPANY_SHOW'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_COMPANY_SHOW'], array('company_id' => $arContact['COMPANY_ID']));
$strCard = '