function RestoreFormValues()
 {
     global $objForm, $t_region_du_monde;
     $t_region_du_monde->id->CurrentValue = ew_ConvertToUtf8($t_region_du_monde->id->FormValue);
     $t_region_du_monde->nom->CurrentValue = ew_ConvertToUtf8($t_region_du_monde->nom->FormValue);
 }
Esempio n. 2
0
function GetLookupValues($Sql)
{
    global $LnkType, $LnkFld, $LnkCount, $LnkDisp1, $LnkDisp2;
    $conn = ew_Connect();
    if ($rs = $conn->Execute($Sql)) {
        $rsarr = $rs->GetRows();
        $rs->Close();
    }
    $conn->Close();
    // Output
    if (is_array($rsarr) && count($rsarr) > 0) {
        if ($LnkType == "2") {
            // Auto fill
            $i = 0;
            while ($i < count($rsarr[0]) - 1) {
                $str = $rsarr[0][$i];
                $str = ew_RemoveCrLf($str);
                if (strval($rsarr[0][$i + 1]) != "") {
                    $str .= ", " . ew_RemoveCrLf(strval($rsarr[0][$i + 1]));
                }
                echo ew_ConvertToUtf8($str) . "\r";
                $i += 2;
            }
        } else {
            $rsarrcnt = count($rsarr);
            for ($i = 0; $i < $rsarrcnt; $i++) {
                if (intval(count($rsarr[$i]) / 2) == intval($LnkCount)) {
                    // Process link field
                    if ($LnkType != "1") {
                        $str = $rsarr[$i][$LnkFld];
                        $str = ew_RemoveCrLf($str);
                        echo ew_ConvertToUtf8($str) . "\r";
                    }
                    // Process display field
                    if (intval($LnkDisp1) >= 0) {
                        $str = $rsarr[$i][$LnkDisp1];
                        $str = ew_RemoveCrLf($str);
                    } else {
                        $str = "";
                    }
                    echo ew_ConvertToUtf8($str) . "\r";
                    // Process display field 2
                    if (intval($LnkDisp2) >= 0) {
                        $str = $rsarr[$i][$LnkDisp2];
                        $str = ew_RemoveCrLf($str);
                    } else {
                        $str = "";
                    }
                    echo ew_ConvertToUtf8($str) . "\r";
                }
            }
        }
    }
}
Esempio n. 3
0
 function GetLookupValues($Sql)
 {
     $rsarr = array();
     $rowcnt = 0;
     $conn = ew_Connect();
     if ($rs = $conn->Execute($Sql)) {
         $rowcnt = $rs->RecordCount();
         $fldcnt = $rs->FieldCount();
         $rsarr = $rs->GetRows();
         $rs->Close();
     }
     $conn->Close();
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = $this->RemoveDelimiters($str);
                 echo ew_ConvertToUtf8($str . EW_FIELD_DELIMITER);
             }
             echo ew_ConvertToUtf8(EW_RECORD_DELIMITER);
         }
     }
 }
 function RestoreFormValues()
 {
     global $Ingredients;
     $Ingredients->IngredientID->CurrentValue = ew_ConvertToUtf8($Ingredients->IngredientID->FormValue);
     $Ingredients->IngredientName->CurrentValue = ew_ConvertToUtf8($Ingredients->IngredientName->FormValue);
     $Ingredients->allergen->CurrentValue = ew_ConvertToUtf8($Ingredients->allergen->FormValue);
 }
Esempio n. 5
0
 function AddField($name, $value)
 {
     if (is_null($value)) {
         $value = $this->NullValue;
     }
     if (EW_IS_PHP5) {
         $value = ew_ConvertToUtf8($value);
         // Convert to UTF-8
         $xmlfld = $this->XmlDoc->createElement($name);
         $this->XmlRow->appendChild($xmlfld);
         $xmlfld->appendChild($this->XmlDoc->createTextNode($value));
     } else {
         $value = ew_Convert(EW_ENCODING, EW_XML_ENCODING, $value);
         // Convert to output encoding
         $this->XML .= "<{$name}>" . htmlspecialchars($value) . "</{$name}>";
     }
 }
Esempio n. 6
0
 function GetLookupValues($sql)
 {
     $rsarr = array();
     $rowcnt = 0;
     $conn = ew_Connect();
     if ($rs = $conn->Execute($sql)) {
         $rowcnt = $rs->RecordCount();
         $fldcnt = $rs->FieldCount();
         $rsarr = $rs->GetRows();
         $rs->Close();
     }
     $conn->Close();
     // Clean output buffer
     if (!EW_DEBUG_ENABLED && ob_get_length()) {
         ob_end_clean();
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
     }
     echo ew_ArrayToJson($rsarr);
 }
Esempio n. 7
0
 function RestoreFormValues()
 {
     global $Menus;
     $Menus->MenuID->CurrentValue = ew_ConvertToUtf8($Menus->MenuID->FormValue);
     $Menus->MenuName->CurrentValue = ew_ConvertToUtf8($Menus->MenuName->FormValue);
     $Menus->Sequence->CurrentValue = ew_ConvertToUtf8($Menus->Sequence->FormValue);
     $Menus->Active->CurrentValue = ew_ConvertToUtf8($Menus->Active->FormValue);
     $Menus->packing_slip_sequence->CurrentValue = ew_ConvertToUtf8($Menus->packing_slip_sequence->FormValue);
 }
 function RestoreFormValues()
 {
     global $objForm;
     $this->vl_media_type_name->CurrentValue = ew_ConvertToUtf8($this->vl_media_type_name->FormValue);
 }
Esempio n. 9
0
 function RestoreFormValues()
 {
     global $objForm;
     $this->cuit_cuil->CurrentValue = ew_ConvertToUtf8($this->cuit_cuil->FormValue);
     $this->razon_social->CurrentValue = ew_ConvertToUtf8($this->razon_social->FormValue);
     $this->responsable->CurrentValue = ew_ConvertToUtf8($this->responsable->FormValue);
     $this->tel->CurrentValue = ew_ConvertToUtf8($this->tel->FormValue);
     $this->cel->CurrentValue = ew_ConvertToUtf8($this->cel->FormValue);
     $this->_email->CurrentValue = ew_ConvertToUtf8($this->_email->FormValue);
     $this->direccion->CurrentValue = ew_ConvertToUtf8($this->direccion->FormValue);
     $this->id_localidad->CurrentValue = ew_ConvertToUtf8($this->id_localidad->FormValue);
 }
Esempio n. 10
0
        exit;
    }
} else {
    $rs->Close();
    ob_end_clean();
    echo "Option already exists";
    exit;
}
if ($LinkField == "") {
    // Get new link field value
    $sSql = "SELECT " . EW_DB_QUOTE_START . $LinkFieldName . EW_DB_QUOTE_END . " FROM " . EW_DB_QUOTE_START . $LookupTableName . EW_DB_QUOTE_END . " WHERE " . $Where;
    if ($rs = $conn->Execute($sSql)) {
        if (!$rs->EOF) {
            $LinkField = $rs->fields[0];
            if ($DisplayFieldName == $LinkFieldName) {
                $DisplayField = $LinkField;
            }
            if ($DisplayField2Name == $LinkFieldName) {
                $DisplayField2 = $LinkField;
            }
        }
        $rs->Close();
    }
}
$conn->Close();
ob_end_clean();
echo "OK\r";
echo ew_ConvertToUtf8($LinkField) . "\r";
echo ew_ConvertToUtf8($DisplayField) . "\r";
echo ew_ConvertToUtf8($DisplayField2);
exit;
 function RestoreFormValues()
 {
     global $objForm, $t_sous_regions;
     $t_sous_regions->id->CurrentValue = ew_ConvertToUtf8($t_sous_regions->id->FormValue);
     $t_sous_regions->nom->CurrentValue = ew_ConvertToUtf8($t_sous_regions->nom->FormValue);
     $t_sous_regions->regions->CurrentValue = ew_ConvertToUtf8($t_sous_regions->regions->FormValue);
 }
Esempio n. 12
0
 function RestoreFormValues()
 {
     global $objForm, $t_stockage;
     $t_stockage->id->CurrentValue = ew_ConvertToUtf8($t_stockage->id->FormValue);
     $t_stockage->emplacement->CurrentValue = ew_ConvertToUtf8($t_stockage->emplacement->FormValue);
 }
Esempio n. 13
0
 function RestoreFormValues()
 {
     global $objForm;
     $this->id_rubro->CurrentValue = ew_ConvertToUtf8($this->id_rubro->FormValue);
     $this->actividad->CurrentValue = ew_ConvertToUtf8($this->actividad->FormValue);
     $this->descripcion->CurrentValue = ew_ConvertToUtf8($this->descripcion->FormValue);
     $this->activa->CurrentValue = ew_ConvertToUtf8($this->activa->FormValue);
 }
Esempio n. 14
0
 function RestoreFormValues()
 {
     global $objForm, $v_all_vins;
     $v_all_vins->id->CurrentValue = ew_ConvertToUtf8($v_all_vins->id->FormValue);
     $v_all_vins->label->CurrentValue = ew_ConvertToUtf8($v_all_vins->label->FormValue);
 }
Esempio n. 15
0
 function GetAutoFill($id, $val)
 {
     $rsarr = array();
     $rowcnt = 0;
     if (preg_match('/^x(\\d)*_id_cliente$/', $id)) {
         $sSqlWrk = "SELECT `direccion` AS FIELD0, `direccion` AS FIELD1, `id_localidad` AS FIELD2, `id_localidad` AS FIELD3 FROM `clientes`";
         $sWhereWrk = "(`codigo` = " . ew_AdjustSql($val) . ")";
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_cliente, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `razon_social` ASC";
         if ($rs = ew_LoadRecordset($sSqlWrk)) {
             while ($rs && !$rs->EOF) {
                 $ar = array();
                 $this->Origen->setDbValue($rs->fields[0]);
                 $this->Destino->setDbValue($rs->fields[1]);
                 $this->id_localidad_origen->setDbValue($rs->fields[2]);
                 $this->id_localidad_destino->setDbValue($rs->fields[3]);
                 $this->RowType == EW_ROWTYPE_EDIT;
                 $this->RenderEditRow();
                 $ar[] = $this->Origen->AutoFillOriginalValue ? $this->Origen->CurrentValue : $this->Origen->EditValue;
                 $ar[] = $this->Destino->AutoFillOriginalValue ? $this->Destino->CurrentValue : $this->Destino->EditValue;
                 $ar[] = $this->id_localidad_origen->CurrentValue;
                 $ar[] = $this->id_localidad_destino->CurrentValue;
                 $rowcnt += 1;
                 $rsarr[] = $ar;
                 $rs->MoveNext();
             }
             $rs->Close();
         }
     }
     if (preg_match('/^x(\\d)*_id_tipo_carga$/', $id)) {
         $sSqlWrk = "SELECT `precio_base` AS FIELD0, `porcentaje_comision` AS FIELD1 FROM `tipo_cargas`";
         $sWhereWrk = "(`codigo` = " . ew_AdjustSql($val) . ")";
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_tipo_carga, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `Tipo_carga` ASC";
         if ($rs = ew_LoadRecordset($sSqlWrk)) {
             while ($rs && !$rs->EOF) {
                 $ar = array();
                 $this->tarifa->setDbValue($rs->fields[0]);
                 $this->porcentaje->setDbValue($rs->fields[1]);
                 $this->RowType == EW_ROWTYPE_EDIT;
                 $this->RenderEditRow();
                 $ar[] = $this->tarifa->AutoFillOriginalValue ? $this->tarifa->CurrentValue : $this->tarifa->EditValue;
                 $ar[] = $this->porcentaje->AutoFillOriginalValue ? $this->porcentaje->CurrentValue : $this->porcentaje->EditValue;
                 $rowcnt += 1;
                 $rsarr[] = $ar;
                 $rs->MoveNext();
             }
             $rs->Close();
         }
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         $fldcnt = count($rsarr[0]);
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
         return ew_ArrayToJson($rsarr);
     } else {
         return FALSE;
     }
 }
Esempio n. 16
0
function ew_JsEncode($val)
{
    $val = strval($val);
    if (EW_IS_DOUBLE_BYTE) {
        $val = ew_ConvertToUtf8($val);
    }
    $val = str_replace("\\", "\\\\", $val);
    $val = str_replace("'", "\\'", $val);
    $val = str_replace("\r\n", "<br>", $val);
    $val = str_replace("\r", "<br>", $val);
    $val = str_replace("\n", "<br>", $val);
    if (EW_IS_DOUBLE_BYTE) {
        $val = ew_ConvertFromUtf8($val);
    }
    return $val;
}
Esempio n. 17
0
 function GetLookupValues($sql, $dbid)
 {
     $rsarr = array();
     $rowcnt = 0;
     if ($rs = Conn($dbid)->Execute($sql)) {
         $rowcnt = $rs->RecordCount();
         $fldcnt = $rs->FieldCount();
         $rsarr = $rs->GetRows();
         $rs->Close();
     }
     // Clean output buffer
     if (ob_get_length()) {
         ob_clean();
     }
     // Format date
     $ardt = array();
     for ($j = 0; $j < $fldcnt; $j++) {
         $ardt[$j] = @$_POST["df" . $j];
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if ($ardt[$j] != "" && intval($ardt[$j]) > 0) {
                     // Format date
                     $str = ew_FormatDateTime($str, $ardt[$j]);
                 }
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n", "\t"), array("\\r", "\\n", "\\t"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n", "\t"), array(" ", " ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
     }
     echo ew_ArrayToJson($rsarr);
 }
Esempio n. 18
0
 function RestoreFormValues()
 {
     global $objForm;
     $this->nombre->CurrentValue = ew_ConvertToUtf8($this->nombre->FormValue);
     $this->direccion->CurrentValue = ew_ConvertToUtf8($this->direccion->FormValue);
     $this->fecha_nacimiento->CurrentValue = ew_ConvertToUtf8($this->fecha_nacimiento->FormValue);
     $this->fecha_nacimiento->CurrentValue = ew_UnFormatDateTime($this->fecha_nacimiento->CurrentValue, 7);
     $this->tel->CurrentValue = ew_ConvertToUtf8($this->tel->FormValue);
     $this->cel->CurrentValue = ew_ConvertToUtf8($this->cel->FormValue);
     $this->_email->CurrentValue = ew_ConvertToUtf8($this->_email->FormValue);
     $this->fecha_inicio->CurrentValue = ew_ConvertToUtf8($this->fecha_inicio->FormValue);
     $this->fecha_inicio->CurrentValue = ew_UnFormatDateTime($this->fecha_inicio->CurrentValue, 7);
     $this->cetegoria->CurrentValue = ew_ConvertToUtf8($this->cetegoria->FormValue);
     $this->datos->CurrentValue = ew_ConvertToUtf8($this->datos->FormValue);
 }
Esempio n. 19
0
 function RestoreFormValues()
 {
     global $objForm;
     $this->tipo_gasto->CurrentValue = ew_ConvertToUtf8($this->tipo_gasto->FormValue);
     $this->clase->CurrentValue = ew_ConvertToUtf8($this->clase->FormValue);
 }
 function GetAutoFill($id, $val)
 {
     $rsarr = array();
     $rowcnt = 0;
     if (preg_match('/^x(\\d)*_id_tramite$/', $id)) {
         $sSqlWrk = "SELECT `Titulo` AS FIELD0 FROM `tramites`";
         $sWhereWrk = "(`codigo` = " . ew_AdjustSql($val) . ")";
         $lookuptblfilter = "`estado`<>'F'";
         if (strval($lookuptblfilter) != "") {
             ew_AddFilter($sWhereWrk, $lookuptblfilter);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_tramite, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `fecha` ASC";
         if ($rs = ew_LoadRecordset($sSqlWrk)) {
             while ($rs && !$rs->EOF) {
                 $ar = array();
                 $this->titulo->setDbValue($rs->fields[0]);
                 $this->RowType == EW_ROWTYPE_EDIT;
                 $this->RenderEditRow();
                 $ar[] = $this->titulo->AutoFillOriginalValue ? $this->titulo->CurrentValue : $this->titulo->EditValue;
                 $rowcnt += 1;
                 $rsarr[] = $ar;
                 $rs->MoveNext();
             }
             $rs->Close();
         }
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         $fldcnt = count($rsarr[0]);
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
         return ew_ArrayToJson($rsarr);
     } else {
         return FALSE;
     }
 }
Esempio n. 21
0
 function GetLookupValues($sql)
 {
     $rsarr = array();
     $rowcnt = 0;
     $conn = ew_Connect();
     if ($rs = $conn->Execute($sql)) {
         $rowcnt = $rs->RecordCount();
         $fldcnt = $rs->FieldCount();
         $rsarr = $rs->GetRows();
         $rs->Close();
     }
     $conn->Close();
     // Clean output buffer
     if (!EW_DEBUG_ENABLED && ob_get_length()) {
         ob_end_clean();
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 echo $this->RemoveDelimiters($str) . EW_FIELD_DELIMITER;
             }
             echo ew_ConvertToUtf8(EW_RECORD_DELIMITER);
         }
     }
 }
Esempio n. 22
0
 function RestoreFormValues()
 {
     global $objForm;
     $this->Tipo_carga->CurrentValue = ew_ConvertToUtf8($this->Tipo_carga->FormValue);
     $this->precio_base->CurrentValue = ew_ConvertToUtf8($this->precio_base->FormValue);
     $this->porcentaje_comision->CurrentValue = ew_ConvertToUtf8($this->porcentaje_comision->FormValue);
 }
Esempio n. 23
0
 function AddField($name, $value)
 {
     if (is_null($value)) {
         $value = $this->NullValue;
     }
     $value = ew_ConvertToUtf8($value);
     // Convert to UTF-8
     $xmlfld = $this->XmlDoc->createElement(ew_XmlTagName($name));
     $this->XmlRow->appendChild($xmlfld);
     $xmlfld->appendChild($this->XmlDoc->createTextNode($value));
 }
 function GetAutoFill($id, $val)
 {
     $rsarr = array();
     $rowcnt = 0;
     if (preg_match('/^x(\\d)*_socio_nro$/', $id)) {
         $sSqlWrk = "SELECT `cuit_cuil` AS FIELD0, `propietario` AS FIELD1, `comercio` AS FIELD2 FROM `socios`";
         $sWhereWrk = "(`socio_nro` = " . ew_AdjustSql($val) . ")";
         if (!$GLOBALS["v_total_estado_cuenta_x_anio_mes"]->UserIDAllow("info")) {
             $sWhereWrk = $GLOBALS["socios"]->AddUserIDFilter($sWhereWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->socio_nro, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `comercio` DESC";
         if ($rs = ew_LoadRecordset($sSqlWrk)) {
             while ($rs && !$rs->EOF) {
                 $ar = array();
                 $this->cuit_cuil->setDbValue($rs->fields[0]);
                 $this->propietario->setDbValue($rs->fields[1]);
                 $this->comercio->setDbValue($rs->fields[2]);
                 $this->RowType == EW_ROWTYPE_EDIT;
                 $this->RenderEditRow();
                 $ar[] = $this->cuit_cuil->AutoFillOriginalValue ? $this->cuit_cuil->CurrentValue : $this->cuit_cuil->EditValue;
                 $ar[] = $this->propietario->CurrentValue;
                 $ar[] = $this->comercio->CurrentValue;
                 $rowcnt += 1;
                 $rsarr[] = $ar;
                 $rs->MoveNext();
             }
             $rs->Close();
         }
     }
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         $fldcnt = count($rsarr[0]);
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
         return ew_ArrayToJson($rsarr);
     } else {
         return FALSE;
     }
 }
Esempio n. 25
0
 function RestoreFormValues()
 {
     global $objForm;
     $this->localidad->CurrentValue = ew_ConvertToUtf8($this->localidad->FormValue);
     $this->cp->CurrentValue = ew_ConvertToUtf8($this->cp->FormValue);
     $this->id_provincia->CurrentValue = ew_ConvertToUtf8($this->id_provincia->FormValue);
 }
Esempio n. 26
0
 function RestoreFormValues()
 {
     global $objForm, $t_vins;
     $t_vins->id->CurrentValue = ew_ConvertToUtf8($t_vins->id->FormValue);
     $t_vins->nom->CurrentValue = ew_ConvertToUtf8($t_vins->nom->FormValue);
     $t_vins->producteur->CurrentValue = ew_ConvertToUtf8($t_vins->producteur->FormValue);
     $t_vins->appelation->CurrentValue = ew_ConvertToUtf8($t_vins->appelation->FormValue);
     $t_vins->cepage->CurrentValue = ew_ConvertToUtf8($t_vins->cepage->FormValue);
     $t_vins->cuvee->CurrentValue = ew_ConvertToUtf8($t_vins->cuvee->FormValue);
     $t_vins->categorie->CurrentValue = ew_ConvertToUtf8($t_vins->categorie->FormValue);
     $t_vins->region_du_monde->CurrentValue = ew_ConvertToUtf8($t_vins->region_du_monde->FormValue);
     $t_vins->pays->CurrentValue = ew_ConvertToUtf8($t_vins->pays->FormValue);
     $t_vins->region->CurrentValue = ew_ConvertToUtf8($t_vins->region->FormValue);
     $t_vins->sous_region->CurrentValue = ew_ConvertToUtf8($t_vins->sous_region->FormValue);
 }
Esempio n. 27
0
function ew_CreateImageFromText($txt, $file, $width = EW_UPLOAD_THUMBNAIL_WIDTH, $height = 0, $font = EW_TMP_IMAGE_FONT)
{
    $pt = round(EW_FONT_SIZE / 1.33);
    // 1pt = 1.33px
    $h = $height > 0 ? $height : round(EW_FONT_SIZE / 14 * 20);
    $im = @imagecreate($width, $h);
    $color = @imagecolorallocate($im, 255, 255, 255);
    $color = @imagecolorallocate($im, 0, $h, 0);
    if (strrpos($font, '.') === FALSE) {
        $font .= '.ttf';
    }
    $font = $GLOBALS["EW_FONT_PATH"] . EW_PATH_DELIMITER . $font;
    // Always use full path
    @imagettftext($im, $pt, 0, 0, round(($h - EW_FONT_SIZE) / 2 + EW_FONT_SIZE), $color, $font, ew_ConvertToUtf8($txt));
    @imagepng($im, $file);
    @imagedestroy($im);
}
Esempio n. 28
0
 function RestoreFormValues()
 {
     global $objForm;
     $this->rubro->CurrentValue = ew_ConvertToUtf8($this->rubro->FormValue);
 }
Esempio n. 29
0
 function GetAutoFill($id, $val)
 {
     $rsarr = array();
     $rowcnt = 0;
     // Output
     if (is_array($rsarr) && $rowcnt > 0) {
         $fldcnt = count($rsarr[0]);
         for ($i = 0; $i < $rowcnt; $i++) {
             for ($j = 0; $j < $fldcnt; $j++) {
                 $str = strval($rsarr[$i][$j]);
                 $str = ew_ConvertToUtf8($str);
                 if (isset($post["keepCRLF"])) {
                     $str = str_replace(array("\r", "\n"), array("\\r", "\\n"), $str);
                 } else {
                     $str = str_replace(array("\r", "\n"), array(" ", " "), $str);
                 }
                 $rsarr[$i][$j] = $str;
             }
         }
         return ew_ArrayToJson($rsarr);
     } else {
         return FALSE;
     }
 }
 function RestoreFormValues()
 {
     global $objForm, $t_categories_vins;
     $t_categories_vins->id->CurrentValue = ew_ConvertToUtf8($t_categories_vins->id->FormValue);
     $t_categories_vins->nom->CurrentValue = ew_ConvertToUtf8($t_categories_vins->nom->FormValue);
     $t_categories_vins->nom_en->CurrentValue = ew_ConvertToUtf8($t_categories_vins->nom_en->FormValue);
 }