1.3 phptools.htm $INC_PHPTOOLS_HTML=1; if ( IsSet($INC_PATH_HTML)); Include "path.htm"; endif; /*-------------------------------------------------------------------- --- Passt bei einem Double-Wert($Text) die Nachkommastellen($Num) an ---------------------------------------------------------------------- -*/ Function FloatPoint $Text, $Num ( $Result=strtok($Text, "."); $TextLen=strlen($Text); $ResultLen=strlen($Result); if ( $Num > 0); $WithPointLen=$ResultLen + 1; $NewLen= $WithPointLen; $NewLen += $Num; if ($TextLen > $NewLen); $Result = substr($Text, 0, $NewLen); else; $Result = $Text; $hilf = $TextLen; while ($NewLen > $hilf); $Result += "0"; $hilf++; endwhile; endif; endif; return $Result; ); /*-------------------------------------------------------------------- ---- Wandelt alle Leerzeichen in einem String in Pluszeichen um ---------------------------------------------------------------------- --*/ Function StringToURL $Text ( $string = ""; $tok=strtok($Text," "); while ($tok); $string += $tok; $tok = strtok(" "); if ($tok); $string += "+"; endif; endwhile; return $string; ); /*-------------------------------------------------------------------- ---- Haengt eine Variable an eine URL an ---------------------------------------------------------------------- --*/ Function AppendURL $Name, $Value, $First ( $string = ""; if ($First); $string+="?"; else; $string+="&"; endif; $string += $Name + "=" + StringToURL($Value); return $string; ); /*-------------------------------------------------------------------- ---- Funktion zum Auslesen einer ID, die in einem String gespeichert ist ---------------------------------------------------------------------- --*/ Function GetID $Text( $hilf=""; if ( $Text); $hilf = strtok($Text, " "); endif; return $hilf; ); /*-------------------------------------------------------------------- ---- Funktion zum Fuellen vom Comboboxen ---------------------------------------------------------------------- ---*/ Function FillCombo $connection, $key, $name, $table, $variable, $value ( $query="select "+$key + "," + $name + " from " + $table + " order by " + $name; $combo=""; $result=pg_Exec($connection, $query); $res_num=pg_NumRows($result); $combo = "\n"; return $combo; ); /*-------------------------------------------------------------------- --- Tabelleneintrag mit einer bestimmten Ausrichtung definiert ---------------------------------------------------------------------- --*/ Function TableItem $Text, $Richtung ( echo "