Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
$rootActivity = $this->GetRootActivity(); use Bitrix\Crm\Item; use Bitrix\Crm\Service; ..
Decoded Output download
<? $rootActivity = $this->GetRootActivity();
use Bitrix\Crm\Item;
use Bitrix\Crm\Service;
use Bitrix\Crm\Relation;
use Bitrix\Crm\ItemIdentifier;
use Bitrix\Crm\Service\Container;
use Bitrix\Crm\Relation\StorageStrategy;
Bitrix\Main\Loader::includeModule("crm");
CModule::IncludeModule("iblock");
$dealId = (int)'{{ID}}';
$entityTypeId = 164;
$counter = 0;
// ID
//$parent = new ItemIdentifier(\CCrmOwnerType::Deal, $dealId);
//$childEntity = (new StorageStrategy\EntityRelationTable())->getChildElements($parent, $entityTypeId);
$childEntity = '{=Variable:childEntity}';
$container = Service\Container::getInstance();
$factory = $container->getFactory($entityTypeId);
//$container = Service\Container::getInstance();
//$factory = $container->getFactory($entityTypeId);
foreach ($childEntity as $key => $entityId) {
$Ind = '';
$CTM = '{=Constant:CTM_text}';
$Code = '{=Variable:ClientNum}';
$Num = '';
$Name = '';
$Material = '';
$Type = '';
$Length = '';
$Width = '';
$Height = '';
$Out500 = '';
$List = '';
$BlankAmount = '';
$VolAmount = '';
$Amount = '';
$prod_id = $entityId->getEntityId();
$prod = $factory->getItem($prod_id);
if ($prod === NULL) {
continue;
}
$prod_data = $prod->getCompatibleData(\Bitrix\Main\ORM\Objectify\Values::ALL);
$counter += 1;
// Ind
$Ind = $counter;
$this -> SetVariable('Ind'.$counter, $Ind);
// CTM
$this -> SetVariable('CTM'.$counter, $CTM);
// Code
$this -> SetVariable('Code'.$counter, $Code);
// Num
$Num = explode('.', $prod_data['TITLE']);
array_shift($Num);
array_shift($Num);
$Num = implode('.', $Num);
$Num = explode('-', $Num);
array_pop($Num);
$Num = implode('', $Num);
$this -> SetVariable('Num'.$counter, $Num);
// Name
$name = $prod_data['UF_CRM_4_1652940331667'];
$this -> SetVariable('Name'.$counter, $name);
// Material
$material_data = CIBlockElement::GetList(
array(),
array(
"ID" => $prod_data['UF_CRM_4_MATERIAL_TYPE'],
"IBLOCK_ID" => 38,
),
false,
array(),
array(
'NAME'
)
)->GetNext();
$this -> SetVariable('Material'.$counter, $material_data['NAME']);
// Type
$Type_data = CIBlockElement::GetList(
array(),
array(
"ID" => $prod_data['UF_CRM_4_WORKPIECE_TYPE'],
"IBLOCK_ID" => 37,
),
false,
array(),
array(
'NAME'
)
)->GetNext();
$this -> SetVariable('Type'.$counter, $Type_data['NAME']);
// Length
if (strlen(strval($prod_data['UF_CRM_4_1657008197'])) > 0 && (float)$prod_data['UF_CRM_4_1657008197'] > 0) {
$Length = $prod_data['UF_CRM_4_1657008197'];
} else {
$Length = '';
}
$this -> SetVariable('Length'.$counter, $Length);
// Width
if (strlen(strval($prod_data['UF_CRM_4_1657006606'])) > 0 && (float)$prod_data['UF_CRM_4_1657006606'] > 0) {
$Width = $prod_data['UF_CRM_4_1657006606'];
} else {
$Width = '';
}
$this -> SetVariable('Width'.$counter, $Width);
// Height
if (strlen(strval($prod_data['UF_CRM_4_1657008231'])) > 0 && (float)$prod_data['UF_CRM_4_1657008231'] > 0) {
$Height = $prod_data['UF_CRM_4_1657008231'];
} else {
$Height = '';
}
$this -> SetVariable('Height'.$counter, $Height);
// Out500
if (strlen(strval($prod_data['UF_CRM_4_1657008197'])) > 0 && (float)$prod_data['UF_CRM_4_1657008197'] > 0) {
$Out500 = floor(500 / (float)$prod_data['UF_CRM_4_1657008197'] * 10) / 10;
} else {
$Out500 = '';
}
$this -> SetVariable('Out500_'.$counter, $Out500);
// List
$List = $prod_data['UF_CRM_4_1722859254'];
$this -> SetVariable('List'.$counter, $List);
// BlankAmount
$BlankAmount = $prod_data['UF_CRM_4_1728728898'];
$this -> SetVariable('BlankAmount'.$counter, $BlankAmount);
// VolAmount
$VolAmount = $prod_data['UF_CRM_4_WORKPIECE_TOTAL_LENGTH'];
$this -> SetVariable('VolAmount'.$counter, $VolAmount);
// Amount
$Amount = ceil((float)$prod_data['UF_CRM_4_WORKPIECE_TOTAL_LENGTH'] / 0.5);
$this -> SetVariable('Amount'.$counter, $Amount);
}
$this -> SetVariable('products_amount', $counter); ?>
Did this file decode correctly?
Original Code
$rootActivity = $this->GetRootActivity();
use Bitrix\Crm\Item;
use Bitrix\Crm\Service;
use Bitrix\Crm\Relation;
use Bitrix\Crm\ItemIdentifier;
use Bitrix\Crm\Service\Container;
use Bitrix\Crm\Relation\StorageStrategy;
Bitrix\Main\Loader::includeModule("crm");
CModule::IncludeModule("iblock");
$dealId = (int)'{{ID}}';
$entityTypeId = 164;
$counter = 0;
// ID
//$parent = new ItemIdentifier(\CCrmOwnerType::Deal, $dealId);
//$childEntity = (new StorageStrategy\EntityRelationTable())->getChildElements($parent, $entityTypeId);
$childEntity = '{=Variable:childEntity}';
$container = Service\Container::getInstance();
$factory = $container->getFactory($entityTypeId);
//$container = Service\Container::getInstance();
//$factory = $container->getFactory($entityTypeId);
foreach ($childEntity as $key => $entityId) {
$Ind = '';
$CTM = '{=Constant:CTM_text}';
$Code = '{=Variable:ClientNum}';
$Num = '';
$Name = '';
$Material = '';
$Type = '';
$Length = '';
$Width = '';
$Height = '';
$Out500 = '';
$List = '';
$BlankAmount = '';
$VolAmount = '';
$Amount = '';
$prod_id = $entityId->getEntityId();
$prod = $factory->getItem($prod_id);
if ($prod === NULL) {
continue;
}
$prod_data = $prod->getCompatibleData(\Bitrix\Main\ORM\Objectify\Values::ALL);
$counter += 1;
// Ind
$Ind = $counter;
$this -> SetVariable('Ind'.$counter, $Ind);
// CTM
$this -> SetVariable('CTM'.$counter, $CTM);
// Code
$this -> SetVariable('Code'.$counter, $Code);
// Num
$Num = explode('.', $prod_data['TITLE']);
array_shift($Num);
array_shift($Num);
$Num = implode('.', $Num);
$Num = explode('-', $Num);
array_pop($Num);
$Num = implode('', $Num);
$this -> SetVariable('Num'.$counter, $Num);
// Name
$name = $prod_data['UF_CRM_4_1652940331667'];
$this -> SetVariable('Name'.$counter, $name);
// Material
$material_data = CIBlockElement::GetList(
array(),
array(
"ID" => $prod_data['UF_CRM_4_MATERIAL_TYPE'],
"IBLOCK_ID" => 38,
),
false,
array(),
array(
'NAME'
)
)->GetNext();
$this -> SetVariable('Material'.$counter, $material_data['NAME']);
// Type
$Type_data = CIBlockElement::GetList(
array(),
array(
"ID" => $prod_data['UF_CRM_4_WORKPIECE_TYPE'],
"IBLOCK_ID" => 37,
),
false,
array(),
array(
'NAME'
)
)->GetNext();
$this -> SetVariable('Type'.$counter, $Type_data['NAME']);
// Length
if (strlen(strval($prod_data['UF_CRM_4_1657008197'])) > 0 && (float)$prod_data['UF_CRM_4_1657008197'] > 0) {
$Length = $prod_data['UF_CRM_4_1657008197'];
} else {
$Length = '';
}
$this -> SetVariable('Length'.$counter, $Length);
// Width
if (strlen(strval($prod_data['UF_CRM_4_1657006606'])) > 0 && (float)$prod_data['UF_CRM_4_1657006606'] > 0) {
$Width = $prod_data['UF_CRM_4_1657006606'];
} else {
$Width = '';
}
$this -> SetVariable('Width'.$counter, $Width);
// Height
if (strlen(strval($prod_data['UF_CRM_4_1657008231'])) > 0 && (float)$prod_data['UF_CRM_4_1657008231'] > 0) {
$Height = $prod_data['UF_CRM_4_1657008231'];
} else {
$Height = '';
}
$this -> SetVariable('Height'.$counter, $Height);
// Out500
if (strlen(strval($prod_data['UF_CRM_4_1657008197'])) > 0 && (float)$prod_data['UF_CRM_4_1657008197'] > 0) {
$Out500 = floor(500 / (float)$prod_data['UF_CRM_4_1657008197'] * 10) / 10;
} else {
$Out500 = '';
}
$this -> SetVariable('Out500_'.$counter, $Out500);
// List
$List = $prod_data['UF_CRM_4_1722859254'];
$this -> SetVariable('List'.$counter, $List);
// BlankAmount
$BlankAmount = $prod_data['UF_CRM_4_1728728898'];
$this -> SetVariable('BlankAmount'.$counter, $BlankAmount);
// VolAmount
$VolAmount = $prod_data['UF_CRM_4_WORKPIECE_TOTAL_LENGTH'];
$this -> SetVariable('VolAmount'.$counter, $VolAmount);
// Amount
$Amount = ceil((float)$prod_data['UF_CRM_4_WORKPIECE_TOTAL_LENGTH'] / 0.5);
$this -> SetVariable('Amount'.$counter, $Amount);
}
$this -> SetVariable('products_amount', $counter);
Function Calls
None |
Stats
MD5 | b68117420a334ac370586cece32f095c |
Eval Count | 0 |
Decode Time | 79 ms |