Example #1
0
 function SaveParams()
 {
     if (CModule::IncludeModule("properties_order") && !empty($_POST)) {
         $parametersProperty = new fr_ParameterProperties();
         $parametersProperty->setMODULEID("properties_order");
         foreach ($_POST["name"] as $key => $name) {
             $parametersProperty->createParameterProperty($name, $_POST["descript"][$key]);
         }
         return true;
     } else {
         return false;
     }
 }
Example #2
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/local/modules/properties_order/classes/general/fr_ParameterProperties.php";
include $_SERVER['DOCUMENT_ROOT'] . "/local/modules/properties_order/classes/general/fr_PropertiesOrder.php";
$parameterProperties = new fr_ParameterProperties();
if (!empty($_POST["name"]) && !empty($_POST["descript"])) {
    foreach ($_POST["name"] as $key => $name) {
        $parameterProperties->createParameterProperty($name, $_POST["descript"][$key]);
    }
    $PropertiesOrder = new fr_PropertiesOrder();
    $arPropertiesOrder = array();
    foreach ($_POST["name"] as $key => $name) {
        $arPropertiesOrder[] = array("NAME" => $_POST["descript"][$key], "CODE" => strtoupper("FR_" . $name));
    }
    $PropertiesOrder->createPropertiesOrder($arPropertiesOrder);
}
$arParameters = $parameterProperties->getArrayParameters();
?>
<form action="<?php 
echo $APPLICATION->GetCurPageParam();
?>
" method="post">
    <div id="parentId">
    <?php 
$i = 1;
foreach ($arParameters as $key => $value) {
    ?>
            <div>
                <nobr>
                    <input name="name[<?php 
    echo $i;