00184 {
00185
if (!is_array($raw)) {
00186 $raw = array($raw);
00187 }
00188 $rawCount = count($raw);
00189 $l10n = $this->data->getAppData('l10n');
00190
00191
switch ($func) {
00192
00193
case F_TF:
00194
return $this->str->trimFloat($raw[0]);
00195
00196
case F_FP:
00197
return $this->str->formatPrice($raw[0], $l10n);
00198
00199
case F_PN:
00200
return $this->data->getAppData('modelName') .
' ' . $raw[0];
00201
00202
case F_LD:
00203
return $this->
getHref($raw);
00204
00205
case F_LD2:
00206 $href = $this->
getHref($raw);
00207
return $this->data->getAppData('module')->baseName[$l10n]
00208 .
"/" . $href;
00209
00210
case F_TV:
00211 $v1 = $this->str->trimFloat($raw[0]);
00212 $r1 = floatval($raw[1]);
00213
if (!empty($r1)) {
00214
return $v1 . $para . $this->str->trimFloat($r1);
00215 }
00216
return $v1;
00217
00218
case F_TS:
00219
return $this->str->text_k($raw[0]);
00220
00221
case F_IMG_SHORT:
00222
if ($raw[0] ==
SQL_YES) {
00223
$path = '/img/'
00224 . $raw[1]
00225 .
'/'
00226 . $raw[2]
00227 .
'/'
00228 . $this->data->getAppData('module')->baseName[$l10n]
00229 .
'_'
00230 . $this->str->ugly2Pretty($raw[3])
00231 . '.jpg';
00232 $alt = $raw[3];
00233
return "<img border=\"0\" src=\"$path\" title=\"$alt\" alt=\"$alt\">";
00234 }
00235
else {
00236 $img = array(1 => '/pictures/kein_bild_kl-de.jpg',
00237 'Kein Bild verfügbar',
00238 '/pictures/kein_bild_kl-fr.jpg',
00239 'Pas d\'image disponible',
00240 '/pictures/kein_bild_kl-en.jpg',
00241 'No image available'
00242 );
00243 $alt = $img[$l10n * 2];
00244
$path = $img[$l10n * 2 - 1];
00245
return "<img border=\"0\" src=\"$path\" alt=\"$alt\" title=\"$alt\">";
00246 }
00247
break;
00248
00249
case F_IMG:
00250
if ($raw[0] ==
SQL_YES) {
00251
$path = '/img/'
00252 . $raw[1]
00253 .
'/'
00254 . $raw[2]
00255 .
'/'
00256 . $this->data->getAppData('module')->baseName[$l10n]
00257 .
'_'
00258 . $this->str->ugly2Pretty($raw[3])
00259 . '.jpg';
00260 $alt = $raw[3];
00261
return "<img border=\"0\" src=\"$path\" title=\"$alt\" alt=\"$alt\">";
00262 }
00263
else {
00264 $img = array(1 => '/pictures/kein_bild-de.jpg',
00265 'Kein Bild verfügbar',
00266 '/pictures/kein_bild-fr.jpg',
00267 'Pas d\'image disponible',
00268 '/pictures/kein_bild-en.jpg',
00269 'No image available'
00270 );
00271 $alt = $img[$l10n * 2];
00272
$path = $img[$l10n * 2 - 1];
00273
return "<img border=\"0\" src=\"$path\" alt=\"$alt\" title=\"$alt\">";
00274 }
00275
break;
00276
00277
case F_RAW:
00278
return $raw[0];
00279
00280
case F_DB_ENUM:
00281
if($raw[0] ==
SQL_ACRYL) {
00282
return 'Acryl (bruchsicher)';
00283 }
00284 elseif ($raw[0] == SQL_KRISTALL) {
00285
return 'Kristallglas (mundgeblasen)';
00286 }
00287 elseif ($raw[0] == SQL_GLAS) {
00288 $glas = array(1 => 'Glas',
00289 'Verre',
00290 'Glass');
00291
return $glas[$l10n];
00292 }
00293 elseif ($raw[0] == SQL_KUNSTOFF) {
00294 $kunst = array(1 => 'Kunstoff',
00295 'Plastic',
00296 'Plastic');
00297
return $kunst[$l10n];
00298 }
00299 elseif ($raw[0] == SQL_LEICHTMETALL) {
00300
return 'Leichtmetall';
00301 }
00302 elseif ($raw[0] == SQL_KARBON) {
00303
return 'Karbon';
00304 }
00305 elseif ($raw[0] == SQL_HOLZ) {
00306
return 'Holz';
00307 }
00308 elseif ($raw[0] == SQL_STAHL) {
00309
return 'Stahl';
00310 }
00311 elseif ($raw[0] == SQL_YES) {
00312 $yes = array(1 => 'Ja',
00313 'Oui',
00314 'Yes');
00315
return $yes[$l10n];
00316 }
00317 elseif ($raw[0] == SQL_NO) {
00318 $no = array(1 => 'Nein',
00319 'Non',
00320 'No');
00321
return $no[$l10n];
00322 }
00323
break;
00324
00325
case F_MT_LINENC:
00326 $linenc = array(1 => 'Mit Linear-Encoder: ',
00327 '',
00328 '');
00329
00330 $ecodrive = array(1 => 'einseitiges Anfahren|beidseitiges Anfahren',
00331 '',
00332 '');
00333
static $ecoFlag = 0;
00334
if ($this->pId == '580' && $ecoFlag == 0) {
00335 $eco = explode(
'|', $ecodrive[$l10n]);
00336 $ecoFlag = 1;
00337
return "$eco[0]: "
00338 . $this->str->trimFloat($raw[0])
00339 .
"µm <br>\n"
00340 . ' '
00341 .
"$eco[1]: "
00342 . $this->str->trimFloat($raw[1]);
00343 }
00344
if ($ecoFlag == 1) {
00345
return "<" . $this->str->trimFloat($raw[0]);
00346 }
00347
00348 $val = $para
00349 . $this->str->trimFloat($raw[0]);
00350
00351 $r1 = floatval($raw[1]);
00352
if (!empty($r)){
00353 $val .=
"µm<br>\n"
00354 . ' '
00355 . $linenc[$l10n]
00356 . $para
00357 . $this->str->trimFloat($r1);
00358 }
00359
return $val;
00360
00361
case F_MT_VMAX:
00362 $spindelText = array(1 => 'Mit %dmm Spindel: ',
00363 '',
00364 '');
00365 $spindelSize = array(1, 2, 4);
00366 $val =
"";
00367
for ($i = 0; $i < 3; ++$i) {
00368 $r = floatval($raw[$i]);
00369
if (!empty($r)) {
00370 $val .=
"<br>\n"
00371 . ' '
00372 . sprintf($spindelText[$l10n],
00373 $spindelSize[$i]
00374 )
00375 . $para
00376 . $this->str->trimFloat($r)
00377 .
"mm/s";
00378 }
00379 }
00380
$l = strlen($val);
00381
return substr($val, 0, $l - 4);
00382
00383
case F_U2P:
00384
return $this->str->ugly2Pretty($raw[0]);
00385
00386
case F_SO_VERGR:
00387 $vergr1 = round($raw[0] / $raw[1]);
00388 $r2 = floatval($raw[2]);
00389
if (!empty($r2)) {
00390 $vergr2 = round($raw[0] / $r2);
00391
return $vergr1 . $para . $vergr2;
00392 }
00393
return $vergr1;
00394
00395
case F_SO_AUST:
00396 $vergr1 = round($raw[0] / $raw[1]);
00397 $r2 = floatval($raw[2]);
00398
if (!empty($r2)) {
00399 $vergr2 = round($raw[0] / $r2);
00400
return round($raw[3] / $vergr1, 1)
00401 . $para
00402 . round($raw[3] / $vergr2, 1);
00403 }
00404
return round($raw[3] / $vergr1, 1);
00405
00406
case F_SO_SEHF:
00407 $vergr1 = round($raw[0] / $raw[1]);
00408 $r2 = floatval($raw[2]);
00409
if (!empty($r2)) {
00410 $vergr2 = round($raw[0] / $r2);
00411
return round($raw[3] * 17.5 / $vergr1)
00412 . $para
00413 . round($raw[4] * 17.5 / $vergr2);
00414 }
00415
return round($raw[3] *17.5 / $vergr1);
00416
00417
case F_MODEL_NAME:
00418 $pos = strpos ($raw[0],
'_', 0);
00419
if ($pos ===
false) {
00420
return $raw[0];
00421 }
00422
return substr($raw[0], 0, $pos);
00423
00424
case F_F_EINSATZ:
00425 $egs = array(
00426 'aj' => array(1 => 'Astronomie<br>Jagd',
00427 '',
00428 'Astronomy<br>Hunting'
00429 ),
00430
'w' => array(1 => 'Wandern',
00431 '',
00432 'Hiking'
00433 ),
00434
'o' => array(1 => 'Ornithologie',
00435 '',
00436 'Birding'
00437 )
00438 );
00439 $l10n =
getDataInstance()->getAppData('l10n');
00440 $eg = '';
00441
if ($raw[0] >= 4) {
00442 $eg = $egs['aj'][$l10n];
00443 }
00444
if ($raw[0] >= 4 && $raw[2] >= 7) {
00445
if ($eg != '') {
00446 $eg .= '<br>';
00447 }
00448 $eg .= $egs[
'o'][$l10n];
00449 }
00450
if ($raw[1] <= 750) {
00451
if ($eg != '') {
00452 $eg .= '<br>';
00453 }
00454 $eg .= $egs[
'w'][$l10n];
00455 }
00456
return $eg;
00457
00458
case F_SP_IMG_LINK:
00459
if ($raw[0] ==
SQL_YES) {
00460
return "<a href=\"javascript:openFenster('"
00461 .
"/img/p/"
00462 . $raw[1]
00463 .
"/"
00464 . $this->str->ugly2Pretty($raw[2])
00465 .
".jpg', 600, 450)\">"
00466 . $raw[2]
00467 .
"</a>";
00468 }
00469
return $raw[2];
00470
00471
case F_NL2BR:
00472 $tmp = $raw[0];
00473
if ($rawCount == 2) {
00474 $tmp .= $raw[1];
00475 }
00476
return nl2br($tmp);
00477
00478
case F_L_MESSL:
00479 $messl = array(1 => 'Öffnungswinkel',
00480 'Angle d\'ouverture',
00481 'Aperture angle',
00482 'Winkel',
00483 'Angle',
00484 'Angle');
00485 $val =
"";
00486
switch ($raw[0]) {
00487
case 999999:
00488 $val = $messl[$l10n];
00489
break;
00490
case 999998:
00491 $val = $messl[$l10n + 3];
00492
break;
00493
case 0:
00494
break;
00495
default:
00496 $val = $this->str->trimFloat($raw[0]);
00497
break;
00498 }
00499 $r1 = floatval($raw[1]);
00500
if (!empty($r)) {
00501 $val .= $para . $this->str->trimFloat($r1);
00502 }
00503
return $val;
00504
00505
case F_L_SICHTF:
00506 $sichtf =
" ";
00507 $r0 = floatval($raw[0]);
00508
if (!empty($r0)) {
00509 $sichtf = $this->str->trimFloat($r0);
00510 }
00511
switch ($raw[1]) {
00512
case 999999:
00513 $sichtf .=
"°";
00514
break;
00515
case 0:
00516
break;
00517
default:
00518 $sichtf .= $para . $this->str->trimFloat($raw[1]);
00519
break;
00520 }
00521
return $sichtf;
00522
default:
00523
break;
00524 }
00525
return;
00526 }