2147483647){ die ("int2jhf_id: $nIntorg Parameter zu gross (max. 2147483647)!");} do { $nGanz = intval($nInt / $nSys); $nMod = (($nInt / $nSys) - $nGanz) * $nSys; $cErg = strtoupper($aZiffern[round($nMod)]) . $cErg; $nInt = $nGanz; // print("nInt:$nInt --- nMod:$nMod --- nGanz:$nGanz --> $cErg\n"); } while ($nInt <> 0); return($cErg); }; function jhf_lpad($cString, $nLaenge, $cFuell = " ") { if (strlen($cString) < $nLaenge) { $cString = str_repeat($cFuell , $nLaenge - strlen($cString)) . $cString; } return ($cString); } function jhf_if($lAusdruck, $xExpr1, $xExpr2) { if ($lAusdruck) return ($xExpr1); else return ($xExpr2); } function jhf_func($xAusdruck) { return ($xAusdruck); } // 2001-03-26 26.03.2001 function jhf_mysqldate2date($cDatum){ return (substr($cDatum,8,2) . "." . substr($cDatum,5,2) . "." . substr($cDatum,0,4)); } function jhf_date2mysqldate($cDatum){ return (substr($cDatum,6,4) . "-" . substr($cDatum,3,2) . "-" . substr($cDatum,0,2)); } function jhf_format_n($nZahl, $nDez = 0){ // konvertiert eine zahl in einen String der Form "10.000.000,00" $cErg = ""; $cZahl = trim(round($nZahl, $nDez)); if ($nDez <> 0) { if (!strrpos($cZahl,".")) { $cZahl .= "." . str_repeat("0", $nDez); } else { $nPosP = strlen($cZahl) - strrpos($cZahl,"."); if ($nPosP < $nDez) { if ($nPosP <> $nDez) { $cZahl .= str_repeat("0", $nDez - $nPosP); } } } } if ($nDez <> 0) { $cErg = "," . substr($cZahl , ($nDez * -1)); $cZahl = substr($cZahl, 0, ($nDez * -1) - 1); } while (strlen($cZahl) > 0) { $cErg = "." . substr($cZahl , -3) . $cErg; $cZahl = substr($cZahl, 0, -3); } // ersten "." entfernen $cErg = substr($cErg, 1); return($cErg); }; function uebersetze_template($cQuelle, $aErsetzen) { $aQuelle = file($cQuelle); $cZiel = ""; foreach ($aQuelle as $cZeile) { $cZiel .= strtr($cZeile, $aErsetzen); } return($cZiel); } ?> "ä", "Ä"=>"Ä", "ö"=>"ö", "Ö"=>"Ö", "ü"=>"ü", "Ü"=>"Ü", "ß"=>"ß", "é"=>"é", "ä"=>"ä", "Ä"=>"Ä", "ö"=>"ö", "Ö"=>"Ö", "ü"=>"ü", "Ü"=>"Ü", "ß"=>"ß", "é"=>"é" ); if(!$lFuerEingabe) { $aSuch["²"] = "2"; $aSuch["²"] = "2"; $aSuch["\n\n"] = "

"; $aSuch["\n"] = "
"; } if(!$lHTMLallowed) { $aSuch["<"] = "<"; $aSuch[">"] = ">"; $aSuch["&"] = "&"; } $cText = strtr($cText, $aSuch); return($cText); } function text2mail($cText) { $aSuch = array( "ä"=>"ae", "Ä"=>"Ae", "ö"=>"oe", "Ö"=>"Oe", "ü"=>"ue", "Ü"=>"Ue", "ß"=>"ss", "é"=>"e;", "ä"=>"ae", "Ä"=>"Ae", "ö"=>"oe", "Ö"=>"Oe", "ü"=>"ue", "Ü"=>"Ue", "ß"=>"ss", "é"=>"e", "²"=>"2", "²"=>"2", "§"=>"Par.", "
"=>"\n", "
"=>"\n", ); $cText = strtr($cText, $aSuch); return($cText); } function format_zahl($nInt, $nDez) { return (number_format ( $nInt, $nDez, ",", ".")); } function format_preis($nInt, $nDez) { return (format_zahl($nInt, $nDez)." €"); } ?>