if ($_REQUEST["ACTION"] == "GETDOCUMENTS") {
$documents = array();
$documents_db = CIBlockElement::GetList(
array(
"ACTIVE" => "DESC",
"DATE_CREATE" => "DESC"
),
array(
"IBLOCK_ID" => IBLOCK_DEALS_PATTERN,
"CODE" => $deal["ID"]
),
false,
false,
array()
);
while ($document = $documents_db->GetNext()) {
$documents[] = $document;
}
if ($deal["IBLOCK_ID"] == IBLOCK_DEALS) {
$db_props = CIBlockElement::GetProperty(
IBLOCK_DEALS,
$deal["ID"],
array(),
array("CODE" => "STATUS")
);
$status_link = $db_props->GetNext();
$db_props = CIBlockElement::GetProperty(
IBLOCK_GUIDES_STATUSDEALS,
$status_link["VALUE"],
array(),
array("CODE" => "CODE")
);
$status = $db_props->GetNext();
} elseif ($deal["IBLOCK_ID"] == IBLOCK_CLAIMS) {
$db_props = CIBlockElement::GetProperty(
IBLOCK_CLAIMS,
$deal["ID"],
array(),
array("CODE" => "STATUS")
);
$status_link = $db_props->GetNext();
$db_props = CIBlockElement::GetProperty(
IBLOCK_GUIDES_STATUSCLAIM,
$status_link["VALUE"],
array(),
array("CODE" => "CODE")
);
$status = $db_props->GetNext();
}
© 2021 Quttera Ltd. All rights reserved.