} } } } else { $resetInputSettings = true; } $property = $_POST; $relations = $_POST['RELATIONS']; } else { $relations = array(); // 2. load property from database if ($property = $existentProperty) { $personTypeId = $property['PERSON_TYPE_ID']; $property += $property['SETTINGS']; // load relations $result = CSaleOrderProps::GetOrderPropsRelations(array('PROPERTY_ID' => $propertyId)); while ($row = $result->Fetch()) { $relations[$row['ENTITY_TYPE']][] = $row['ENTITY_ID']; } } else { $propertyId = null; $property = array('TYPE' => 'STRING', 'PERSON_TYPE_ID' => $personTypeId); } } // 4. check requested person type if (!($personType = $personTypes[$personTypeId])) { LocalRedirect('sale_order_props.php?lang=' . LANG . GetFilterParams('filter_', false)); } // SETTINGS //////////////////////////////////////////////////////////////////////////////////////////////////////////// // input settings $inputSettings = Input\Manager::getSettings($property, $reload);
<!-- delivery system relations control --> <tr> <td width="40%"> <?php echo GetMessage("SALE_PROPERTY_DELIVERY"); ?> : </td> <td width="60%"> <select multiple="multiple" size="5" name="DELIVERY_SYSTEM_ID[]"> <?php $arDeliverySystemID = array(); if (isset($_POST["DELIVERY_SYSTEM_ID"]) && is_array($_POST["DELIVERY_SYSTEM_ID"])) { $arDeliverySystemID = $_POST["DELIVERY_SYSTEM_ID"]; } else { $dbRes = CSaleOrderProps::GetOrderPropsRelations(array("PROPERTY_ID" => $ID, "ENTITY_TYPE" => "D")); while ($arRes = $dbRes->Fetch()) { $arDeliverySystemID[] = $arRes["ENTITY_ID"]; } } ?> <option value="" <?php echo count($arDeliverySystemID) <= 0 ? "selected" : ""; ?> ><?php echo GetMessage("SALE_PROPERTY_SELECT_ALL"); ?> </option> <?php $arDeliveryOptions = array(); $dbResultList = CSaleDelivery::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("ACTIVE" => "Y"), false, false, array("ID", "NAME", "ACTIVE", "SORT"));