include $cJHF_system_include."module/jhffile.php";
#### raus in PHP5 ###### include $cJHF_system_include."jhfdb/o_jhfdbappl.php";
include $cJHF_system_include."jhfdb/o_jhfdbtab.php";
include $cJHF_system_include."jhfdb/o_jhfdbtab_multimedia.php";
include $cJHF_system_include."jhfdb/o_jhfdbtab_links.php";
include $cJHF_system_include."jhfdb/o_jhfdbmaske.php";
include $cJHF_system_include."jhfdb/o_jhfdbbrowseliste.php";
#### raus in PHP5 ###### include $cJHF_system_include."jhfdb/o_jhfdbuser.php";
// ####################################################################################
function int2jhf_id ($nIntorg){
$aZiffern= array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
$nSys = 36;
$nInt = $nIntorg;
$nGanz = 0;
$nMod = 0;
$cErg = "";
if ($nIntorg > 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);
}
?>
session_register("oAppl");
session_register("db");
if (!isset($HTTP_POST_VARS)) {
$HTTP_POST_VARS = array();
}
if (!isset($HTTP_GET_VARS)) {
$HTTP_GET_VARS = array();
}
?>
function text2html($cText, $lHTMLallowed = false, $lFuerEingabe = false) {
$aSuch = array(
"ä"=>"ä",
"Ä"=>"Ä",
"ö"=>"ö",
"Ö"=>"Ö",
"ü"=>"ü",
"Ü"=>"Ü",
"ß"=>"ß",
"é"=>"é",
"ä"=>"ä",
"Ä"=>"Ä",
"ö"=>"ö",
"Ö"=>"Ö",
"ü"=>"ü",
"Ü"=>"Ü",
"ß"=>"ß",
"é"=>"é"
);
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)." €");
}
?>